Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

spin

> 编程语言
Open source

Spin is the open source developer tool for building and running serverless applications powered by WebAssembly.

6.5K stars0 likes3 views
WebsiteGitHub

About

Spin is the open source developer tool for building and running serverless applications powered by WebAssembly.

What is Spin?

Spin is an open source framework for building and running fast, secure, and composable cloud microservices with WebAssembly. It aims to be the easiest way to get started with WebAssembly microservices, and takes advantage of the latest developments in the WebAssembly component model and Wasmtime runtime.

Spin offers a simple CLI that helps you create, distribute, and execute applications, and in the next sections we will learn more about Spin applications and how to get started.

Getting started

See the Install Spin page of the Spin documentation for a detailed guide on installing and configuring Spin, but in short run the following commands:

bash
curl -fsSL https://spinframework.dev/downloads/install.sh | bash
sudo mv ./spin /usr/local/bin/spin

Alternatively, you could build Spin from source.

To get started writing apps, follow the quickstart guide, and then follow the Rust, JavaScript, Python, or Go language guides, and the guide on writing Spin applications.

Language support

WebAssembly is a language-agnostic runtime: you can build WebAssembly components from a variety of source languages. Spin SDKs are available for several languages, including:

  • JavaScript: https://github.com/spinframework/spin-js-sdk
  • Rust: https://crates.io/crates/spin-sdk
  • Go: https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2
  • Python: https://github.com/spinframework/spin-python-sdk
  • Zig: https://github.com/dasimmet/zig-spin (third party)
  • Moonbit: https://github.com/gmlewis/spin-moonbit-sdk (third party)

The Spin framework team supports the JavaScript, Rust, Go, and Python SDKs. Other language integrations are supported by their authors, and we're grateful to them for their work!

Usage

Below is an example of using the spin CLI to create a new Spin application. To run the example you will need to install the wasm32-wasip2 target for Rust.

bash
$ rustup target add wasm32-wasip2

First, run the spin new command to create a Spin application from a template.

bash
# Create a new Spin application named 'hello-rust' based on the Rust http template, accepting all defaults
$ spin new --accept-defaults -t http-rust hello-rust

Running the spin new command created a hello-rust directory with all the necessary files for your application. Change to the hello-rust directory and build the application with spin build, then run it locally with spin up:

bash
# Compile to Wasm by executing the `build` command.
$ spin build
Executing the build command for component hello-rust: cargo build --target wasm32-wasip2 --release
    Finished release [optimized] target(s) in 0.03s
Successfully ran the build command for the Spin components.

# Run the application locally.
$ spin up
Logging component stdio to ".spin/logs/"

Serving http://127.0.0.1:3000
Available Routes:
  hello-rust: http://127.0.0.1:3000 (wildcard)

That's it! Now that the application is running, use your browser or cURL in another shell to try it out:

bash
# Send a request to the application.
$ curl -i 127.0.0.1:3000
HTTP/1.1 200 OK
content-type: text/plain
transfer-encoding: chunked
date: Sun, 02 Mar 2025 20:09:11 GMT

Hello World!

You can make the app do more by editting the src/lib.rs file in the hello-rust directory using your favorite editor or IDE. To learn more about writing Spin applications see Writing Applications in the Spin documentation. To learn how to publish and distribute your application see the Publishing and Distribution guide in the Spin documentation.

Language Support for Spin Features

The table below summarizes the feature support in each of the language SDKs.

Feature Rust SDK Supported? TypeScript SDK Supported? Python SDK Supported? Tiny Go SDK Supported? C# SDK Supported?
Triggers
HTTP Supported Supported Supported Supported Supported
Redis Supported Supported Supported Supported Not Supported
APIs
Outbound HTTP Supported Supported Supported Supported Supported
Configuration Variables Supported Supported Supported Supported Supported
Key Value Storage Supported Supported Supported Supported Not Supported
SQLite Storage Supported Supported Supported Supported Not Supported
MySQL Supported Supported Not Supported Supported Not Supported
PostgreSQL Supported Supported Not Supported Supported Supported
Outbound Redis Supported Supported Supported Supported Supported
Serverless AI Supported Supported Supported Supported Not Supported
Extensibility
Authoring Custom Triggers Supported Not Supported Not Supported Not Supported Not Supported

Getting Involved and Contributing

We are delighted that you are interested in making Spin better! Thank you!

Each Monday at 9:00pm UTC, we meet to discuss Spin issues, roadmap, and ideas in our Spin Project Meetings. Demos are welcome. Link to the meeting can be found in the Spin Project Meeting agenda below. If this meeting time does not work for you, please propose a one-off meeting at a different time or a new recurring time in the Spin Slack Channel or in the issue queue. We will do our best to accommodate.

The Spin Project Meeting agenda is a public document. The document contains a rolling agenda with the date and time of each meeting, the Zoom link, and topics of discussion for the day. You will also find the meeting minutes for each meeting and the link to the recording. If you have something you would like to demo or discuss at the project meeting, we encourage you to add it to the agenda.

You can find the contributing guide here.

Stay in Touch

Follow us on Twitter: @spinframework

You can join the Spin community in the Spin CNCF Slack channel where you can ask questions, get help, and show off the cool things you are doing with Spin!

Issues· 260 open

View all issuesOpen on GitHub
  • #3721

    Enable lockfile metadata lookup without needing to pull in entire factor dependency

    Updated Sep 22, 2026
  • #3618

    DX for scaffolding and adding middleware to an application

    Updated Sep 18, 2026
  • #3680

    Disable TCP and UDP unless they're actually needed when configuring `WasiCtx`

    Updated Sep 14, 2026
  • #1176

    e2e tests docker image is built everytime

    citestingUpdated Sep 14, 2026
  • #3705

    Should max_instance_memory limit each memory or the whole instance?

    bugUpdated Sep 14, 2026
  • #3696

    Build and save precomposed component

    Updated Sep 14, 2026
  • #3010

    Rename `fermyon` namespace in Spin WIT

    cncf-onboardingUpdated Aug 25, 2026
  • #3648

    Change default behavior of `spin plugins list`

    breaking-changeUpdated Aug 5, 2026
  • #3530

    Target environments: local polyfills for environment-specific APIs

    Updated Jul 30, 2026
  • #3634

    Add a `spin targets check`

    Updated Jul 23, 2026

> Tags

Rustserverlessspinwebassembly

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 24, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言