Spume is a small Rust library that lets a program talk to the Solana blockchain. Solana is a cryptocurrency network, and its servers expose a remote interface called JSON-RPC, which is the standard way for outside code to ask questions like the current block number or the balance of an account. The README describes spume as lightweight and ergonomic, and it is built specifically for wasm, which is the format used to run compiled code inside a web browser or a similar sandboxed runtime. There are two ways to use it. The basic mode talks to Solana over plain HTTP, where the client sends a request and waits for a single answer. A typical call creates a WasmClient pointed at a Solana endpoint, then asks for things like the current slot, the node version, the latest blockhash, or the balance of a specific address. The README lists src/methods.rs as the place to find every method that is supported. The second mode is optional and is turned on with a feature flag called pubsub. This mode opens a WebSocket connection, which is a long-lived two-way channel, and lets the program subscribe to a stream of updates. The README lists subscriptions for account, block, logs, program, root, signature, slot, slotsUpdates, and vote. A subscription can be cancelled explicitly, or it will be cancelled on a best-effort basis when the subscription value is dropped. There is one safety detail called out in the README. HTTP responses are capped at 10 MiB by default so that a broken or hostile server cannot fill memory with a huge response. The cap can be raised with a builder method if a specific call, such as fetching all accounts owned by a program, needs more room. The repository includes a small example written with the Leptos web framework that streams the live devnet slot over WebSocket and reads the node version over HTTP. The development section mentions just, clippy, rustfmt, and a local Solana simulator called surfpool that the test recipe spins up and tears down.
Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.