- Project scope: Maintain
@tevm/compiler, a Rust + N-API compiler bridge consumed from Node.js/Bun. Core exports live inlibs/compiler/build/index.{js,d.ts}after running the Nx build. - Workspace layout: Use
pnpm nx graph --focus=compilerto visualise dependencies. The only active project islibs/compiler, but tests depend on fixtures underlibs/compiler/test/fixtures. - Environment: Node 18+, pnpm 9+, Bun 1.1+, Rust stable. Solc binaries must exist in Foundry's
svmcache (Compiler.installSolcVersion) before specs are executed. Vyper workflows require thevyperCLI onPATH. - Common commands:
- Install deps:
pnpm install - Build bindings:
pnpm nx run compiler:build - Post-build (copies
.d.ts, type-checks, regenerates docs):pnpm nx run compiler:post-build - Test suites:
pnpm nx run compiler:test, or the targeted variants:test:rust,:test:js,:test:typecheck - Formatting/linting:
pnpm nx run compiler:format,pnpm nx run compiler:lint - Build, lint, test:
pnpm all
- Install deps:
- Change workflow: Prefer editing Rust + TypeScript in tandem so the generated
.d.tsstays truthful. Every new feature needs regression coverage in Bun specs or TS type tests. Keep error messages descriptive—CLI users read them directly. - Gotchas: Avoid editing files in
libs/compiler/build/**; they are short-lived and auto-generated.