tjs-lang 0.7.8 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +9 -0
- package/demo/docs.json +64 -16
- package/demo/src/ts-examples.ts +8 -8
- package/package.json +7 -3
- package/src/lang/docs.test.ts +148 -0
- package/src/lang/docs.ts +49 -15
- package/src/lang/emitters/js-wasm.ts +57 -65
- package/src/lang/emitters/js.ts +16 -1
- package/src/lang/features.test.ts +4 -3
- package/src/lang/index.ts +9 -0
- package/src/lang/module-loader.test.ts +318 -0
- package/src/lang/module-loader.ts +419 -0
- package/src/lang/parser-transforms.ts +336 -0
- package/src/lang/parser-types.ts +33 -0
- package/src/lang/parser.ts +43 -2
- package/src/lang/wasm.test.ts +1293 -2
- package/src/lang/wasm.ts +470 -87
- package/src/linalg/index.tjs +119 -0
- package/src/linalg/linalg.test.ts +294 -0
- package/src/linalg/vector-search.bench.test.ts +395 -0
package/CLAUDE.md
CHANGED
|
@@ -136,6 +136,7 @@ import { tjs, transpile } from 'tjs-lang/lang' // Language tools only
|
|
|
136
136
|
import { fromTS } from 'tjs-lang/lang/from-ts' // TypeScript transpilation
|
|
137
137
|
import { AgentVM } from 'tjs-lang/vm' // VM only (smaller bundle)
|
|
138
138
|
import { batteryAtoms } from 'tjs-lang/batteries' // LM Studio batteries
|
|
139
|
+
import { dot, norm_sq } from 'tjs-lang/linalg' // SIMD linear-algebra kernels
|
|
139
140
|
// Editor integrations: 'tjs-lang/editors/monaco', '/codemirror', '/ace'
|
|
140
141
|
```
|
|
141
142
|
|
|
@@ -426,6 +427,12 @@ Explain the concept here. Use markdown freely.
|
|
|
426
427
|
// Then the actual TJS code
|
|
427
428
|
function demo() { ... }
|
|
428
429
|
|
|
430
|
+
/**
|
|
431
|
+
* JSDoc-style /** ... */ blocks are also extracted as docs.
|
|
432
|
+
* Leading ` * ` is stripped from each line; the rest renders as markdown.
|
|
433
|
+
* Use this when porting TS source where JSDoc is already idiomatic.
|
|
434
|
+
*/
|
|
435
|
+
|
|
429
436
|
test 'a description' {
|
|
430
437
|
expect(...).toBe(...)
|
|
431
438
|
}
|
|
@@ -479,6 +486,8 @@ The CLI (`bun src/cli/tjs.ts run`) does NOT inject the test-block `expect` harne
|
|
|
479
486
|
- `AGENTS.md` — Agent workflow instructions (session-completion checklist, push-before-done rule)
|
|
480
487
|
- `TODO.md` — Open work, organized by area; move items to the **Completed** section when done
|
|
481
488
|
- `PLAN.md` — Roadmap
|
|
489
|
+
- `DOCS-WASM.md` — Canonical WASM reference: inline blocks, `wasm function` declarations, memory model, cross-file composition, `tjs-lang/linalg`, current limitations
|
|
490
|
+
- `wasm-library-plan.md` — Cross-file WASM library design (composable `wasm function` declarations, transpile-time module composition, linalg stdlib). Phases 0–5 complete; see plan for current status.
|
|
482
491
|
- `MANIFESTO-BUILDER.md` / `MANIFESTO-ENTERPRISE.md` — Positioning docs (audience-targeted pitches)
|
|
483
492
|
- `benchmarks.md` — Top-level benchmark results (separate from `guides/benchmarks.md`)
|
|
484
493
|
|