forgedb build

Validate, regenerate, and compile production-ready ForgeDB artifacts for native or WASM targets.

Produce production artifacts end to end: validate the schema, regenerate the code (baking the [runtime]/[storage] config from forgedb.toml into the output), then compile. build always regenerates with force, so a repeated build never fails on existing files.

Synopsis#

forgedb build [--release] [--target <native|wasm|both>] [--output <DIR>] [--schema <PATH>] [--no-api]

Flags#

FlagType / defaultMeaning
--releasebool (true)Build with optimizations. On by default.
-t, --target <T>string (native)Compile target: native, wasm, or both.
-o, --output <DIR>string ([generate].output, else generated)Output directory for generated code.
--schema <PATH>string (auto-discover)Schema file path.
--no-apibool (false)Skip API generation — generate only rust, the node --sdk TypeScript SDK, and stubs.

build = validate + generate + compile

build first runs a syntax-only validation, then generates (all, or the reduced set with --no-api), then compiles the chosen target. The generate step honors the same config knobs as generate.

Examples#

Build the native release artifacts:

forgedb build

Build both native and WASM:

forgedb build --target both

Build without the REST API server:

forgedb build --no-api

Search documentation

Find pages across the ForgeDB docs