title = "Introducing Spin"
template = "main"
date = "2022-03-14T00:22:56Z"
[extra]
url = "https://github.com/fermyon/spin/blob/main/docs/content/index.md"
---

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](https://github.com/WebAssembly/component-model)
and [Wasmtime](https://wasmtime.dev/) runtime.

Spin offers a simple framework that helps you write, distribute, and execute
[fast](https://fermyon.github.io/spin-benchmarks/criterion/reports/),
stateless, event-driven applications, with components based on functions:

```rust
#[http_component]​
fn hello_world(req: Request) -> Result<Response> {​
    Ok(Response::builder()​
        .status(200)​
        .body(Some("Hello, Fermyon!".into()))?)​
}​
```

### Overview

Spin applications are comprised of one or more function-based _components_, and
follow the event-driven model — they are executed as the result of events being
generated by _triggers_ (for example an HTTP server receiving requests, or a queue
subscription receiving messages). On each new event, _the entrypoint_ of a
component is executed by Spin. The entrypoints to components are _functions_.
This, together with the fact that they are invoked in response to events, brings
the Spin application model closer to the Function-as-a-Service model.

In the next section, we will [take Spin for a spin](/quickstart).
