mirror of
https://github.com/shinyobjectz/raea.git
synced 2026-12-01 06:53:19 -10:00
* A project's file that imports react finds the React raea ships, as raea's own files do (#278) 0.1.15 let raea's own files (sdk/app) find react in the release's one node_modules. A project's file still could not: brief.ts, or a scene it registers, imports its hooks from "react", a project has no package.json, and the render's own checks load brief.ts. So a render was applied, then failed with "brief.ts doesn't run: Cannot find package 'react'" and "fix every ERROR above, then render again", on every release through 0.1.16-rc1. Any file with no node_modules of its own above it now gets the package raea ships (the bundler gives a scene the same React); a project's own copy still wins, and a package raea doesn't ship is still not found. The release's check of the built archive renders beside such a brief.ts on every platform. * The archive's check of a brief.ts that imports react runs on every build, not only on real machines * node.rs back under the size limit --------- Co-authored-by: shinyobjectz <[email protected]>
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.