bamTiScript is a pre-release Rust toolchain that type-checks, runs, and compiles TypeScript. TypeScript 7.0.2 compatibility is in progress.
- Repository:
bamTiScript - CLI binary:
bamts - Workspace crates:
bamts,bamts-cli,bamts-compiler,bamts-cancel,bamts-bytecode,bamts-runtime,bamts-codegen,bamts-native,bamts-node,bamts-verification, and privatebamts-napi - npm packages:
bamti(in-process Node 24+ interface) andbamti-cli(standalone CLI transport). Currently published 0.1.0 packages on npm do not provide native binary artifacts; the source implementation of Node-API bindings is not yet published.
Build the CLI from source, create a TypeScript entrypoint, type-check it, and run it:
cargo build --release -p bamts-cli
cat > hello.ts <<'EOF'
const message: string = "hello from bamts";
process.stdout.write(`${message}\n`);
EOF
target/release/bamts check hello.ts
target/release/bamts run --target jit hello.ts
target/release/bamts compile --target aot -o hello hello.ts
./hello- Version
0.2.0is pre-release. bamtiprovides an in-process Node 24+ interface backed by native Node-API bindings (bamts-napi) and atomic cancellation (bamts-cancel), whilebamti-cliis the standalone CLI transport.- The native addon design targets five host platform packages (
@bamti/bamti-linux-x64-gnu,@bamti/bamti-linux-arm64-gnu,@bamti/bamti-darwin-x64,@bamti/bamti-darwin-arm64,@bamti/bamti-win32-x64-msvc) with fail-closed optional artifact loading. - Currently published 0.1.0 npm packages do not contain prebuilt native binary artifacts. Real five-target release validation remains blocked by GitHub billing and is unverified. Build the working CLI from source with Cargo on Linux x64.
- The documented runtime target is Linux x64. AOT steps use the C compiler driver selected by
$CC, defaulting tocc.
- Type checking with
text,pretty,json,github, andcompactdiagnostic output - JIT execution with
run --target jit - AOT execution and native binary compilation with
--target aot - UTF-16 code-unit indexing for ECMAScript strings
- In-process Node.js 24+ interface via native Node-API bindings (
bamts-napi) with atomic cancellation control (bamts-cancel) - A limited Node-style host surface that includes
process.stdout.write
- TypeScript 7.0.2 is the compatibility oracle and target, not a completed compatibility claim.
compileaccepts one entrypoint per invocation and only the AOT target.-oselects the output path. Declaration generation and source-map output are rejected.bamtirequires Node.js 24 or later. Currently published0.1.0npm packages do not contain compiled native artifacts; the source-tree native addon implementation is unpublished.bamtioptional native package loading is fail-closed. Real five-target runtime release verification is blocked by GitHub billing and has not passed.- The host runtime implements a limited Node-style API surface. It does not provide full Node.js compatibility.
- AOT output targets the host architecture. Cross-compilation and non-Linux runtime behavior are not verified.
- The root workspace policy defaults to
unsafe_code = "forbid". Most crates inherit it. Native code generation, host export, verification, FFI, and privatebamts-napicrates contain narrowly scoped, documented exceptions. This policy is not an end-to-end formal memory-safety guarantee. - The project publishes no performance benchmark or production-readiness claim.
- Formal source artifacts target named properties. The current acceptance state is recorded in the proof ledger; complete compiler and runtime correctness is not proven.
- Quickstart Guide: Step-by-step source build and execution tutorial.
- CLI Reference: Command flags, execution targets, exit codes, and budget limits.
- Diagnostics Reference: Diagnostic codes, output formats, UTF-16 column indexing, and error limits.
- Architecture Explanation: High-level system architecture and component boundaries.
- Verification Explanation: Conformance testing, differential corpus, and formal verification models.
- Compiler Rules: Type checker invariants and diagnostic rules.
- UTF-16 String Encoding Pattern: UTF-16 string representation and runtime design.
See CONTRIBUTING.md for local environment setup (Rust 1.97.1, Edition 2024) and mandatory unpiped validation gates:
cargo fmt --all --check
cargo check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspaceEvery commit must implement one logical concern and compile cleanly.
Distributed under the MIT License.
