Allow embedders to exclude Cranelift's Pulley backends on hosts with a native backend
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 46/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- backend, build-system
Direzione di ricerca
Start with the pulley feature in crates/wasmtime/Cargo.toml and the existing #[cfg(feature = "pulley")] handling in wasmtime-cranelift; then inspect the relevant build.rs checks. Determine how to forward the feature while preserving Pulley support for hosts without a native backend. Done means embedders can disable Pulley on supported hosts and receive a clear build error when it is required.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Feature
wasmtime currently unconditionally enables the pulley feature of wasmtime-cranelift, which turns on cranelift-codegen/pulley. As a result every embedder using the cranelift feature links the pulley32 and pulley64 backends even with default-features = false, even when nothing ever targets Pulley.
Benefit
wasmtime 49.0.4, rustc 1.99.1, aarch64-apple-darwin, release profile with strip = true:
[dependencies]
wasmtime = { version = "=49.0.4", default-features = false, features = ["cranelift", "runtime", "std"] }
fn main() -> wasmtime::Result<()> {
let engine = wasmtime::Engine::default();
let module = wasmtime::Module::new(&engine, b"\0asm\x01\0\0\0")?;
wasmtime::Instance::new(&mut wasmtime::Store::new(&engine, ()), &module, &[])?;
Ok(())
}
| file | __text |
|
|---|---|---|
| as published | 7,896,992 | 5,996,012 |
features = ["pulley"] removed via [patch] |
6,121,152 | 4,522,352 |
| delta | -1,775,840 (-22.5%) | -1,473,660 (-24.6%) |
The patched build compiles and runs unchanged; wasmtime-cranelift already handles the feature's absence (#[cfg(feature = "pulley")]).
In the case of a large application like Aqueous, symbol attribution gives 1.54 MiB to the Pulley backends against 0.55 MiB for the aarch64 backend actually used.
Implementation
Ideally the feature has to be forwarded instead: pulley = ["wasmtime-cranelift?/pulley"] with pulley added to default. For hosts without a native backend, build.rs could then fail with a message asking for the pulley feature (when cranelift is on and pulley is off), rather than silently enabling it.
Alternatives
Alternatively keep the current behaviour and let build.rs accept an opt-out, e.g. a --cfg wasmtime_no_pulley_compiler (only allowed on hosts with a native backend).
- Lingua principale
- Rust
- Stelle
- 18.8k
- Fork
- 1.9k
- Merge medio
- 1g 3h
- PR unite (30g)
- 382
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un 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 bytecodealliance/wasmtime
-
bug wasm-proposal:exceptions wasmtime:debugging
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bytecodealliance/wasmtime#14102 ·
I maintainer di solito rispondono entro 1 giorno
-
wasm-proposal:gc
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
bytecodealliance/wasmtime#13808 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 20/100
bytecodealliance/wasmtime#15193 ·
I maintainer di solito rispondono entro 1 giorno
-
awfy performance
Difficoltà 4/5 3-5 giorni Idoneità per principianti 44/100
bytecodealliance/wasmtime#15192 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
bytecodealliance/wasmtime#15160 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di bytecodealliance/wasmtime
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
bug order-flow studies ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
userFRM/egui-charts#2417 ·
I maintainer di solito rispondono entro 1 giorno
-
In a plain-text message, Font, Font Size, Font Color and Text Highlight Color stay liveForse già presa @ragelfundionctrumnar l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
UCS-Care-Group/mailcraft#862 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
smoltcp-rs/smoltcp#1243 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 4 giorni