Please read the top-level CONTRIBUTING.md first for general contribution guidelines, pull request process, and commit requirements.
This document covers TypeScript-specific development setup and workflow.
- Git
- Node.js >= 16 - Download Node.js
- Rust toolchain (1.70+) - Install Rust
-
Clone the repository:
git clone https://github.com/databricks/zerobus-sdk.git cd zerobus-sdk/ts -
Install dependencies:
npm install
-
Build the project:
npm run build:debug
This will compile the Rust code into a native Node.js addon (
.nodefile) for your platform. -
Run tests:
npm test
Faster compilation, includes debug symbols:
npm run build:debugOptimized for production:
npm run buildBuild for specific targets:
npm run build -- --target x86_64-apple-darwin
npm run build -- --target x86_64-unknown-linux-gnu
npm run build -- --target x86_64-pc-windows-msvc# Run all tests
npm test
# Unit tests only
npm run test:unit
# Integration tests
npm run test:integrationFollow standard Rust formatting:
cargo fmt --all
cargo clippy --all-targets --all-featuresFollow standard TypeScript conventions:
- Use camelCase for variables and functions
- Use PascalCase for types and classes
- Prefer
constoverlet - Use async/await over Promise chains
All pull requests must pass CI checks:
- build: Cross-platform builds for Linux (x86_64, aarch64) and Windows (x64)
- test: Unit tests on Node.js 16, 18, and 20 across Linux and Windows runners