React Native V8 JSI 适配器
A V8 adapter implemention of the JSI interface for the react-native framework.
Download and Install
Windows 10 Windows SDK:
Note: Windows SDK has to be Windows 10 version, NOT Windows 11
Download and Install
Microsoft Visual C++ Redistributable x64
Microsoft Visual C++ Redistributable x86
Download and Install
Visual Studio 2022
In Visual Studio Setup, Select the following Individual Components:
Enable PowerShell script execution
Launch Cmd as Administrator
powershell Set-ExecutionPolicy RemoteSignedPerform Initial Build
Launch Cmd as Standard user, NOT Administrator
From V8-Jsi Repo directory:
powershell ./localbuild.ps1To build Win32 X64 Debug:
Launch Cmd as Standard user, NOT Administrator
From V8-Jsi Repo Directory:
powershell ./localbuild.ps1 -NoSetupTo build the specific platform and flavor, use appropriate build flags:
powershell ./localbuild.ps1 -NoSetup -Platform x86 -Configuration Release A second build path is being developed that compiles v8jsi.dll from a
vendored copy of Node.js (under deps/nodejs/) without
depot_tools / gclient. It produces its own v8jsi.dll,
v8jsi_test.exe, and node_api_tests.exe into
deps/nodejs/out/{Release,Debug}/ — the legacy build's outputs in
out/{Release,Debug}/ are unaffected and continue to be the canonical
artifacts shipped in the ReactNative.V8Jsi.Windows NuGet today.
The two builds will coexist until downstream consumers migrate to the
new Microsoft.JavaScript.V8 NuGet, at which point the legacy build
above is removed.
In addition to the prerequisites listed under Initial Windows Build Setup, the new build also needs:
configure step).scripts/build.ts).dev.ps1dev.ps1 at the repo root is the canonical entry point for
the new build. Run .\dev with no arguments to see available commands.
Build (Release x64 by default):
.\dev buildOther configurations:
.\dev build --configuration debug
.\dev build --platform x86
.\dev build --platform arm64Build + run tests:
.\dev build --testRun the fork-sync tool (sync vendored Node.js / asio from upstream):
.\dev fork-sync --dep nodejs --statusSee .\dev build --help and .\dev fork-sync --help for the full
option set. The build command forwards to
scripts/build.ts, which drives
deps/nodejs/vcbuild.bat with narrow-build
flags (skips node.exe, cctest, embedtest, etc.). See
CLAUDE.md for the underlying details.
.\dev build also runs a version-sync check that compares
config.json.nodejs_version against the vendored Node.js version in
deps/nodejs/src/node_version.h, and fails fast on mismatch. See
docs/versioning.md for the 24.x.y policy.
wsl --install -d Debiansudo apt install lsb-releasepwsh ./localbuild.ps1 -AppPlatform androidpwsh ./localbuild.ps1 -AppPlatform android -NoSetupbrew install --cask powershellpwsh ./localbuild.ps1 -AppPlatform macpwsh ./localbuild.ps1 -AppPlatform mac -NoSetupUntil the JSI headers find a more suitable home, they're currently duplicated between the various repos. Code in jsi\jsi should be synchronized with the matching version of JSI from react-native (from https://github.com/facebook/hermes/tree/master/API/jsi/jsi).
To regenerate after manual fix-ups, run:
git diff --output=..\..\..\scripts\patch\build.diff --ignore-cr-at-eol from \build\v8\build\.git diff --output=..\..\scripts\patch\src.diff --ignore-cr-at-eol from \build\v8\.git diff --output=..\..\..\..\scripts\patch\zlib.diff --ignore-cr-at-eol from \build\v8\third_party\zlib\.See Contributing guidelines for how to setup your fork of the repo and start a PR to contribute to React Native V8 JSI adapter.
The V8 JSI adapter, and all newly contributed code is provided under the MIT License. Portions of the JSI interface derived from Hermes are copyright Facebook.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
暂无开放 Issues,或尚未同步最近议题。