Skip to content

Commit d9f36ea

Browse files
committed
ABI-safe Hermes API and new JSI for Node-API (microsoft#11696)
1 parent 9b7296f commit d9f36ea

File tree

46 files changed

+1186
-3071
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1186
-3071
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "ABI-safe Hermes API and new JSI for Node-API",
4+
"packageName": "@react-native-windows/telemetry",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "ABI-safe Hermes API and new JSI for Node-API",
4+
"packageName": "react-native-windows",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

packages/@react-native-windows/telemetry/src/test/projects/UsesPackagesConfig/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
<packages>
33
<package id="Microsoft.Windows.CppWinRT" version="2.0.210312.4" targetFramework="native"/>
44
<package id="Microsoft.UI.Xaml" version="2.6.0" targetFramework="native"/>
5-
<package id="ReactNative.Hermes.Windows" version="0.8.1-ms.5" targetFramework="native"/>
5+
<package id="Microsoft.JavaScript.Hermes" version="0.1.15" targetFramework="native"/>
66
</packages>

packages/playground/windows/playground-win32/packages.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
<package id="Microsoft.UI.Xaml" version="2.7.0-prerelease.210913003" targetFramework="native"/>
1010
<package id="Microsoft.VCRTForwarders.140" version="1.0.2-rc" targetFramework="native"/>
1111
<package id="Microsoft.Windows.CppWinRT" version="2.0.210312.4" targetFramework="native"/>
12+
<package id="Microsoft.JavaScript.Hermes" version="0.1.15" targetFramework="native"/>
1213
</packages>

packages/playground/windows/playground/packages.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
<package id="Microsoft.Windows.CppWinRT" version="2.0.210312.4" targetFramework="native"/>
44
<package id="Microsoft.UI.Xaml" version="2.7.0" targetFramework="native"/>
55
<package id="Microsoft.WinUI" version="3.0.0-preview4.210210.4" targetFramework="native"/>
6+
<package id="Microsoft.JavaScript.Hermes" version="0.1.15" targetFramework="native"/>
67
</packages>

vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
</ItemGroup>
150150
<ItemGroup>
151151
<PackageReference Include="boost" Version="1.76.0.0" />
152-
<PackageReference Include="ReactNative.Hermes.Windows" Version="$(HermesVersion)" />
152+
<PackageReference Include="Microsoft.JavaScript.Hermes" Version="$(HermesVersion)" />
153153
<PackageReference Include="ReactWindows.OpenSSL.StdCall.Static" Version="1.0.2-p.5" />
154154
<PackageReference Include="$(V8PackageName)" Version="$(V8Version)" Condition="'$(UseV8)' == 'true'" />
155155
</ItemGroup>

vnext/Desktop/React.Windows.Desktop.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@
325325
<ItemGroup>
326326
<PackageReference Include="boost" Version="1.76.0.0" />
327327
<PackageReference Include="Microsoft.Windows.CppWinRT" Version="$(CppWinRTVersion)" />
328-
<PackageReference Include="ReactNative.Hermes.Windows" Version="$(HermesVersion)" />
328+
<PackageReference Include="Microsoft.JavaScript.Hermes" Version="$(HermesVersion)" />
329329
<PackageReference Include="ReactWindows.OpenSSL.StdCall.Static" Version="1.0.2-p.5" />
330330
<PackageReference Include="$(V8PackageName)" Version="$(V8Version)" Condition="'$(UseV8)' == 'true'" />
331331
</ItemGroup>

vnext/Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
<!-- When bumping the fmt version, be sure to bump the git hash of that version's commit and build fmt.vcxproj (to update its cgmanifest.json) too. -->
2222
<FmtVersion>8.0.0</FmtVersion>
2323
<FmtCommitHash>9e8b86fd2d9806672cc73133d21780dd182bfd24</FmtCommitHash>
24+
<!-- Commit hash for https://github.com/microsoft/node-api-jsi code. -->
25+
<NodeApiJsiCommitHash>53b897b03c1c7e57c3372acc6234447a44e150d6</NodeApiJsiCommitHash>
2426
</PropertyGroup>
2527

2628
<!--
@@ -40,6 +42,9 @@
4042

4143
<FmtDir Condition="'$(FmtDir)' == '' AND Exists('$([MSBuild]::NormalizeDirectory($(ReactNativeDir)..\..\node_modules))')">$(ReactNativeDir)..\..\node_modules\.fmt\fmt-$(FmtVersion)</FmtDir>
4244
<FmtDir>$([MSBuild]::NormalizeDirectory($(FmtDir)))</FmtDir>
45+
46+
<NodeApiJsiDir Condition="'$(NodeApiJsiDir)' == '' AND Exists('$([MSBuild]::NormalizeDirectory($(ReactNativeDir)..\..\node_modules))')">$(ReactNativeDir)..\..\node_modules\.node-api-jsi\node-api-jsi-$(NodeApiJsiCommitHash)</NodeApiJsiDir>
47+
<NodeApiJsiDir>$([MSBuild]::NormalizeDirectory($(NodeApiJsiDir)))</NodeApiJsiDir>
4348
</PropertyGroup>
4449

4550
<PropertyGroup Label="Configuration">
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
#include "ApiLoaders/NodeApi.h"
5+
6+
namespace Microsoft::NodeApiJsi {
7+
8+
LibHandle LibLoader::loadLib(const char * /*libName*/) {
9+
return reinterpret_cast<LibHandle>(0);
10+
}
11+
12+
FuncPtr LibLoader::getFuncPtr(LibHandle /*libHandle*/, const char * /*funcName*/) {
13+
return reinterpret_cast<FuncPtr>(0);
14+
}
15+
16+
} // namespace Microsoft::NodeApiJsi

0 commit comments

Comments
 (0)