Build a Rust backend module
Compile Rust source with the managed offline toolchain and BlinkHost SDK 1.0.
Last updated 2026-08-07
What you'll achieve
- Read an edge request safely
- Return a structured response
- Use explicit host capabilities through SDK 1.0
Create the module
Open the project's Backend area, choose Create module, select Rust (WASI), and enter a unique module name. BlinkHost creates managed source under _server_islands and records the blinkhost-wasi-1 ABI.
use blinkhost_sdk::{respond, Response};
fn main() {
if respond(Response::json(
200,
r#"{"message":"Hello from BlinkHost Rust"}"#,
))
.is_err()
{
std::process::abort();
}
}
Expected result: the module returns status 200, a JSON content type, and {"message":"Hello from BlinkHost Rust"}.
Use the SDK
The pinned Rust SDK exposes request reading, structured responses, named database queries, write-only secret lookup, Argon2 hashing, bounded outbound fetch, and structured logging. Build images are network denied; dependencies must be available through the supported offline toolchain.
Build and publish
Choose Build and inspect the sanitized build log. A successful compiler process is not enough: BlinkHost also validates and signs the artifact. Select Use artifact, preview where supported, then deploy the project. Verify the module artifact digest on the deployment record.
If Build is disabled, the verified language rollout has not reached this workspace. Do not work around the rollout boundary.
Help improve this page
Sign in to send page-specific feedback. For account-specific help, email support@blinkhost.me.