Building and targets
The four targets
corvid build src/main.cor # default: nativecorvid build src/main.cor --target=nativecorvid build src/main.cor --target=wasmcorvid build src/main.cor --target=servercorvid build src/main.cor --target=cdylibNative
A standalone binary you can drop on a server. Cranelift backend. Cross-compiles via the standard rustc/cargo toolchain.
corvid build src/main.cor --target=native --optimize=releasels target/release/main # the binaryWASM
A WASM module for the browser, edge runtimes, or any wasmtime/
wasmer host. Bare (ptr, len) UTF-8 ABI for strings; multi-value
returns for struct returns.
corvid build src/main.cor --target=wasmls target/wasm32-unknown-unknown/release/main.wasmThe website’s playground uses this target. Host-mediated for filesystem and network. See WASM target.
Server
A rendered axum 0.7 backend binary with the full middleware pipeline
(auth, rate-limit, tracing, CORS, compression, request logging),
graceful shutdown, handler-isolation timeout, body-limit, and
/healthz//readyz//metrics endpoints. Generated as a Cargo
project; the user owns the project, Corvid owns the shape.
corvid build src/main.cor --target=servercd target/servercargo run # compiles to a production-shape binarySee Backend for routes/middleware/etc.
cdylib
A C-callable shared library. The signed-build path produces a
DSSE-attested cdylib with embedded CORVID_ABI_DESCRIPTOR that
corvid-abi-verify cross-checks against the source.
corvid build src/lib.cor --target=cdylib --signls target/cdylib/libmy_app.{so,dylib,dll}For C consumers the C header is generated with:
corvid generate c-header src/lib.corSee FFI: C/Rust.
Build flags
| Flag | Purpose |
|---|---|
--target=<t> | native | wasm | server | cdylib |
--optimize=<o> | debug | release |
--sign | produce a DSSE-signed artifact + receipts |
--out-dir=<d> | override default target/ |
--check-only | typecheck without codegen (alias: corvid check) |
--manifest=<f> | use a non-default corvid.toml |
Reproducible builds
corvid build src/main.cor --target=native --reproduciblePins the timestamp, embedded paths, and codegen-RNG seed for byte-stable outputs. Verifies via:
sha256sum target/release/main# expect: matches the published hash for this versionPhase 22’s bundle format ships every reproducible build with a
MANIFEST.toml of inputs (source SHAs, dep tree, toolchain).