-
Notifications
You must be signed in to change notification settings - Fork 4
Injecting Node-API functions into weak-node-api
#49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
759a4ae
Update weak_node_api to use injection
kraenhansen ab66928
Improve the search for Android .so files
kraenhansen 3cbf905
Injecting when loading in iOS
kraenhansen 353fa4f
Injecting on Android
kraenhansen 9d3719f
Consuming the weak-node-api prebuild
kraenhansen 60b1d9e
Link Android libs from Ferric with weak-node-api
kraenhansen f74b673
Strip lib from xcframework and android library directories
kraenhansen 7a2f47e
Strip "lib" prefix from prebuild directory names
kraenhansen 6ba521e
Add cross-platform logging
kraenhansen cbb9510
Load weak-node-api dynamically when injecting
kraenhansen 3651d7b
Remove extraneous doNotStrip
kraenhansen 59934ae
Escape weakNodeApiPath
kraenhansen e8e8c5d
More async fs I/O in cmake CLI
kraenhansen e74a133
Rename inject_host_t to InjectHostFunction
kraenhansen 2cb0726
Rename inject_host to inject_weak_node_api_host, mark it extern "C" a…
kraenhansen 29614f9
Error on warnings when building weak-node-api
kraenhansen 9578c63
Propagating __attribute__((noreturn)) from headers
kraenhansen 1862e3b
Generate the injector on CI
kraenhansen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -17,7 +17,11 @@ android/.cxx/ | |
android/build/ | ||
|
||
# Everything in weak-node-api is generated, except for the configurations | ||
# Generated and built bia `npm run build-weak-node-api-injector` | ||
/weak-node-api/build/ | ||
/weak-node-api/*.xcframework | ||
/weak-node-api/*.android.node | ||
/weak-node-api/weak-node-api.cpp | ||
/weak-node-api/weak_node_api.cpp | ||
/weak-node-api/weak_node_api.hpp | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: |
||
# Generated via `npm run generate-weak-node-api-injector` | ||
/cpp/WeakNodeApiInjector.cpp |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: What about making a type for the values to avoid typos? I'm sure that you listed all values already, so
"arm64-v8a" | "armeabi-v7a" | "x86" | "x86_64"
should do the trick, wdyt?nit 2: Maybe we should pick a more general/unified way of describing targets / cpu archs? I'm afraid that adding new platforms will case an explosion of enums.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And use that type instead of
string
in theRecord
above? I don't see that I will be referencing that type elsewhere 🤔 Where would you use that type? Perhaps a suggestive edit would help me understand your intent.