Conversation
src/wasm.almd now runs api.step to the end like the native host, calling the hooks store_get / store_put directly. The build marks them --async-import (almide/almide#3353, branch fix-3353), so the generated JS suspends the module through JSPI while each KV / Cloud Storage call settles. Only serve returns a Promise; handle stays synchronous. adapters/store.mjs (was step.mjs) binds the hooks to a store and no longer runs the step loop. Verified locally (npm test 158/158, local workerd 29/29) and on the deployed Worker with a fresh KV namespace (29/29), then deleted. Needs an Almide build with --async-import until it is released; Node 24+. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Google's nodejs24 runtime is Node 24.19.0, which has no JSPI, so the generated init() refused every request there. JSPI is on by default from Node 24.20.0. Terraform gains var.runtime and deploy.sh GCP_BASE_IMAGE (both default nodejs24); on nodejs26 (beta, 26.7.0) the function passed 18/18, the /notes scenario 11/11, and Almide wrote the bucket itself. CI moves to Node 24.21.0 and engines to >=24.20.0. Reported the version guidance as almide/almide#3362. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 4, 2026
Almide #3371 replaced the build flag with a marker on the extern before v0.67.0-rc1 was tagged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
On the Wasm routes (Workers, the Node function adapters), Almide used to return
step's reads and write to the JS host, and the host carried them out (adapters/step.mjs). Now Almide makes the storage calls itself, the same way the native host does:src/wasm.almdrunsapi.stepto the end and calls two hooks,store_get/store_put. In Almide they are ordinary functions.--async-import store_get,store_put(--host js: async @extern via JSPI so Almide code can await JS I/O (prototype works on Node, workerd and the Cloudflare edge) almide#3353). The generated JS suspends the module through JSPI while each KV / Cloud Storage promise settles.servereturns a Promise.handle(no storage) stays synchronous.adapters/store.mjs(wasstep.mjs) only binds each hook to one store call. It also runs oneserveat a time, so a suspended call cannot see another request's store.Verification (2026-10-04)
Compiler: Almide
fix-3353at e9eb4bb90, built locally and passed asALMIDE_BIN.npm test: 158/158 on Node 24.21.0POST /notes: all 20 stored.wrangler tailshowed 22 requests, allok, and 0 exceptions.POST /notesacross isolates kept only 5. This is the existing single-key read-modify-write limitation, now measured; this change does not affect it.GCS_BUCKET, via Terraform, in a disposable project (deleted afterwards), tested from a private in-VPC VM:nodejs24runtime, every request answered 500. Google's image is Node 24.19.0, and JSPI is only on by default from 24.20.0; the generatedinit()refused with its JSPI message.var.runtime/GCP_BASE_IMAGE(defaultnodejs24) and re-applied withnodejs26(beta, 26.7.0). Results: 18/18 octet-stream,/notes11/11, JSON showed the same 3 known framework rejections, and 403 without a token.store_put.storage_unavailableafter GCS answered 429 to rapid writes of one object, and Almide logged that itself.enginesis now>=24.20.0.Draft until Almide ships
--async-importThe pinned v0.66.0 release does not have the flag, so CI fails on this branch until a release includes almide/almide#3353. Then
.almide-releaseand the checksums need bumping.Found along the way:
pub" for an unmarkedfn; the actual fix islocal fn.🤖 Generated with Claude Code