react-nitro-hermes 0.0.1-alpha.14 → 0.0.1-alpha.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Generated/.gitattributes +1 -0
- package/Generated/internal_unit.c +36529 -0
- package/Package.swift +3 -1
- package/README.md +17 -13
- package/bin/shermes +0 -0
- package/package.json +2 -2
- package/Generated/include/InternalBytecode.inc +0 -6429
package/Package.swift
CHANGED
|
@@ -334,6 +334,7 @@ let package = Package(
|
|
|
334
334
|
name: "HermesVM",
|
|
335
335
|
path: ".",
|
|
336
336
|
sources: [
|
|
337
|
+
"Generated/internal_unit.c",
|
|
337
338
|
"hermes/lib/ADT/CompactArray.cpp",
|
|
338
339
|
"hermes/lib/AST/ASTBuilder.cpp",
|
|
339
340
|
"hermes/lib/AST/ASTUtils.cpp",
|
|
@@ -407,7 +408,6 @@ let package = Package(
|
|
|
407
408
|
"hermes/lib/IRGen/IRGen.cpp",
|
|
408
409
|
"hermes/lib/Inst/InstDecode.cpp",
|
|
409
410
|
"hermes/lib/Inst/InstDecode2.cpp",
|
|
410
|
-
"hermes/lib/InternalJavaScript/InternalBytecode.cpp",
|
|
411
411
|
"hermes/lib/Optimizer/PassManager/PassManager.cpp",
|
|
412
412
|
"hermes/lib/Optimizer/PassManager/Pipeline.cpp",
|
|
413
413
|
"hermes/lib/Optimizer/Scalar/Auditor.cpp",
|
|
@@ -662,6 +662,7 @@ let package = Package(
|
|
|
662
662
|
.headerSearchPath("hermes/public"),
|
|
663
663
|
],
|
|
664
664
|
cxxSettings: hermesCxxSettings + [
|
|
665
|
+
.define("HERMESVM_INTERNAL_JAVASCRIPT_NATIVE"),
|
|
665
666
|
.headerSearchPath("Generated/include"),
|
|
666
667
|
.headerSearchPath("hermes/API"),
|
|
667
668
|
.headerSearchPath("hermes/API/jsi"),
|
|
@@ -713,6 +714,7 @@ let package = Package(
|
|
|
713
714
|
]
|
|
714
715
|
),
|
|
715
716
|
],
|
|
717
|
+
cLanguageStandard: .gnu11,
|
|
716
718
|
// Hermes' bundled LLVM headers require C++17 with current libc++.
|
|
717
719
|
cxxLanguageStandard: .cxx17
|
|
718
720
|
)
|
package/README.md
CHANGED
|
@@ -60,9 +60,11 @@ exception and RTTI boundaries between components.
|
|
|
60
60
|
The package uses C++17, matching this Hermes revision. Internal symbols remain
|
|
61
61
|
visible across SwiftPM's intermediate target links; the final app link can strip
|
|
62
62
|
unused code.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
SwiftPM builds Hermes' internal JavaScript, including promises and iterator
|
|
64
|
+
helpers, from the checked-in Static Hermes unit `Generated/internal_unit.c`.
|
|
65
|
+
Android builds the same native unit through upstream CMake. Extension JavaScript
|
|
66
|
+
uses bytecode. The generated headers, extension bytecode, and typed-library data
|
|
67
|
+
are also checked in. Public headers are relative symlinks into the submodule.
|
|
66
68
|
|
|
67
69
|
The package uses compiler flags to preserve Hermes' aliasing, exception, and RTTI
|
|
68
70
|
requirements. Warning settings use SwiftPM's typed APIs. The remaining unsafe
|
|
@@ -71,28 +73,28 @@ later; this package requires 6.4.
|
|
|
71
73
|
|
|
72
74
|
After changing the Hermes submodule, review the source lists and build settings
|
|
73
75
|
in `Package.swift` against upstream CMake, update `HERMES_RELEASE_VERSION`, and
|
|
74
|
-
regenerate the configuration headers,
|
|
75
|
-
header links on macOS:
|
|
76
|
+
regenerate the configuration headers, native builtins, extension bytecode,
|
|
77
|
+
typed-library data, and header links on macOS:
|
|
76
78
|
|
|
77
79
|
```sh
|
|
78
80
|
brew install cmake ninja
|
|
79
81
|
python3 scripts/generate.py
|
|
80
82
|
```
|
|
81
83
|
|
|
82
|
-
The generator requires Python 3.9+ and builds the pinned host
|
|
83
|
-
|
|
84
|
+
The generator requires Python 3.9+ and builds the pinned host compilers
|
|
85
|
+
`shermes` and `hermesc`.
|
|
84
86
|
Commit the updated submodule pin, manifest, generated files, and header symlinks
|
|
85
87
|
together.
|
|
86
88
|
|
|
87
89
|
Rebuild the matching Static Hermes compiler and regenerate its native units after
|
|
88
|
-
an upgrade. For
|
|
90
|
+
an upgrade. For the layout bridge, run these commands from the repository root:
|
|
89
91
|
|
|
90
92
|
```sh
|
|
91
93
|
bun run --cwd packages/react-nitro-hermes build
|
|
92
|
-
bun run --cwd packages/react-nitro-
|
|
94
|
+
bun run --cwd packages/react-nitro-layout build
|
|
93
95
|
```
|
|
94
96
|
|
|
95
|
-
Commit changes to `packages/react-nitro-
|
|
97
|
+
Commit changes to `packages/react-nitro-layout/Generated/nitroLayout.c` with the Hermes
|
|
96
98
|
upgrade, then rebuild the app so that the generated C and VM use matching headers.
|
|
97
99
|
Recompile any persisted Hermes bytecode with the matching compiler as well.
|
|
98
100
|
|
|
@@ -112,8 +114,10 @@ bun run --cwd packages/react-nitro-hermes build
|
|
|
112
114
|
Both commands use `scripts/build-shermes.ts`, which configures and builds
|
|
113
115
|
`shermes` and `hermesc` in `.build/hermes-cmake/` inside this package. CMake
|
|
114
116
|
and Ninja reuse existing build outputs and rebuild changed inputs. The root
|
|
115
|
-
workspace build then runs the
|
|
116
|
-
`packages/bundler` uses `hermesc` to compile
|
|
117
|
+
workspace build then runs the layout package build, which consumes `shermes`.
|
|
118
|
+
`packages/bundler` uses `hermesc` to compile application bytecode. For Release
|
|
119
|
+
builds it also uses `shermes` to compile React and the renderer to C for Xcode
|
|
120
|
+
or the Android NDK to build and link.
|
|
117
121
|
|
|
118
122
|
Build tooling can depend on the `react-nitro-hermes` workspace package and import
|
|
119
123
|
its paths without knowing where this package lives in the repository:
|
|
@@ -160,5 +164,5 @@ xcodebuild \
|
|
|
160
164
|
CODE_SIGNING_ALLOWED=NO build
|
|
161
165
|
```
|
|
162
166
|
|
|
163
|
-
On launch, the app evaluates JavaScript and displays
|
|
167
|
+
On launch, the app evaluates JavaScript and displays native row and
|
|
164
168
|
column layouts through the renderer.
|
package/bin/shermes
CHANGED
|
Binary file
|