Skip to content

Add toolchain hint heuristics on spin new #1257

@lann

Description

@lann

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 a Cargo.toml in the template?
  • spin build - on failure, look for cargo.*wasm32-wasi in a component.build.command?
  • spin up - on failure, look for target/wasm32-wasi in 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions