Pulse 1.0.0-beta.1 betaExact, immutable release documentation.Browse latest
Documentation platform maintainersactiveReviewed 2026-08-01Review by 2027-01-12

Canonical examples#

Every top-level example is a complete Pulse project with a handler, config, tests, TypeScript config, and package metadata. The executable documentation lane runs every example except 10 through doctor, inspect, test, and build; it also starts the hello project with dev, sends a request, and verifies shutdown. Example 10 uses its focused orchestration proof while ordinary package-loader and Native-intrinsic integration remain candidate blockers.

ExampleDemonstrates
01-hello-jsonRequest branching and JSON/text responses.
02-request-schemaExplicit request and response schemas.
03-fetch-compositionOne fetch, sequential composition, and explicit ctx.parallel concurrency.
05-fastly-capabilitiesConfig, secrets, KV, a named backend, and package-root GRIP broadcast.
07-opaque-proxyDirect binary/stream pass-through without body inspection.
09-router-loweringMounted routes, scoped terminal middleware, fallthrough, error transfer, parameters, wildcards, and entry-aware effects.
10-entities-toolsExperimental schema-bound entities, deterministic catalog discovery, JSON-RPC dispatch, and an external tools facade.
11-eventsStatic event ingress, schema/no-payload frames, exact outbound acceptance, and separate HTTP/event entries.
12-mcp-proxyA bounded JSON-RPC request seam and opaque upstream response pass-through.
13-jwt-es256ES256 bearer verification with an explicit guest-linked Native realization.

Wasm size at a glance#

The Native rows compare the ordinary build with pulse build --experimental-native-size. Values are uncompressed on-disk sizes; each example page includes exact byte counts.

ExampleDefault Native WasmSize-optimized Native WasmReductionDeployable Fastly module
01-hello-json2.2 KiB2.0 KiB7.0%
02-request-schema38.9 KiB30.8 KiB20.6%
03-fetch-composition5.0 KiB4.2 KiB15.0%
05-fastly-capabilities5.3 KiB4.8 KiB10.4%40.4 → 33.7 KiB
07-opaque-proxy2.1 KiB2.1 KiB4.5%28.9 → 25.3 KiB
09-router-lowering6.1 KiB5.4 KiB12.4%
10-entities-toolsNot applicableJavaScript-first candidate
11-events38.4 KiB30.6 KiB20.4%
12-mcp-proxy2.5 KiB2.4 KiB6.6%
13-jwt-es25623.1 KiB22.9 KiB0.8%

Run the normal workflow from any example directory:

pulse doctor
pulse test
pulse dev
pulse build

Use pulse inspect when you need to examine the plan; it is not required before build. Each example README contains exact source-bound handler/config blocks and executable evidence selected by the docs lane. Every page also records the default and experimental size-optimized Wasm outputs; Fastly pages separate the provider-neutral guest from the deployable module, and the JavaScript-first Entities page explicitly records that no comparable application Wasm is emitted. The same gate rebuilds and verifies every exact byte count. See Project lifecycle.

Examples 01, 02, 03, 05, 07, 11, 12, and 13 use current package-root application surfaces. Example 09 retains the lower-level Router surface. Example 10 uses the synchronized @pulse-compute/entities Beta package; executable examples do not themselves authorize publication. Example 11 is executable only through the Node JavaScript/Native reference adapter. It does not claim a public listener, delivery, or Fastly/browser/ESP32 event support; see Static events and outbound emission.

Example 12 is an MCP-shaped HTTP proxy, not an MCP server. The incoming body is materialized once as bounded text because Pulse has no opaque incoming-body forwarding contract; the fetched response remains opaque.

Example 13 pins the guest-linked ES256 realization for Native. Its harness executes valid, invalid-signature, and disallowed-algorithm cases against the exact linked artifact; only the public P-256 JWK is included in the example.

Verified native Fastly build#

This documented build is executed against the config/secret example and must produce the configured-provider native Fastly module. The portable compiler runs before the exact artifact crosses the provider boundary; the provider target receives no compiler service and does not invoke one.

pulse build --out .pulse-docs-build --json
{
  "status": "built",
  "provider": "fastly",
  "manifest": {
    "providerTarget": {
      "sourceOnly": false,
      "compiledWasmPresent": true,
      "target": "fastly-compute-native",
      "javascriptRuntime": false,
      "compiler": {
        "package": "assemblyscript",
        "version": "0.28.18",
        "invoked": false
      },
      "wasm": {
        "file": "bin/main.wasm",
        "magic": "0061736d01000000"
      }
    }
  }
}

Fastly configured tests and pulse dev use the local-conformance runtime. The separate reality profile delegates execution of the native provider module to fastly compute serve.

Browse other documentation