Rethink state management and option semnatics of proto/wasm/loaded sandbox
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
Direzione di ricerca
Inizia dalla discussione sulla gestione dello stato di proto/wasm/loaded sandbox e dal thread correlato di PR 128. Determina la semantica prevista di Option e drop, quindi separa gli errori rivolti all’utente dalle violazioni degli invarianti; il lavoro è concluso quando il design è concordato e le sue conseguenze sono documentate o implementate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
This is taking self by value, so why do we need to move out of these fields? Is it just about the fact that we have drop glue on this type?
One option to get rid of the dynamic check here would be ManuallyDrop, but I don't know if we like the tradeoff of (closer to what we actually want, no unnecessary dynamic checks) to increased unsafe code surface, and I suppose we would still need to have a flag that let the Drop impl know whether or not the contents had been moved (or use ManuallyDrop<Self> to write an into_inner() function that removes the contents of the sandbox, manually updates the counters, and never runs the drop glue at all).
Relatedly, I think that scattered throughout our errors in general, we have a mix of "this means the user did something wrong, and they should be better" with "this means this is a fundamental invariant that we believed would always be true but was somehow violated". I would like us to separate these in an easily visible way (akin to rustc errors vs ICEs), since they have quite different consequences. I wonder if it is reasonable to panic in the latter case, since if we were wrong about one invariant, who knows what else we were wrong about...
Sorry, this comment has become a bit long and large in scope, so feel free to not consider it a blocker for this PR, but perhaps think a little bit about whether the Option semantics are indeed what we want.
Originally posted by @syntactically in https://github.com/hyperlight-dev/hyperlight-wasm/pull/128#discussion_r2239536449
- Lingua principale
- Rust
- Stelle
- 728
- Fork
- 39
- Merge medio
- 2g 3h
- PR unite (30g)
- 25
Guida per i contributori
Apri 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 hyperlight-dev/hyperlight-wasm
-
lifecycle/needs review
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
lifecycle/needs review
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
-
Can't update to wasmtime 48 Apertalifecycle/needs review
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
-
use the #[guest_func] macro on `init_wasm_runtime` instead of manually calling register_function? Apertalifecycle/needs review
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
hyperlight-dev/hyperlight-wasm#395 · 1 commento · 1 reazione ·
-
lifecycle/needs review
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
Tutte le issue di hyperlight-dev/hyperlight-wasm
Issue simili
-
Browser (wasm) relay client cannot connect to relays whose URL has a trailing-dot FQDN hostname Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
n0-computer/iroh#4550 ·
-
impl detach for native Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
paritytech/zombienet-sdk#591 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
farion1231/cc-switch#7638 · 1 commento ·
-
onnx-ir re-exports ModelProto and GraphProto but not NodeProto, AttributeProto and AttributeType Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100