Files
raea/engine/native
shinyobjectz 6d8623ca9b Node's import.meta.url is written into each module, as import.meta.main is: macOS 15's JavaScriptCore left it undefined
createRequire(import.meta.url) then resolved packages from ".", so a tool requiring a package that way failed on
macOS 15 with "Cannot find package" (a newer JavaScriptCore gives the module's key, which is why it passed here).
raea-native's node test found it as soon as CI's unit tests ran it: the crates #90 added switch on raea-native's
modules feature, and before that the test compiled to nothing in CI. Each module's text now has import.meta.url as
its file's own file:// URL, the way node.rs already writes import.meta.main in.
2026-11-12 10:59:23 -08:00
..
2026-10-31 13:15:29 -07:00

native

raea-native: raea's native calls on JavaScriptCore. TypeScript reaches Rust through one function, __raea_call(name, json); the names it can call live in the registry (core/calls/), each with the TypeScript types of its arguments and answer, registered by whichever crate implements it. raea types writes the types raea imports, so a call that doesn't exist or takes the wrong arguments fails to type-check.

It holds the JavaScriptCore binding (src/jsc.rs), the web shims bundles expect (src/web/: TextEncoder, URL, AbortController, crypto, Blob, ...), and seeds the registry with the shell's native tools (io/shell/: the filesystem, HTTP under a policy, SQLite, tar, HTML to Markdown).

runtime/js/ and sdk/react/ depend on it.