spinframework / spinframework/spin
Add explicit version check to SDKs
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.5k
- Forks
- 310
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 24
Description
Per #615, you get inscrutable errors when using a version of Spin that's incompatible with the SDK used to build the app (e.g. due to a breaking wit-bindgen upgrade like #574).
In order to detect issues like that early and provide a useful diagnostic, the host (i.e. Spin) should export a function (named e.g. assert_sdk_compat) which the app can use to report which SDK it was built with and is thus compatible with. That function should not use the canonical ABI, but rather just core Wasm, since ABI changes are just the sort of thing we're trying to detect.
When the app calls that function and the host finds that it cannot support the requested version, it should refuse to run the app and instead provide a helpful diagnostic to the user, e.g. "This version of Spin is not compatible with apps built with SDK version x.y.z -- please either rebuild the app using version q.r.s or newer, or else run the app with an earlier release of Spin".
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 by tracing how the Spin host exports functions to apps and how SDK version information is currently represented. Define the core Wasm assert_sdk_compat entry point and the unsupported-version diagnostic described in the issue. Done means incompatible SDK versions are rejected before the app runs with a helpful message, while compatible versions continue to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- backend, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100