Commit Graph
9 Commits
Author SHA1 Message Date
Chris Tate 05021faf2f Support three.js meshes and materials in static builds
- Compile mesh construction, transforms, cloning, and material updates for native and WASI targets.
- Preserve subclass dispatch, fluent returns, and shared array identity in JavaScript packages.
- Support native class arrays and recursive conversions without materializing classes for type checks.
2026-09-29 23:34:18 -05:00
Chris Tate cbb8fc380a Link native FFI libraries and callbacks without a JavaScript engine
- Add exact 64-bit and pointer ABIs, static node:ffi bindings, and Darwin framework linking.
- Support native memory views and reusable callback pools with checked conversions and lifetime handling.
- Preserve the JavaScript values, accessors, and module bindings used during renderer initialization.
2026-09-29 08:07:03 -05:00
Chris Tate be1426a5cb feat(compiler): advance static OpenTUI support
- Extend native FFI with additional scalar widths and writable byte spans.
- Compile stored text codecs and supported bundled module patterns without a JavaScript engine.
- Document supported limits.
2026-09-27 21:49:40 -05:00
Chris Tateandmonteslu 4d9e2a2397 fix ffi call initializers (#268)
Co-authored-by: monteslu <423800+monteslu@users.noreply.github.com>
2026-08-30 19:23:04 -05:00
Chris TateandDemonGPT a737fde346 feat(ffi): marshal foreign-thread callbacks (#164)
* feat(ffi): marshal foreign-thread callbacks

- Add format 5 foreign callback descriptors with strict retained, context, and void-return validation.
- Marshal copied callback arguments through an optional MPSC event-loop queue in both C and LLVM backends.
- Cover concurrent delivery, liveness, fairness, teardown, cross-platform builds, and document the boundary contract.

Co-authored-by: DemonGPT <127974011+DemonGPT@users.noreply.github.com>

* fix(ffi): preserve callback checkpoints

---------

Co-authored-by: DemonGPT <127974011+DemonGPT@users.noreply.github.com>
2026-08-16 22:59:02 -05:00
Chris TateandDemonGPT b53285d650 feat(ffi): add retained callbacks (#163)
* feat(ffi): add retained callbacks

- Add format 4 retained registration and explicit release descriptors with pointer-identity validation.
- Pin callbacks in runtime registration tables and emit matching C/LLVM adapters with deferred exception checks.
- Cover lifecycle and sanitizer cases, and document the same-thread callback boundary.

Co-authored-by: DemonGPT <127974011+DemonGPT@users.noreply.github.com>

* fix(ffi): harden retained callback lifecycle

* fix(ffi): reject same-call retained releases

* fix(ffi): reject inline retained releases

* fix(ffi): preserve plain exit listener timing

---------

Co-authored-by: DemonGPT <127974011+DemonGPT@users.noreply.github.com>
2026-08-16 20:43:18 -05:00
Chris TateandDemonGPT da9a8f5524 feat(ffi): copy callback strings and spans (#162)
* feat(ffi): copy callback strings and spans

- Add format 3 callback classes for cstrings, UTF-8 spans, and byte spans.
- Materialize owned callback arguments in both backends with strict null handling.
- Cover validation, ownership, sanitizers, and document the boundary contract.

Co-authored-by: DemonGPT <127974011+DemonGPT@users.noreply.github.com>

* fix(ir): bump schema for callback spans

---------

Co-authored-by: DemonGPT <127974011+DemonGPT@users.noreply.github.com>
2026-08-16 08:52:45 -05:00
Chris TateandDemonGPT adea269659 feat(ffi): support call-scoped native callbacks (#128)
* feat(ffi): support call-scoped native callbacks

- Add format-2 callback/context declarations with exact ABI positions and strict lifetime validation.
- Emit capture-aware C and LLVM trampolines with scalar coercion and exception propagation.
- Document the callback contract and cover both backends in plain and sanitized tests.

Co-authored-by: DemonGPT <127974011+DemonGPT@users.noreply.github.com>

* fix FFI callback safety

---------

Co-authored-by: DemonGPT <127974011+DemonGPT@users.noreply.github.com>
2026-08-11 08:25:29 -05:00
Chris Tate bed63d3223 feat: add outbound native FFI
- Add a strict versioned manifest and direct C ABI lowering for both backends.
- Link declared native inputs through the CLI and compiler APIs with precise diagnostics.
- Cover the ABI under plain and sanitized integration tests and document its contracts.
2026-07-25 09:56:48 -05:00