Skip to content

build: compile @bloxwap/chart with tsrs instead of tsc - #74

Merged
joeblau merged 1 commit into
mainfrom
build/tsrs
Oct 21, 2026
Merged

joeblau merged 1 commit into
mainfrom
build/tsrs

Conversation

@joeblau

@joeblau joeblau commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Replaces tsc (TypeScript 6.0.3) with tsrs, a Rust port of the TypeScript 7 compiler, for build:ts and build:ts-test in @bloxwap/chart. tsrs is pinned exactly (0.18.0-ts7.1.0-dev.20260929) because it is still pre-1.0. apps/docs keeps typescript, since Next.js needs it.

Parity (all gates passed before migrating)

Check TS 6.0.3 TS 7.0.2 TS 7.1.0-dev.20260930.4 tsrs 0.18.0
Build + test build ok ok ok ok
Tests (1,897) all pass all pass all pass all pass
Emitted files vs tsrs (782) 118 .map differ, all .js/.d.ts identical byte-identical byte-identical —
Diagnostics on an error probe (5 errors, incl. exactOptionalPropertyTypes) identical identical identical —

The only difference from TS 6 is source-map mappings granularity, which is a TypeScript 7 change (TS 7.0.2 produces the same maps as tsrs). npm run coverage after the switch: 100% on all 139 rows.

Timing (box, 8 vCPU, median of 7 interleaved runs)

TS 6.0.3 TS 7.0.2 TS 7.1 dev tsrs
Type check (tsconfig.test.json --noEmit) 3.23 s / 542 MB 0.42 s / 277 MB 0.37 s / 230 MB 0.14 s / 112 MB
Build (tsconfig.json, emit) 2.01 s / 352 MB 0.22 s / 148 MB 0.22 s / 144 MB 0.11 s / 68 MB

tsrs is about 23x faster than TS 6 at type checking and 3x faster than TS 7, with roughly a fifth of TS 6's memory. Lockfile includes the @tsrs/darwin-arm64 binary used by the self-hosted Mac mini runners.

Rollback is a one-line revert of package.json scripts plus the typescript devDependency.

@joeblau
joeblau merged commit e20e186 into main Oct 21, 2026
5 checks passed
@joeblau
joeblau deleted the build/tsrs branch October 21, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant