Getting initial exec implementation released
tegefaulkes opened this issue · comments
Specification
I'm making this issue to track the work needed to get the first release of js-exec
out.
Additional context
- Related: MatrixAI/Polykey-CLI#31
- Related: MatrixAI/Polykey-CLI#129
Tasks
- Finish polishing code.
- FInish ci config and get that working
- make sure execvpe works on macos. It may not be supported properly so we'll need to replicate the behaviour some other way. Although
uapi
mentions support for darwin so maybe they already handle this? I can test via CI first. - Fill ci passes and releases.
There may be a sliding scale of what we support for now.
- linux should be supported.
- macos needs to be supported but may need extra work.
- win needs an alternative method since process replacement isn't available. Need to decide where to implement that. here or whatever uses
js-exec
can usechild_process
to run a sub-process.
Later on if needed we can implement all of the exec functions that are available in the uapi
.
Yep, the mac version isn't building.
error[E0425]: cannot find function `execvpe` in crate `uapi`
--> src/napi/lib.rs:53:9
|
53 | uapi::execvpe(
| ^^^^^^^ help: a function with a similar name exists: `execve`
|
::: /Users/gitlab/.cargo/registry/src/github.com-1ecc6299db9ec823/uapi-0.2.10/src/process/mod.rs:85:1
|
85 | / pub fn execve<'a>(
86 | | pathname: impl IntoUstr<'a>,
87 | | argv: &UstrPtr,
88 | | envp: &UstrPtr,
89 | | ) -> Result<()> {
| |_______________- similarly named function `execve` defined here
For more information about this error, try `rustc --explain E0425`.
error: could not compile `exec` due to previous error
So execvpe
isn't supported for darwin.
I'm considering this done with the release of version 0.1.2
.