microsoft / v8-jsi

React Native V8 JSI adapter
Other
157 stars 36 forks source link

React Native V8 JSI adapter

A V8 adapter implemention of the JSI interface for the react-native framework.

Build Status

Building

Windows

Initial Windows Build Setup
  1. Download and Install
    Windows 10 Windows SDK:
    https://developer.microsoft.com/en-us/windows/downloads/sdk-archive
    Note: Windows SDK has to be Windows 10 version, NOT Windows 11
  2. Download and Install
    Microsoft Visual C++ Redistributable x64
    Microsoft Visual C++ Redistributable x86
    https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist
  3. Download and Install
    Visual Studio 2022
    https://visualstudio.microsoft.com/vs
    In Visual Studio Setup, Select the following Individual Components:
    • MSVC v143 - VS 2022 C++ x64/x86 Spectre-mitigated libs (Latest)
    • C++ ATL for latest v143 build tools with Spectre Mitigations (x86 & x64)
  4. Enable PowerShell script execution
    Launch Cmd as Administrator
    powershell Set-ExecutionPolicy RemoteSigned
  5. Perform Initial Build
    Launch Cmd as Standard user, NOT Administrator
    From V8-Jsi Repo directory:
    powershell ./localbuild.ps1
Windows Build

To build Win32 X64 Debug:

Launch Cmd as Standard user, NOT Administrator
From V8-Jsi Repo Directory:

powershell ./localbuild.ps1 -NoSetup

To build the specific platform and flavor, use appropriate build flags:

powershell ./localbuild.ps1 -NoSetup -Platform x86 -Configuration Release 
[EXPERIMENTAL!] Building with WSL2 on Windows 10/11
[EXPERIMENTAL!] Building on macOS

Out-of-sync issues

Until 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).

Build script patches

To regenerate after manual fix-ups, run:

Contributing

See Contributing guidelines for how to setup your fork of the repo and start a PR to contribute to React Native V8 JSI adapter.

License

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.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.