spinframework / spinframework/spin
Spin CLI auto install missing libraries
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.5k
- Forks
- 310
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 24
Description
Is your feature request related to a problem? Please describe.
Not that I'm aware of.
tl;dr
I made a change to the getting started Fermyon app, and after running spin build, I got the following error:
Compiling bytes v1.2.1
Compiling percent-encoding v2.2.0
error[E0463]: can't find crate for `std`
|
= note: the `wasm32-wasi` target may not be installed
= help: consider downloading the target with `rustup target add wasm32-wasi`
For more information about this error, try `rustc --explain E0463`.
error: could not compile `fnv` due to previous error
warning: build failed, waiting for other jobs to finish...
error[E0463]: can't find crate for `core`
|
= note: the `wasm32-wasi` target may not be installed
= help: consider downloading the target with `rustup target add wasm32-wasi`
|
42 | extern crate alloc;
| ^^^^^^^^^^^^^^^^^^^ can't find crate
error[E0463]: can't find crate for `core`
(much, much, more output to follow....)
This ^^ error was resolved after running rustup target add wasm32-wasi, but I thought how convenient it would have been if Spin took care of this for me, especially for those developers not be familiar with Rust.
Describe the solution you'd like
Instead of failing with a bunch of errors, and leaving the user to comb through the output for a solution. Perhaps try and install any detected missing dependencies to begin with.
Describe alternatives you've considered
None
Additional context
None
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 spin build entry point and reproduce the failure using the getting started Fermyon app when the wasm32-wasi target is absent. Compare the current error with the result after rustup target add wasm32-wasi; done should mean missing build dependencies are detected and handled with clear, actionable behavior rather than an opaque compiler failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100