spin-js-sdk
preview2-prototyping
spin-js-sdk | preview2-prototyping | |
---|---|---|
3 | 1 | |
41 | 80 | |
- | - | |
7.5 | 10.0 | |
5 days ago | 8 months ago | |
Rust | Rust | |
Apache License 2.0 | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
spin-js-sdk
-
Spin 2.0 – open-source tool for building and running WASM apps
Thank you!
To your point, the primary consideration for choosing the languages is their support for WebAssembly, and WASI in particular.
Due to Spin's heavy use of WASI and the component model, languages that have first party support in the WIT bindings generator (https://github.com/bytecodealliance/wit-bindgen) are the easiest to implement, followed by languages that can be built on top of the support for those with first party support.
For example, the JavaScript support is built by embedding QuickJS (in particular, Shopify's Javy project — https://github.com/fermyon/spin-js-sdk), which then uses the Rust SDK.
-
Spin 1.0 — The Developer Tool for Serverless WebAssembly
Besides the built-in key/value store, Spin applications can also connect to external databases (such as relational databases, or Redis), or connect to the new class of serverless databases that expose their connections over HTTP. Let's see an example of using a PlanetScale database from TypeScript:
-
Fermyon Spin JavaScript and TypeScript SDK
There's a simple example of using React server-side rendering here: https://github.com/fermyon/spin-js-sdk/tree/main/examples/ja.... We haven't tried anything more advanced than that, yet, but a full-blown isomorphic app should work fine in theory.
The main limitation at the moment is that we only support a handful of Web APIs (e.g. `fetch`, `URL`, etc.) and NodeJS APIs (e.g. `readFile`), as well as QuickJS's built-in ES2020 APIs, so if you try to run an existing app you may find it needs a Web API we don't yet support. If so, please feel free to open an issue on the `spin-js-sdk` repo.
preview2-prototyping
-
Spin 1.0 — The Developer Tool for Serverless WebAssembly
But perhaps the most exciting is going to be the transition to using WASI Preview 2 and the Wasm component model, which will bring a host of improvements and new features! We are hoping to make significant progress here over the next few months, so stay tuned!
What are some alternatives?
componentize-py
spin-fileserver - A static file server implemented as a Spin component
teavm-wasi - Friendly fork of TeaVM with support for WASI and the WebAssembly Component Model
containerd-wasm-shims - containerd shims for running WebAssembly workloads in Kubernetes
zig-spin - 🪀 Zig SDK for the Spin serverless application framework created by @fermyon.
spin-planetscale-f1
spin-plugin-k8s - A Kubernetes Plugin for Fermyon Spin
spin-trigger-sqs - A trigger plugin for processing SQS messages using Spin
wasi-sql
cosign - Code signing and transparency for containers and binaries