Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Responds with JSON data from a wasmCloud actor.
# wasmcloud/demo/json.rs
use wasmcloud_actor_core::prelude::*;
use wasmcloud_actor_http_server::prelude::*;
use serde_json::json;
#[actor::init]
pub fn init() {}
#[actor::handler]
pub fn handle(_req: Request) -> HandlerResult<Response> {
let body = json!({"message": "Hello JSON!"}).to_string();
Ok(Response::ok().body(&body).with_header("Content-Type", "application/json"))
}WasmCloud is a distributed, actor-based framework for building cloud-native applications using WebAssembly (Wasm), enabling secure, portable, and scalable microservices across heterogeneous environments.
Origin & Creator
WasmCloud was created by WasmCloud Inc. (originally Cosmonic) in 2019 to enable cloud-native applications with WebAssembly actors.
Industrial Note
WasmCloud targets developers building microservices that require cross-platform portability, security isolation, and high scalability without vendor lock-in.