Skip to content

Spin 4.0#183

Merged
itowlson merged 35 commits into
spinframework:mainfrom
itowlson:spin-4.0
Apr 10, 2026
Merged

Spin 4.0#183
itowlson merged 35 commits into
spinframework:mainfrom
itowlson:spin-4.0

Conversation

@itowlson

@itowlson itowlson commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

Work in progress! I've put the initial "fork all the things" stuff in the initial commit so in principle you can review the boilerplate for boilerplatey things and the content changes for actual content separately, but I dunno, maybe I should make two separate PRs, anyway, v4, WIP.

File Changes Status (I think)
api-guides-overview.md Noted asyncness - need to confirm which APIs we are asyncifying this is looking settled, revisit if it changes Completed
build.md Build profiles - added Completed
cache.md None Completed
cli-reference.md Regenerate when Spin 4 stabilises Pending v4 readiness
contributing-docs.md None Completed
contributing-spin.md None Completed
deploying.md Remove Fermyon Cloud Completed
distributing-apps.md Build profiles - added Completed
dynamic-configuration.md None Completed
extending-and-embedding.md None Completed
go-components.md Go SDK WIP, wrote up inbound HTTP but foundered on outbound and other stuff Started
http-outbound.md http_service-fied Rust. Streaming outbound reqs/resps in Rust - done (check once SDK lands). TODO: Go, JS, Python. Started
http-trigger.md Instance reuse - added. http_service - added. Started
index.md None Completed
install.md None Completed
javascript-components.md TBA
kv-store-api-guide.md Asyncified Rust. TODO: JS, Python, Go Started
language-support-overview.md No changes Completed
managing-plugins.md None Completed
managing-templates.md None Completed
manifest-reference.md Build profiles - added Completed
mqtt-outbound.md Asyncified Rust. TODO: JS, Python, Go Started
observing-apps.md None I think (wasi-http isn't asyncified yet) Completed
other-languages.md No v4-related changes although we should look at this for retirement or for Kotlining Completed
plugin-authoring.md None Completed
python-components.md TBA
quickstart.md Removed Fermyon Cloud stuff (do we want to talk more about deploying here? I added a link to the deployment options page). Asyncified Rust. TODO: JS, Python, Go. Started
rdbms-storage.md PG only is now async/streaming Completed
redis-outbound.md Asyncified Rust. TODO: JS, Python, Go Started
redis-trigger.md Async entry point, renamed Rust attribute. TODO: Python, Go SDKs (JS doesn't do Redis) Started
running-apps.md Nothing to do here? Completed
rust-components.md Asyncified, derouterised, de-http-crated. Need to verify that the SDK accepts borrows but basically Completed
see-what-people-have-built-with-spin.md None Completed
serverless-ai-api-guide.md Asyncify HTTP context stuff, no change to LLM API. Done for Rust. TODO: JS, Python, Go Started
spin-application-structure.md Changed http_component to http_service. Revisited example responses. Completed
sqlite-api-guide.md Asyncified Rust HTTP bits. Need to nail down wrappers. TODO: JS, Go, Python Started
template-authoring.md None Completed
testing-apps.md We believe this doesn't work with P3. Removing for now Done
triggers.md I don't think there are any changes here Completed
troubleshooting-application-dev.md Remove spin test reference until we can work on that Done
upgrade.md None Completed
variables.md Async, http_service, response guff: Rust done. TODO: JS, Go, Python Started
writing-apps.md Just some asyncifying I think Completed

General things:

  • Updated remaining wasm32-wasip1 to wasm32-wasip2
  • TODO: Change TinyGo titles/references to BigGo (TBC)
  • Cover off bindgen-level futures and stream APIs - done for Rust, awaiting more info for other langs

Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
…ne too

Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
@itowlson itowlson force-pushed the spin-4.0 branch 2 times, most recently from 5ffd849 to c0532c7 Compare March 26, 2026 03:31
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
…sorry

Signed-off-by: itowlson <ivan.towlson@fermyon.com>
@itowlson

Copy link
Copy Markdown
Contributor Author

@fibonacci1729 I think this is about as ready as I can get it for now - still have Go/JS/Python changes to make once those are ready, and a few possible changes to the Rust SDK as we discussed. Let me know if you see / can think of anything else that needs to change!

Signed-off-by: itowlson <ivan.towlson@fermyon.com>
itowlson added 2 commits April 2, 2026 10:08
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Comment thread templates/main.hbs Outdated
<select class="version-dropdown"
onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);">
<option value="/v3/index">Spin v3.x</option>
<option value="/v4/index">Spin v4.x</option>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be <option value="/v4/index" {{#if (active_project request.spin-full-url "/v4/" )}} selected {{/if}}>Spin v4.x</option>?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I am not sure. I believe I followed the v3 pattern here because I assumed this was how we did "default selection". @karthik2804 do you know what this should look like?

(Thinking about it... if we left v3 as default and marked this as "v4.x (preview)" then we could potentially land this in main already and just rev it to default once v4 is out.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to remind myself of how this works. I will take a look tomorrow morning.

Comment thread templates/sidebar_v4.hbs Outdated
<a {{#if (active_project request.spin-full-url "/v4/triggers" )}} class="active" {{/if}} href="{{site.info.base_url}}/v4/triggers">Overview</a>
<a {{#if (active_project request.spin-full-url "/v4/http-trigger" )}} class="active" {{/if}} href="{{site.info.base_url}}/v4/http-trigger"> HTTP Trigger</a>
<a {{#if (active_project request.spin-full-url "/v4/redis-trigger" )}} class="active" {{/if}} href="{{site.info.base_url}}/v4/redis-trigger"> Redis Trigger</a>
<a {{#if (active_project request.spin-full-url "/v4/redis-trigger" )}} class="active" {{/if}} href="{{site.info.base_url}}/v4/triggers#cron-trigger">Cron Trigger</a>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<a {{#if (active_project request.spin-full-url "/v4/redis-trigger" )}} class="active" {{/if}} href="{{site.info.base_url}}/v4/triggers#cron-trigger">Cron Trigger</a>
<a {{#if (active_project request.spin-full-url "/v4/cron-trigger" )}} class="active" {{/if}} href="{{site.info.base_url}}/v4/triggers#cron-trigger">Cron Trigger</a>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, this (copied from v3) is clearly wrong, but there isn't a cron-trigger page, only a triggers page, and that is associated with the Overview TOC item. I guess I will have two checks for the triggers page rather than two checks for the redis-trigger page because that is at least less wrong. Something to reassess after v4.

Comment thread content/v4/serverless-ai-api-guide.md Outdated
Comment thread content/v4/running-apps.md Outdated
Comment thread content/v4/running-apps.md Outdated
Comment thread content/v4/http-outbound.md Outdated

### Configuration-Based Permissions

You can use [application variables](./variables.md#adding-variables-to-your-applications) in the `allowed_outbound_hosts` field. However, this feature is not yet available on Fermyon Cloud.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another question about mentioning fermyon cloud.

Comment thread content/v4/api-guides-overview.md Outdated
Comment thread content/v4/http-trigger.md Outdated
Comment thread content/v4/http-trigger.md Outdated

* `--max-instance-reuse-count` sets the maximum number of times a single instance can be reused
* `--max-instance-concurrent-reuse-count` sets the maximum number of requests that can be running in a single instance at the same time
* `--idle-instance-timeout` controls how long Spin will allow a reusable instance to be sit idle before evicting it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `--idle-instance-timeout` controls how long Spin will allow a reusable instance to be sit idle before evicting it
* `--idle-instance-timeout` controls how long Spin will allow a reusable instance to sit idle before evicting it

@fibonacci1729

Copy link
Copy Markdown
Contributor

Overall looking great! Instead of commenting individually:

Several v4 pages still mention "Fermyon Cloud" or "not yet available on Fermyon Cloud." Since deploying.md had Fermyon Cloud removed, these residual references should likely be removed or rewritten as well:

File Line Content
content/v4/http-outbound.md 264 "However, this feature is not yet available on Fermyon Cloud."
content/v4/http-outbound.md 299 "Local service chaining is not currently supported on Fermyon Cloud."
content/v4/redis-outbound.md 184 "However, this feature is not yet available on Fermyon Cloud."
content/v4/redis-trigger.md 22 "The Redis trigger is not yet available in Fermyon Cloud."
content/v4/mqtt-outbound.md 108 "However, this feature is not yet available on Fermyon Cloud."
content/v4/rdbms-storage.md 266 "However, this feature is not yet available on Fermyon Cloud."
content/v4/manifest-reference.md 66 "Manifest expressions are not yet supported on Fermyon Cloud."
content/v4/serverless-ai-api-guide.md 259 "Use the cloud-gpu plugin and runtime config option to have LLM inferencing serviced in Fermyon Cloud instead of locally." (also links to serverless-ai-hello-world.md which doesn't exist in v4)

Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: Vaughn Dice <vdice@akamai.com>
@vdice

vdice commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

@itowlson I created a PR on your fork with this branch as its base adding updates to the Py code snippets/links/etc: itowlson#1

vdice and others added 4 commits April 9, 2026 11:31
Co-authored-by: itowlson <github@hestia.cc>
Signed-off-by: Vaughn Dice <vdice@akamai.com>
Signed-off-by: Vaughn Dice <vdice@akamai.com>
Signed-off-by: Vaughn Dice <vdice@akamai.com>
docs(v4): update Python code snippets/links/details
@itowlson itowlson marked this pull request as ready for review April 10, 2026 01:46
@itowlson itowlson requested review from fibonacci1729 and vdice April 10, 2026 01:47
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
@itowlson

Copy link
Copy Markdown
Contributor Author

@fibonacci1729 @vdice I have set this so it continues to default to v3, and has v4 Preview as an option. This means that we can, if we want, merge this as is. This would allow me to re-enable some of the link checks and fix the inevitable mistakes, and would mean folks wanting to kick tyres on canary have something to refer to. Then when we want to swap over it will be a 2-line change instead of this beast.

@itowlson itowlson merged commit 0e6d7a4 into spinframework:main Apr 10, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants