Development Setup
Prerequisites
Section titled “Prerequisites”| Tool | Minimum version | Purpose |
|---|---|---|
| Rust | 1.80 | Compiler and cargo |
| Zig | 0.15.2 | Zig FFI layer (md4c parser and SIMD acceleration) |
| Bun | latest | Docs site tooling |
| cargo-nextest | latest | Test runner |
| lefthook | latest | Pre-commit hooks |
Install cargo-nextest and lefthook if you don’t have them:
cargo install cargo-nextest --lockedbrew install lefthook # macOS; see lefthook.run for otherslefthook installClone and build
Section titled “Clone and build”git clone https://github.com/sethyanow/markymark.gitcd markymarkcargo buildFor a release-optimized build (slower compile, faster binary):
cargo build --releaseThe Zig FFI layer compiles automatically via build.rs. Zig 0.15.2+ is required for all
builds — the library is statically linked into the binary. The build will fail if Zig is
not installed or is below the minimum version.
Run tests
Section titled “Run tests”cargo nextest run # all testscargo nextest run -p markymark-core # single cratecargo nextest run -p markymark-index # integration tests live hereThe project uses cargo-nextest instead of cargo test for parallel execution and
better output. Integration tests live in each crate’s tests/ directory alongside unit tests
in source files (#[cfg(test)] modules).
Zig tests run separately:
cd zig && zig build testcargo fmt --all -- --check # formattingcargo clippy --workspace --all-targets -- -D warnings # lintscargo audit # dependency vulnerabilitiesAll three must pass before committing. The pre-commit hooks run these automatically.
Run locally
Section titled “Run locally”Start the LSP server (editors connect over stdin/stdout):
cargo run -- --lspStart the MCP server (AI agents connect over stdin/stdout):
cargo run -- --mcp /path/to/your/workspacePre-commit hooks
Section titled “Pre-commit hooks”The project uses lefthook to run checks before each commit. After cloning, install the hooks:
lefthook installThe hook sequence runs in order:
cargo fmt— formatting checkcargo clippy— lint with-D warningscargo-audit— dependency vulnerability scangitleaks— secret detection on staged fileszig build— Zig FFI layer compilation check
If a hook fails, the commit is blocked. Fix the issue and try again.
Build the docs site
Section titled “Build the docs site”cd docs-sitebun installbun run dev # local preview at localhost:4321bun run build # production build