Skip to content

Conversation

@matthargett
Copy link

The intent is to deduplicate customized JSC verisons floating around in the ecosystem, and get a newer JSC available to BabylonNative (which uses this repo's npm package).

Why Bun? Bun has made seriializing and caching bytecode, rather than text bundles, commonplace and provided a huge boost to node-like development. We know the value of bytecode bundles in React Native very well: ChakraCore bytecode bundles in 2016 shaved 1 second of time off app launches in React Native Windows, and Hermes bytecode bundles have similar measurable uplift to user experience. Upstream JavaScriptCore has these APIs, but doesn't put them as public -- Bun's fork exposes this plumbing and gives another way we can deploy bytecode bundles via another JS runtime whose performance characteristics may be better for a given workload.

…nary, but without vectorization (helped by the -O2 inlining), the interpreter hot path might not stay hot in the CPU caches. if using JSC on Android, users probably have a Very Good Reason(tm), but I'm not sure which they care about more: app download size or performance per watt efficiency.
@cortinico cortinico requested a review from Kudo October 18, 2025 21:34
Copy link
Member

@Kudo Kudo left a comment

Choose a reason for hiding this comment

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

thanks for the pr! leaving some comments here.
also good to rebase/merge to latest main. there was build error because of ci disk space. that problem may resolved by #188.

export ANDROID_HOME="$DEFAULT_ANDROID_HOME"
fi

DEFAULT_ANDROID_NDK="$ANDROID_HOME/ndk/28.2.13676358"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
DEFAULT_ANDROID_NDK="$ANDROID_HOME/ndk/28.2.13676358"
DEFAULT_ANDROID_NDK="$ANDROID_HOME/ndk/27.1.12297006"

maybe align the ndk version with react-native

Copy link
Author

Choose a reason for hiding this comment

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

The clang in NDK 27.1 is known to miscompile the computed gotos, which we run into in newer interpreters: android/ndk#2040

I'd at least suggest bumping to r27d (27.3.13750724). note that this bug may not affect some platform holders who effectively roll their own NDK with an internally-maintained LLVM/clang distro.

that said, in NDK 28, libc++ now includes debug info, which I've found invaluable when debugging in simulator and on-device.

matthargett and others added 2 commits October 19, 2025 11:36
Co-authored-by: Kudo Chien <ckchien@gmail.com>
…warning (to about warnings as errors killing the build unnecessarily), but also disable loop vectorization options until NDK can be bumped. downgrade to c++20 to align with React Native constraints.
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.

3 participants