bytecodealliance / bytecodealliance/component-docs
Improve ergonomics of Rust examples, re-enable use of published packages
- Lingua principale
- Rust
- Stelle
- 137
- Fork
- 88
- Merge medio
- 5g 12h
- PR unite (30g)
- 4
Descrizione
This issue arguably shouldn't go here, but currently UX issues in upstream tooling is making the Rust
The goal is to revert [this reverted functionality](https://github.com/bytecodealliance/component-docs/pull/254) -- we *want* to be able to use published WIT packages but there are a few issues stopping us:
- `cargo-component` does not configure/patch where `wkg` looks for deps (the target kind) when configured in `Cargo.toml` (i.e. we should be able to specify that `docs` is a known package w/ a known registry)
- `cargo-component` currently does not properly resolve targets w/ multiple worlds *even if* `wkg` is configured (via [it's global config file](https://github.com/bytecodealliance/wasm-pkg-tools?tab=readme-ov-file#configuration))
- `wkg` should be able to use local fconfig
There are at least a few ways to solve this issue:
1. Update `cargo-component` to perform the patching of registries for namespaces before using `wasm-pkg-tools` functionality
2. Update `wkg` to prefer local config files and include one in the tutorial code
3. Update the guide to get users to configure `wkg` global config before attempting usage.
A somewhat hidden requirement/sidequest to this issue is that we need more `cargo-component`/`wasm-pkg-tools` maintainers. The current functionality is fantastic for these tools, but the UX needs to be polished just a bit.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia esaminando la funzionalità ripristinata in PR #254 e il codice del tutorial Rust. Confronta la configurazione dei package documentata con il comportamento attuale di cargo-component e wasm-pkg-tools, quindi determina quale dei tre approcci proposti è attuabile. Il lavoro è completato quando gli esempi possono usare package WIT pubblicati senza gli attuali errori di configurazione o di risoluzione di più worlds.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust, wasm
- Ambito
- devtools, documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100