Toolchain#
The MuduDB toolchain is organized around building, packaging, deploying, and invoking procedure applications.
Tool overview#
Tool |
Purpose |
Typical usage |
|---|---|---|
|
The MuduDB server process. |
|
|
TCP client, interactive SQL shell, and HTTP management CLI. |
|
|
Source generator. Creates typed Rust entities from SQL DDL. |
|
|
Transpiler. Rewrites synchronous procedure source into async-compatible form for the WASM runtime. |
|
|
Project builder. Runs the Python build script declared in |
|
|
Package builder. Produces |
|
|
Project scaffolder. Creates a new |
|
|
MPK installer helper (also installable through |
|
|
Release installer. Downloads released binaries without building from source. |
|
Typical workflow#
Define schema: write
ddl.sqlfor your application tables.Generate types: run
mgento produce typedEntitystructs from the DDL.Write procedures: implement functions marked with
/**mudu-proc**/, usingsys_interface::sync_api.Transpile: run
mtpto convert blocking syscalls into async form for the component runtime.Build WASM: compile the transpiled source to a
wasm32-wasip2component that imports the host syscall interface and exports the procedure entry points.Package: run
mpm-build createto produce a.mpkfile.Install: run
mcli app-install --mpk <file>.mpkon the target server.Invoke: run
mcli app-invoke --app <app> --module <module> --proc <proc> --json '{...}'.
See Application Packages for the package format and Your First MPK Package for a complete walkthrough.
SQL checking#
mgen check-sql --lang rust --ddl sql/ddl.sql --input src/rust checks SQL literals against the DDL. It is included in the Rust Wallet package build. The language compiler checks Rust types; neither check replaces runtime validation. See SDKs and Execution Modes for the portable mpm build workflow and per-language requirements.