docs(templates): reorganize Rust templates and add HTTP handler set#5084
Merged
Conversation
ricochet
reviewed
Apr 28, 2026
ericgregory
added a commit
to ericgregory/wasmcloud.com
that referenced
this pull request
Apr 29, 2026
Tracks the template renames in wasmCloud/wasmCloud#5084: http-service becomes http-handler and http-kv-service becomes http-kv-handler. The "service" suffix collided with wasmCloud's defined notion of a service (a long-running, stateful Wasm binary), and these are stateless HTTP-handler components. "handler" matches the WIT export name (wasi:http/incoming-handler). Updates the Rust index.mdx routing example link and every reference in key-value-storage.mdx (template path, world name, package name, and the template URL). TypeScript template renames and TS doc updates are tracked as a follow-up in wasmCloud/typescript. Signed-off-by: Eric Gregory <eric@cosmonic.com>
- Move examples/http-hello-world to templates/http-hello-world - Move examples/key-value to templates/http-kv-service (rename package and WIT world for parity with TypeScript naming) - Add templates/http-client (outgoing HTTP via wstd::http::Client) - Add templates/http-service (axum routing via wstd-axum) - Add templates/http-blobstore-service (blob storage backed by wasi:blobstore) - Update templates/README.md and root README to reference new paths Brings Rust template coverage to parity with the TypeScript template set (http-hello-world, http-client, http-service, http-kv-service, http-blobstore-service). Signed-off-by: Eric Gregory <eric@cosmonic.com>
Removes the http-blobstore-service template introduced in the prior commit. The template code follows the canonical wasi:blobstore pattern and exposes a working CRUD surface, but every PUT against wash dev's in-process blobstore plugin fails with StreamError::Closed. The host closes the output stream before the guest can write into it. This is a known runtime issue that has a fix pending upstream (see fix/blobby-finish-upload-stream). Re-add the template once that fix lands so users get a template that works against stock wash dev. Signed-off-by: Eric Gregory <eric@cosmonic.com>
Rewrite the four Rust template READMEs to match the structure and linking conventions established in templates in the wasmCloud/typescript repository: title format, reference-style links throughout (including all prerequisites), Local development section with wash new + cd + dev loop, endpoints table, build section, and WIT interfaces section. Signed-off-by: Eric Gregory <eric@cosmonic.com>
The selective with: { types, consumer } form fails to build with current
wit-bindgen versions, which require every interface in the world (including
the exported handler) to be enumerated. generate_all is equivalent and
keeps the binding generation working as wit-bindgen evolves.
Signed-off-by: Eric Gregory <eric@cosmonic.com>
The "service" suffix collides with wasmCloud's defined notion of a service: a long-running, stateful Wasm binary that acts as localhost within a workload boundary. The HTTP-component templates affected here are stateless components, not services. Rename to "handler" to better reflect their relationship to wasi:http/incoming-handler: - templates/http-service -> templates/http-handler - templates/http-kv-service -> templates/http-kv-handler Updates Cargo package names, .wash/config.yaml component_path entries, WIT package and world names, READMEs, and the templates/README.md table accordingly. Both templates rebuilt and exercised end-to-end under wash dev. The service-tcp template keeps its name; it is an actual wasmCloud service. A follow-up will rename the corresponding TypeScript templates in wasmCloud/typescript and update the docs that reference them. Signed-off-by: Eric Gregory <eric@cosmonic.com>
3c60716 to
f41120f
Compare
ricochet
approved these changes
Apr 30, 2026
ricochet
pushed a commit
to wasmCloud/wasmcloud.com
that referenced
this pull request
May 4, 2026
Brings the Rust language support docs up to parity with TypeScript:
- New interface walkthroughs under language-support/rust/:
- key-value-storage.mdx: wasi:keyvalue via wit-bindgen, with the
hybrid wstd + wit-bindgen pattern documented
- messaging.mdx: wasmcloud:messaging across two components, mirroring
the http-api-with-distributed-workloads template
- filesystem.mdx: wasi:filesystem with preopens, using the wstd-bundled
bindings and a wstd-axum file-server example
- configuration.mdx: wasi:cli/environment for ConfigMaps, Secrets,
and inline values
- rust/index.mdx: new "Async runtime: when to use wstd vs tokio"
section with a decision rule, WIT-import diff showing why tokio's
runtime should not own an HTTP-export component, and notes on the
passive-utility pattern for tokio sync primitives. Updates the
transitional-library callout to reflect tokio 1.51's wasip2 socket
support, and adds a wstd-axum routing subsection.
- sidebars.js: render the four new Rust pages in a Rust Language
Guide category mirroring TypeScript.
- Update docs that reference the old examples/http-hello-world path
(now templates/http-hello-world after the wasmCloud reorg in
wasmCloud/wasmCloud#5084): quickstart, wash index, developer guide,
installation, kubernetes-operator index, examples, overview/workloads.
Signed-off-by: Eric Gregory <eric@cosmonic.com>
ricochet
pushed a commit
to wasmCloud/wasmcloud.com
that referenced
this pull request
May 4, 2026
Tracks the template renames in wasmCloud/wasmCloud#5084: http-service becomes http-handler and http-kv-service becomes http-kv-handler. The "service" suffix collided with wasmCloud's defined notion of a service (a long-running, stateful Wasm binary), and these are stateless HTTP-handler components. "handler" matches the WIT export name (wasi:http/incoming-handler). Updates the Rust index.mdx routing example link and every reference in key-value-storage.mdx (template path, world name, package name, and the template URL). TypeScript template renames and TS doc updates are tracked as a follow-up in wasmCloud/typescript. Signed-off-by: Eric Gregory <eric@cosmonic.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.
examples/http-hello-worldtotemplates/http-hello-worldexamples/key-valuetotemplates/http-kv-handler(Cargo package and WIT world renamed for parity with TypeScript naming; defaultBACKENDcorrected toin_memoryto match the README)templates/http-clientfor outgoing HTTP viawstd::http::Clienttemplates/http-handlerfor HTTP routing withaxumviawstd-axumtemplates/README.mdand rootREADME.mdto reference the new pathsBrings Rust template coverage closer to parity with the TypeScript template set. Each template was verified end-to-end with
wash devagainstwash 2.0.4.