Cargo & manifest conventions
Layout
- Workspace (
resolver=3), one member:mehari/.mehari-python/is excluded (own[workspace]stub +Cargo.lock) — never add it to rootmembers. See python-bindings.
Commands
- Build
cargo build· testcargo test/cargo test --all-features· formatcargo fmt(checkcargo fmt -- --check) · lintcargo clippy --workspace --all-features· coveragecargo llvm-cov --all-features --workspace. - Run the binary:
cargo run -p mehari --bin mehari -- <args>. - Requires
protoc,clang+ systemlibsqlite3-dev.
Features
default = ["jemalloc", "server", "wasm"].servergates actix/utoipa (+annonars/server);jemallocthe allocator;wasmWebAssembly plugins (wasmtime 48 LTS);dhat-heapheap profiling;documentationdoc includes.
Manifest (TOML) conventions
- Keep
[dependencies]alphabetically ordered (match existing). - Use
workspace = trueinheritance where the workspace defines a dep; otherwise follow existing style. .cargo/config.tomlsets a thumbv7em linker — don't remove/break it. Don't setROCKSDB_LIB_DIR/SNAPPY_LIB_DIRthere: builds use the bundled RocksDB.- release-please owns the
versionfield — don't bump by hand. Thesync-lockfilesworkflow keeps root andmehari-python/Cargo.lockaligned on release PRs.
Trap
mehari/src/db/transcripts/create/build.rsis a regular module named build.rs, NOT a Cargo build script. The real build script ismehari/build.rs.