Skip to content
Documentation
1.0.0-beta.9 · exact release

Opaque binary proxy

Source fda16de1b352 · Published v1.0.0-beta.9

Returns an origin response directly. The binary or streaming body stays host-owned and is never decoded or copied into user scope.

Terminal window
pulse doctor
pulse inspect
pulse test
pulse dev
pulse build

The documented test result below is executed by the documentation gate.

Terminal window
pulse test --json
{
"status": "passed",
"provider": "fastly",
"summary": {
"total": 1,
"passed": 1,
"failed": 0
},
"cases": [
{
"name": "pass-through",
"status": "passed",
"response": {
"status": 206
}
}
]
}

Fastly builds produce a verified .pulse-docs-build/bin/main.wasm. Configured tests execute through the local-conformance runtime; compiled-target execution remains in the explicit reality profile.

ArtifactDefault build--experimental-native-sizeReduction
canonical-native.wasm2.3 KiB (2,304 bytes)2.2 KiB (2,205 bytes)4.3%
bin/main.wasm39.3 KiB (40,291 bytes)32.4 KiB (33,191 bytes)17.6%

The executable documentation gate rebuilds and measures both variants from this checkout. The provider artifact includes the Fastly header, transport recovery, and fetch deadline fixes. These are uncompressed on-disk sizes, not transfer sizes or platform limits.

import { Pulse } from '@pulse-compute/pulse'
const app = new Pulse({ auto: true })
app.get('/archive', async (ctx) => {
return ctx.fetch('https://assets.example.com/archive.bin')
})
export default app
import { defineConfig } from '@pulse-compute/pulse'
export default defineConfig((_scope) => ({
pulse: {
entry: 'src/index.ts',
tests: 'tests/pulse.harness.ts',
defaultProfile: 'local',
strict: true,
},
local: {
host: 'fastly',
target: 'native',
outDir: 'dist',
dev: {
fetches: {
'https://assets.example.com/archive.bin': {
opaque: true,
status: 206,
headers: [
['content-type', 'application/octet-stream'],
['x-part', 'one'],
['x-part', 'two'],
],
chunks: ['opaque-example'],
},
},
},
fastly: {
bindings: {
backends: {
'https://assets.example.com': 'assets_backend',
},
dynamicBackends: false,
},
build: { name: 'pulse-opaque-proxy-example' },
},
},
}))
export default {
cases: [
{
name: 'pass-through',
request: { path: '/archive' },
fetches: {
'https://assets.example.com/archive.bin': {
opaque: true,
status: 206,
headers: [
['content-type', 'application/octet-stream'],
['x-part', 'one'],
['x-part', 'two'],
],
chunks: ['opaque-example'],
},
},
expect: {
status: 206,
bodyClass: 'opaque',
headers: { 'x-part': ['one', 'two'] },
},
},
],
}