spinframework / spinframework/spin
Add toolchain hint heuristics on `spin new`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.5k
- Forks
- 310
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 24
Description
Each language has its own toolchain setup requirements. Ideally we could handle these seamlessly for developers, but until we can figure that out we should try to give more guidance to reduce frustration.
The most obvious example is skipping rustup target add wasm32-wasi, which while documented in the quickstart guide is easy to miss/forget. It would be great if we could detect this situation and print a helpful message at one or more of these points:
spin new- look for aCargo.tomlin the template?spin build- on failure, look forcargo.*wasm32-wasiin acomponent.build.command?spin up- on failure, look fortarget/wasm32-wasiin the source
In any of these cases we could use the existing check from build.rs: https://github.com/fermyon/spin/blob/60976e41231820ba6b3c4d6e0391814b459c7628/build.rs#L84-L94
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing toolchain check in build.rs and compare it with the quickstart guide's rustup target add wasm32-wasi requirement. Then inspect the proposed spin new, spin build, and spin up points and determine where the missing-target hint should appear; done means the relevant failure or template case produces helpful guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- cli, developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100