You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/blog/announcing-spin-4-0.md
+40-1Lines changed: 40 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
title = "Announcing Spin v4.0"
2
-
date = "2026-04-23T17:00:00Z"
2
+
date = "2026-06-15T17:00:00Z"
3
3
template = "blog_post"
4
4
description = "Announcing Spin v4.0: stabilized WASIp3 support, async host APIs across the board, build profiles, and fine-grained capability inheritance for dependencies."
5
5
tags = []
@@ -18,6 +18,8 @@ There's a lot in this release, so this post is part release-notes and part tutor
18
18
-[Async everywhere: Spin's host interfaces are now async](#async-everywhere-spins-host-interfaces-are-now-async)
19
19
-[Build profiles](#build-profiles)
20
20
-[Fine-grained capability inheritance for dependencies](#fine-grained-capability-inheritance-for-dependencies)
21
+
-[Targeting a deployment environment](#targeting-a-deployment-environment)
22
+
-[Shell completions](#shell-completions)
21
23
-[Upgrading to Spin 4.0](#upgrading-to-spin-40)
22
24
23
25
## WASI Preview 3: stabilized and supported long-term
@@ -300,6 +302,43 @@ Here `acme:s3-client` can make outbound HTTPS calls to the parent's allowed host
300
302
301
303
For the full list of configuration keys you can inherit and how they map to WIT interfaces, see the [Spin docs on component dependencies](https://spinframework.dev/v4/writing-apps#using-component-dependencies).
302
304
305
+
## Targeting a deployment environment
306
+
307
+
Some Spin platforms ship custom templates and plugins tailored to that platform, for example, templates that use only the APIs available in the platform, plus the deployment plugin you need to ship to it. Spin 4.0 makes targeting one of these environments a single step with the new `-E` flag:
308
+
309
+
```bash
310
+
$ spin new -E <environment>
311
+
```
312
+
313
+
You don't need to pre-install anything: Spin fetches the environment's templates on demand, and installs any plugins the environment requires (typically a deployment plugin) at the same time. Your platform's documentation will tell you the `environment` name to use.
314
+
315
+
The same `-E` flag works when managing plugins directly, so you can list or install just the plugins associated with an environment:
316
+
317
+
```bash
318
+
$ spin plugins list -E <environment>
319
+
$ spin plugins install -E <environment>
320
+
```
321
+
322
+
Learn more in the docs on [creating an application for a specific deployment environment](https://spinframework.dev/v4/writing-apps#creating-an-application-for-a-specific-deployment-environment) and [installing plugins for a specific deployment environment](https://spinframework.dev/v4/managing-plugins#installing-plugins-for-a-specific-deployment-environment).
323
+
324
+
## Shell completions
325
+
326
+
Spin 4.0 can now generate shell command completions for bash and zsh. To enable them, run the following during shell startup (for example, in your `.bashrc`):
Shell completions are a work in progress, and have a few known limitations:
335
+
336
+
- You do not get trigger option completions in `spin up` (which, unfortunately, includes a lot of options).
337
+
- You do not get `spin up` option completions on `spin build --up` or `spin watch`.
338
+
- You do not get completions for plugin commands.
339
+
340
+
See the [installation docs](https://spinframework.dev/v4/install#shell-completions) for more detail.
341
+
303
342
## Upgrading to Spin 4.0
304
343
305
344
1.**Install Spin 4.0** from [spinframework.dev/install](https://spinframework.dev/install) or grab a binary from the [release page](https://github.com/spinframework/spin/releases/tag/v4.0.0).
0 commit comments