regenerate-sandbox
Skill11k starsChanged 7 months agoMITView on GitHub
Guide for regenerating the Hermes sandbox, the C files in API/hermes_sandbox/external that wasm2c produces from a wasm build of the VM, and for changing HermesSandboxRuntime.cpp, the JSI runtime on top of it. Use when the user asks to regenerate or update the sandbox, re-run wasm2c or emscripten for it, or update the sandbox C files; after a bytecode version bump, a change to the C ABI in API/hermes_abi, or a VM fix the sandbox should get; or when adding or changing JSI methods in the sandbox runtime.
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
If this checkout has a facebook/ directory, also read .claude/skills/facebook/regenerate-sandbox-meta/SKILL.md, which covers the internal …
- Distinctive: line 49
Read the one that matches the step you are on:
- Distinctive: line 51
Before changing the ABI or the mirror: references/abi.md
- Very specific: line 58
When adding or changing a JSI method in HermesSandboxRuntime.cpp: references/jsi.md
- Distinctive: line 60
When something fails: references/troubleshooting.md
- Distinctive: line 69
Check the imports and exports of both modules before running wasm2c.
- Very specific: line 70
Run wasm2c for dbg and opt, then run verify_generated.py.
- Distinctive: line 73
Run the API tests with the debug and the release build of the host, and with UBSan.
- Distinctive: line 75
Update the README if the tools, flags or steps changed.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Regenerating the Hermes sandbox
The sandbox runs the Hermes VM inside wasm, translated to C, so that bugs in the VM cannot reach host memory. Its pieces:
- The module.
hermesSandboxImpl(API/hermes_sandbox/CMakeLists.txt) linkshermes_sandbox_impl.cpp, the C ABI (API/hermes_abi, mainlyhermes_vtable.cpp) and the VM into a standalone wasm module with Emscripten. wasm2c turns it intoexternal/hermes_sandbox_impl_dbg_compiled*andexternal/hermes_sandbox_impl_opt_compiled*. Thewasm-rtfiles inexternal/are the wasm2c runtime. - The host.
HermesSandboxRuntime.cppimplementsjsi::Runtimeby calling the ABI vtable that the module exports (get_hermes_abi_vtable), through a hand-written mirror,SANDBOX_CONTEXT_VTABLE_FUNCTIONS. It also implements the module's imports. - The generated C is checked in. Nothing rebuilds it, so a change to the VM, the ABI or the bytecode format reaches the sandbox only when someone regenerates it. The debug build of the host compiles the dbg files and the release build the opt files.
If this checkout has a facebook/ directory, also read
.claude/skills/facebook/regenerate-sandbox-meta/SKILL.md, which covers the
internal build, test and submission steps.
When to regenerate
- The bytecode version changes. The sandbox only accepts bytecode of the version it was built with.
- The C ABI changes:
hermes_abi.horhermes_vtable.cpp. - A VM fix or feature should reach the sandbox.
- Emscripten or wasm2c is upgraded.
Changes to HermesSandboxRuntime.cpp alone do not need a regeneration.
References
Read the one that matches the step you are on:
- Before changing the ABI or the mirror: references/abi.md
- To set up the tools and build the wasm modules and the C: references/building.md
- To check the output before committing it: references/checks.md, which uses verify_generated.py
- To test the result: references/testing.md
- When adding or changing a JSI method in
HermesSandboxRuntime.cpp: references/jsi.md - When something fails: references/troubleshooting.md
Checklist
- Make the source changes: the VM, the ABI and the host runtime. The mirror changes go in the same commit as the regenerated C (see references/abi.md).
- Build the host compilers and both wasm modules with the commands in
API/hermes_sandbox/README.md, with the pinned tool versions. - Check the imports and exports of both modules before running wasm2c.
- Run wasm2c for dbg and opt, then run
verify_generated.py. - Rebuild from clean build directories and check that the output is the same, byte for byte.
- Run the API tests with the debug and the release build of the host, and with UBSan.
- Update the README if the tools, flags or steps changed.
- Afterwards, update this skill with anything that went differently.
Trending
Quiet since June.about the whole repository
Who's talking about facebook/hermes
- react-native-community/releases“Road to v0.64 Discussion”GitHub · Nov 23, 2020 · 236 reactions
- A Hacker News story“Hermes – A small JavaScript engine optimized for running React Native on Android”Hacker News · Jul 11, 2019 · 209 points
- react/react-native“Static Hermes for React Native”GitHub · Jan 8, 2025 · 194 reactions
- meta/hermes“Consider supporting Proxy”GitHub · Jul 13, 2019 · 192 reactions
- meta/hermes“Intl Support”GitHub · Jul 12, 2019 · 184 reactions
The biggest 5 of 43 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 43
Talked about on GitHub, Stack Overflow, Hacker News, Bluesky and the web (43 times).
On GitHub · 27
- Nov 23, 2020Road to v0.64 Discussion — react-native-community/releases236 reactions · 346 comments
- Jan 8, 2025Static Hermes for React Native — react/react-native194 reactions · 14 comments
- Jul 13, 2019Consider supporting Proxy — meta/hermes192 reactions · 88 comments
- Jul 12, 2019Intl Support — meta/hermes184 reactions · 182 comments
- Apr 19, 2021Road to v0.65 Discussion — react-native-community/releases112 reactions · 49 comments
22 more on GitHub
- Aug 25, 2021Road to 0.66.0 — react-native-community/releases64 reactions · 51 comments
- Aug 2, 2019[CRASH] Android 6.0.1 crashes with java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so — react/react-native54 reactions · 87 comments
- Jun 11, 2026Worklets Legacy Eval Mode memory consumption regression in production — software-mansion/react-native-reanimated36 reactions · 58 comments
- Mar 3, 2023Date 800x slower than JSC — meta/hermes35 reactions · 68 comments
- Aug 17, 2020Build Hermes for iOS — meta/hermes26 reactions · 26 comments
- Jun 9, 2021Road to v0.65.0 - RC2 phase — react-native-community/releases24 reactions · 57 comments
- May 10, 2021failed install hermes-engine — react/react-native24 reactions · 46 comments
- Jan 22, 2021feat(v2): Webpack 5, PostCSS 8 — meta/docusaurus14 reactions · 22 comments
- Sep 8, 2021Fix JNI null refference in destructor — software-mansion/react-native-reanimated11 reactions · 1 comment
- Jul 14, 2025feat: Add `jsi::ArrayBuffer::getMutableBuffer()` — meta/hermes9 reactions · 5 comments
- Jul 3, 2023Fix #1382 - React Native - Hermes Engine isn't supporting `for await` yet — reduxjs/redux-devtools8 reactions · 6 comments
- Dec 10, 2020Bump Hermes to 0.7.2 for v0.64 — react/react-native8 reactions · 4 comments
- Mar 9, 2026Add ArrayBuffer and Uint8Array support to C++ TurboModules — react/react-native7 reactions · 1 comment
- Sep 17, 2024fix: Add JavaScript wrappers to captured console to prevent crashes in React Native 0.75 — software-mansion/react-native-reanimated6 reactions
- May 22, 2020Add Hermes parser for JavaScript — fkling/astexplorer6 reactions · 4 comments
- Jan 24, 2025perf: fast _getFreeIndex — react/react-native5 reactions · 8 comments
- Dec 18, 2024Static Hermes for React Native — react/react-native5 reactions · 5 comments
- Jan 28, 2024Add support for ES2023 `Array` non-mutating methods — meta/hermes5 reactions · 13 comments
- Apr 12, 2023Add support for "hasIndices" RegExp flag — meta/hermes5 reactions · 14 comments
- Oct 31, 2021Fix Intl.DateTimeFormat TimeZone — meta/hermes5 reactions · 7 comments
- Mar 19, 2026Add `tryGetMutableBuffer` API (#56156) — react/react-native4 reactions · 3 comments
- Dec 5, 2025Add support for TextDecoder — meta/hermes4 reactions · 59 comments
On Stack Overflow · 9
- Feb 4, 2020React native 0.61.5 Crashlytics missing libhermes.so: SoLoader.java com.facebook.soloader.SoLoader.assertInitialized13 votes · 1 answer
- Dec 26, 2019React-native 0.61.2 with hermes disassembling index.android.bundle13 votes · 1 answer
- Mar 29, 2023How to run .net WASM in React Native Mobile app through Xamarin-React-Native bridge?2 votes
- May 22, 2023Possible reasons for performance difference between React JS and React Native?1 vote
- Dec 11, 2024iOS ipa and app file size increased after building with xcode160 votes
4 more on Stack Overflow
- Oct 12, 2024React Native JavaScript Emoji Regex Problem0 votes
- Feb 2, 2024React Native iOS XCode build error: "[CP-User] [Hermes] Replace Hermes for the right configuration"0 votes
- Dec 18, 2023cannot read property 'decode' of null : react-native-pure-jwt0 votes
- Oct 6, 2020Is there a way to intercept the loading of a react-native bundle?0 votes
On Hacker News · 3
- Jul 11, 2019Hermes – A small JavaScript engine optimized for running React Native on Android209 points · 56 comments
- Feb 9, 2024Hermes Sandboxed Runtime4 points
- Aug 26, 2023Array Implementation in Managed Runtimes via Segments (Hermes for JavaScript)1 point
On Bluesky · 2
- Oct 3, 2023Bonjour et bon mardi ! Je vous partage ma découverte de Hermes, un moteur JavaScript créé par Facebook et optimisé pour exécuter du React… — @ponceto91.bsky.social2 likes and reposts
- Dec 30, 2025github.com/facebook/her... — @sungkim.bsky.social1 likes and repost
On the web · 2
- Jan 11, 2020How can I add I/O? · Issue #174 · facebook/hermes — google.com
- Jul 19, 2019Does hermes make some specific optimized for React.js or ... — google.com
In this repository6 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-ir-instructionSkill
- binary-size-analysisSkill
- gc-safe-codingSkill
- modify-jsi-featuresSkill
- non-interactive-git-rebaseSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

