Skip to content
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

feat: rewrite to C++ with JSI #40

Closed
wants to merge 1 commit into from
Closed

Conversation

dcangulo
Copy link

@dcangulo dcangulo commented Jul 31, 2022

Closes #38

I didn't test this much but it works. This is my first time trying JSI, so I think this needs more testing and review.

It's about 48% faster if I did the benchmark correctly using console.time.

References:

RCTCxxBridge* cxxBridge = (RCTCxxBridge*)bridge;

if (cxxBridge.runtime) {
reactnativegetrandomvalues::install(*(facebook::jsi::Runtime *)cxxBridge.runtime);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there is better way to generate random bytes without https://developer.apple.com/documentation/security/1399291-secrandomcopybytes on iOS.

@hannojg
Copy link

hannojg commented May 15, 2023

Hm, may I propose to use codegen to generate the CPP bindings? That feels more future proof

@efstathiosntonas
Copy link

Hey folks, is there any update on this? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate to new architecture
4 participants