`feat_wasm` utilities that spawn a child process cannot work under WASI
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Read docs/src/wasi-test-gaps.md and the feat_wasm handling for nice and split, including tests marked #[uutests::wasi_ignore(NoSubprocessSpawning)]. The issue asks for a product decision among several approaches, so first trace how these utilities behave under WASI and assess the tradeoffs described. Done means agreeing on and documenting a behavior for subprocess-spawning utilities under WASI.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
WASI has no fork/exec/posix_spawn equivalent for a guest module, on both wasm32-wasip1 and wasm32-wasip2. Any utility whose job is to launch another program cannot do that job under WASI, regardless of implementation.
Affects every feat_wasm utility that spawns a child: nice, split. Every such test carries #[uutests::wasi_ignore(NoSubprocessSpawning)].
Impact
nice's only working case under WASI is the no-argument "print current niceness." Any invocation with a command fails. The failure is clean now (see the exit-code issue), but the feature doesn't exist under WASI.
Possible workarounds — checked, neither is real
- In-process dispatch.
coreutils.wasmis a multicall binary with every utility linked in. If the target command matches one of those (e.g.nice echo a b c), we could call itsuumaindirectly instead of exec. But: does nothing for an external program (still no way to load another module); drops the actual point ofnice(no priority/SIGHUP concept under WASI anyway, so it'd just run the command, not nice it); doesn't helptimeout(no way to preempt a direct call without real threads — see shared-everything-threads, draft, unimplemented); needs new plumbing to expose the dispatch table (currently only incoreutils's generateduutils_map.rs) to individualuu_*crates. - WASI preview 3. No process/fork/exec proposal at any phase;
wasi:clihas no exec interface. Preview 3's scope is native async, not new capabilities. WebAssembly/WASI#899 (wasi:exec) is open but scoped to spawning other components, not native binaries, and the SIG leans toward handling it via the component model's runtime instantiation rather than a WASI interface. No phase assigned.
Ask
Decide what these utilities should do under feat_wasm:
- Ship as-is, documenting the exec path as always-failing.
- Exclude them from
feat_wasmsince their core function is unreachable. - Add in-process dispatch for
niceas a best-effort fallback, accepting the semantic change and the new plumbing it needs. - Something else, e.g. a dedicated "WASI has no subprocess spawning" error instead of the generic
operation not supported on this platform.
Scope/product decision, not a code bug — docs/src/wasi-test-gaps.md already documents the limitation.
- Lingua principale
- Rust
- Stelle
- 24.4k
- Fork
- 2.2k
- Merge medio
- 2g 23h
- PR unite (30g)
- 402
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di uutils/coreutils
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
split -n leaves bytes from a previous run in chunks that should be emptyForse già presa @costajohnt l’ha presa 2 giorni fa. ApertaU - split
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
dircolors: '=' is not escaped and '^'/'\\' do not toggle the backslash state, unlike GNUForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. ApertaU - dircolors
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
I maintainer di solito rispondono entro 1 giorno
-
U - shred
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
chown -v: `+ID` spec echoed verbatim on a broken symlinkForse già presa @sunsss123soldier l’ha presa 7 giorni fa. Apertagood first issue oss-scanner U - chown
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di uutils/coreutils
Issue simili
-
marketing
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
S: Untriaged T: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
libnyanpasu/clash-nyanpasu#6537 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 62/100
tauri-apps/tao#1445 ·
I maintainer di solito rispondono entro 1 giorno
-
bug P3
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
-
go good first issue test
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 2 giorni