Maintainer guide
Status: maintainer documentation for the MVP. It describes the repository as it is validated today; nothing here is a feature or platform claim beyond the support matrix.
1. Layout
Section titled “1. Layout”crates/sendust-core/ Rust core: validation, addressing, message model, MIME, caps, lifecycle, delivery, native SMTP clientcrates/sendust-napi/ Node-API adapter: owned copies, async Tokio, errorsts/src/ Runtime-neutral facade: transport, errors, results, limits, loaderts/test/ TypeScript contract and transport tests (Vitest)tests/ Rust integration suites, runtime smokes, docs samples, TLS fixturesexamples/ Runnable examples (Rust and Node.js)scripts/ Build, verification, and static checkersdocs/ Product, architecture, ADRs, engineering, QA, guidesRules that must hold:
- Exactly two Rust crates. The core has no Node linkage; the adapter depends
on the core, never the reverse.
scripts/check-architecture.mjsenforces it. - The TypeScript facade stays runtime-neutral. No static
node:imports outsidets/src/loader.ts; the loader is the only runtime-specific file. - Generated output is never edited.
ts/dist,artifacts/, andtarget/are build products.
2. Commands
Section titled “2. Commands”npm ci # install the workspace and its lockfilenpm run build:native # build the addon into ts/sendust.nodenpm run build --workspace ts # compile dist/ (ESM and CommonJS)npm --workspace ./ts run test # 61 TypeScript testsnpm run verify # addon, package, tests, smokes, artifact, # publish manifest, clean-consumer checksnpm run verify:platform # packed tarball under Node/Bun/Denonpm run prepare:publish # artifacts/publish/sendust-ts-*.tgzcargo test --workspace --locked # Rust unit and integration suitescargo fmt --all --checkcargo clippy --workspace --all-targets --locked -- -D warningsnode scripts/check-architecture.mjsnode scripts/check-docs.mjsnode scripts/check-doc-claims.mjs # guides vs code and forbidden claimsnode scripts/check-secrets.mjsRuntime smokes and doc samples:
node tests/runtime/smoke.mjs # the addon directlynode tests/runtime/facade.mjs # through the loadernode tests/runtime/behaviour.mjs # accepted/rejected/unknown/BUSY/close/limitsnode tests/docs/quickstart.mjs # the quick start guide's sampleBun and Deno run the same files with their own runtime; the exact pins are in the toolchain baseline.
3. Test harness and fixtures
Section titled “3. Test harness and fixtures”- Loopback only. Every SMTP and TLS test uses a local fake server; no test contacts a real relay or needs credentials.
- TLS fixtures live in
tests/fixtures/tls/:ca.crtplus valid, wrong-host, expired, self-signed, incomplete-chain, and malformed material. The facade tests trustca.crtthroughtlsRootCertificateand prove that a missing anchor fails closed. - Rust harness (
crates/sendust-core/tests/support) scripts replies and faults; its self-tests are part of the Rust suite. - No sleeps for sequencing. Tests wait on events (a connection gate) rather than sleeping; the descriptor probes allow a bounded settle instead of a fixed delay.
- Docs are executed.
tests/docs/quickstart.mjsruns the guide’s example, so a doc change that no longer matches the package fails CI.
4. What CI proves
Section titled “4. What CI proves”| Job | Proves |
|---|---|
| Rust workspace | Formatting, clippy, unit and integration suites, harness self-tests |
| TypeScript (Node 22/24/26) | Lint, format, typecheck, the Vitest suite |
| Native binding (Node 22) | Built addon, binding tests, GC probe, runtime smokes, doc sample |
| Native artifact (5 targets) | Native build and load, 61-test suite, tarball install with platform selection, Bun/Deno checks, behaviour harness, publish manifest |
| Architecture and documentation | Module boundaries, links, registry parity, doc claims, secrets |
| Bun/Deno entry points | The shared package imports and runs without native claims |
5. Documentation rules
Section titled “5. Documentation rules”docs/guides/is user-facing.docs/architecture/,docs/engineering/,docs/planning/, anddocs/qa/are the design and evidence record.- Every guide states what is not provided when the topic invites a wrong assumption (delivery claims, retries, pooling, SMTPUTF8, URL attachments).
node scripts/check-doc-claims.mjsfails when a guide names an unknown error code, drifts from the cap or timeout numbers in the code, promises delivery or automatic retries, or shows a send without an explicit close.- Keep the docs index row list in step with new files.
6. Release inputs
Section titled “6. Release inputs”Publication is P16/P17, not this phase. The inputs are:
npm run prepare:publish, the facade tarball whose manifest adds the five platformoptionalDependenciespinned to the facade version.artifacts/sendust-<platform>-<arch>[-<libc>].node, one per validated target.- Platform validation and the toolchain baseline, the support statement and exact pins.
CHANGELOG, version bump, and tag policy, owned by P16.
Adding a platform means: a native runner that can load the build, a row in the
matrix, a PLATFORM_PACKAGES entry in ts/src/loader.ts, coverage in the
selection check, and evidence in the validation report. Until then the platform
is unsupported and absent from publication inputs.
Every page here is rendered from fandyajpo/sendust@v1.2.1, the source of truth. We just make it look good; fixes go there, not here.