-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate Node and Web WebAssembly Binaries (#1325)
Summary: Pull Request resolved: #1325 Fixes #1321 Differential Revision: D47368830 fbshipit-source-id: 766dec6fbbf356931ecd2e044dad51b8026754e8
- Loading branch information
1 parent
dbd8e91
commit 0fff4cc
Showing
7 changed files
with
97 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @format | ||
*/ | ||
|
||
import wrapAssembly from '../wrapAssembly'; | ||
import type {Yoga} from '../wrapAssembly'; | ||
|
||
export * from '../generated/YGEnums'; | ||
export type { | ||
Config, | ||
DirtiedFunction, | ||
MeasureFunction, | ||
Node, | ||
Yoga, | ||
} from '../wrapAssembly'; | ||
|
||
const loadAssembly = require('../../binaries/wasm-async-node'); | ||
|
||
export async function loadYoga(): Promise<Yoga> { | ||
return wrapAssembly(await loadAssembly()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @format | ||
*/ | ||
|
||
import wrapAssembly from '../wrapAssembly'; | ||
|
||
export * from '../generated/YGEnums'; | ||
export type { | ||
Config, | ||
DirtiedFunction, | ||
MeasureFunction, | ||
Node, | ||
Yoga, | ||
} from '../wrapAssembly'; | ||
|
||
const loadAssembly = require('../../binaries/wasm-sync-node'); | ||
const Yoga = wrapAssembly(loadAssembly()); | ||
export default Yoga; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters