- Add @git.zone/tsrust with linux_amd64/linux_arm64 cross-compilation - Scaffold Rust workspace with 5 crates: mailer-core, mailer-smtp, mailer-security, mailer-napi, mailer-bin - Fix all TypeScript compilation errors for upgraded dependencies (smartfile v13, mailauth v4.13, smartproxy v23) - Replace smartfile.fs/memory with @push.rocks/smartfs throughout codebase - Fix .ts import extensions to .js for NodeNext module resolution - Update DKIMSignOptions usage to match mailauth v4.13 API - Add MTA error classes with permissive signatures for legacy SMTP client - Replace removed DcRouter/StorageManager/deliverability imports with local interfaces
26 lines
1.1 KiB
Markdown
26 lines
1.1 KiB
Markdown
# Project Hints
|
|
|
|
## Rust Workspace
|
|
- Rust code lives in `rust/` with a Cargo workspace
|
|
- Crates: `mailer-core`, `mailer-smtp`, `mailer-security`, `mailer-napi`, `mailer-bin`
|
|
- `mailer-bin` is the binary target that `tsrust` builds for cross-compilation
|
|
- `mailer-napi` is a cdylib for N-API bindings (not built by tsrust, needs separate napi-rs build pipeline)
|
|
- tsrust only supports binary targets (looks for `src/main.rs` or `[[bin]]` entries)
|
|
- Cross-compilation targets: `linux_amd64`, `linux_arm64` (configured in `npmextra.json`)
|
|
- Build output goes to `dist_rust/`
|
|
|
|
## Build
|
|
- `pnpm build` runs `tsbuild tsfolders && tsrust`
|
|
- Note: `tsbuild tsfolders` requires a `tsconfig.json` at the project root (currently missing - pre-existing issue)
|
|
- `tsrust` independently works and produces binaries in `dist_rust/`
|
|
|
|
## Key Dependencies (Rust)
|
|
- `tokio` - async runtime
|
|
- `tokio-rustls` - TLS
|
|
- `hickory-dns` (hickory-resolver) - DNS resolution
|
|
- `mail-auth` - DKIM/SPF/DMARC (by Stalwart Labs)
|
|
- `mailparse` - MIME parsing
|
|
- `napi` + `napi-derive` - Node.js bindings
|
|
- `ring` - crypto primitives
|
|
- `dashmap` - concurrent hash maps
|