-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for non-unix and non-windows platforms #13
Conversation
Cross process jobserver and thread cancellation is not supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
src/lib.rs
Outdated
@@ -254,13 +254,16 @@ impl Client { | |||
/// On Unix and Windows this will clobber the `CARGO_MAKEFLAGS` environment | |||
/// variables for the child process, and on Unix this will also allow the | |||
/// two file descriptors for this client to be inherited to the child. | |||
/// | |||
/// On platforms other than Unix and Windows this does nothing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like it may be more appropriate to panic on other platforms? It's not supported there so only in-process usage is expected to work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would make impossible to use same code compiled to both native and WASI, without extra #[cfg(...)]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RReverser it would be possible, as WASI doesn't support spawning processes, so if you were to call configure
you would likely panic shortly afterwards for spawning a thread anyway. Also because the function keeps existing no #[cfg(...)]
is required to keep it compiling.
Edit: on other previously unsupported platforms, there would need to be a #[cfg(...)]
in the client code, but at least that prevents them from accidentally overloading the processor due to missing cross-process jobserver support.
Thanks! |
Cross process jobserver and thread cancellation is not supported
This is part of an experiment to port rustc to wasi. (cc rust-lang/miri#722)
cc @RReverser