|
| 1 | +# Documentation Guide |
| 2 | + |
| 3 | +This directory contains the operator, developer, and design documentation for |
| 4 | +vmod-wasm. The project targets Varnish 9.x with Wasmtime 44.0.0, so the docs |
| 5 | +assume that release contract unless a section says otherwise. |
| 6 | + |
| 7 | +## Start Here |
| 8 | + |
| 9 | +- Read [Production Deployment](PRODUCTION.md) when deciding how to install, |
| 10 | + constrain, monitor, reload, and roll back vmod-wasm in front of real traffic. |
| 11 | +- Read [Development Guide](DEVELOPMENT.md) when writing or adapting a |
| 12 | + Proxy-Wasm module for Varnish. |
| 13 | +- Read [Proxy-Wasm Compatibility](COMPATIBILITY.md) before porting an existing |
| 14 | + filter from another Proxy-Wasm host. |
| 15 | +- Read [Configuration Reference](CONFIGURATION.md) when you need exact VCL |
| 16 | + function names, return values, defaults, and valid scopes. |
| 17 | + |
| 18 | +## Documents |
| 19 | + |
| 20 | +| Document | Use it for | |
| 21 | +|----------|------------| |
| 22 | +| [Production Deployment](PRODUCTION.md) | Release bundles, runtime limits, monitoring, VCL reloads, canaries, rollback, capacity planning | |
| 23 | +| [Development Guide](DEVELOPMENT.md) | Building Rust/Wasm modules, SDK callback shape, HTTP callouts, tests, debugging | |
| 24 | +| [Configuration Reference](CONFIGURATION.md) | Complete `wasm.*` VCL API reference with parameters, return values, and examples | |
| 25 | +| [Proxy-Wasm Compatibility](COMPATIBILITY.md) | ABI support matrix, properties, pseudo-headers, limitations | |
| 26 | +| [Architecture](ARCHITECTURE.md) | Engine lifetime, store pooling, HTTP callout flow, VDP response-body integration, file map | |
| 27 | +| [Security Model](SECURITY.md) | Sandbox boundaries, SSRF controls, module supply-chain guidance, incident response | |
| 28 | + |
| 29 | +## Example Modules |
| 30 | + |
| 31 | +The [`examples/`](../examples/) workspace contains small, focused modules that |
| 32 | +exercise the VMOD from VTC tests: |
| 33 | + |
| 34 | +- [`proxy-wasm-filter`](../examples/proxy-wasm-filter/) is the best starting |
| 35 | + point for a normal Rust `proxy-wasm` SDK module. |
| 36 | +- [`passthrough`](../examples/passthrough/) is a no-op lifecycle baseline. |
| 37 | +- [`transform`](../examples/transform/) shows a minimal response-header |
| 38 | + mutation. |
| 39 | +- [`rust`](../examples/rust/) demonstrates raw vmod-wasm host functions. |
| 40 | +- [`edge-security-filter`](../examples/edge-security-filter/) is a realistic |
| 41 | + reference fixture covering config, metrics, shared data, callouts, body |
| 42 | + callbacks, and local responses. |
| 43 | + |
| 44 | +For production edge-security deployments, use the standalone |
| 45 | +[vmod-wasm Edge Security Filter](https://github.com/RamazanKara/vmod-wasm-edge-security-filter) |
| 46 | +repository. The in-tree filter remains a fixture so vmod-wasm can test a |
| 47 | +realistic workload without depending on another repository during CI. |
| 48 | + |
| 49 | +## Release Checks |
| 50 | + |
| 51 | +Before promoting a release, the documentation and source distribution should |
| 52 | +survive the same checks as the code: |
| 53 | + |
| 54 | +```bash |
| 55 | +docker build -t vmod-wasm-ci . |
| 56 | +docker run --rm vmod-wasm-ci make check |
| 57 | +docker run --rm vmod-wasm-ci make distcheck DISTCHECK_CONFIGURE_FLAGS="--with-wasmtime=/opt/wasmtime" |
| 58 | +``` |
| 59 | + |
| 60 | +Use `make perf-test` for a short local throughput comparison and |
| 61 | +`make soak-test` for longer VCL reload, pooling, and sustained-traffic checks. |
0 commit comments