Skip to content

[Draft] Experimental fork: replace native usage of BigInt with JSBI. #109

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Shaptic
Copy link
Contributor

@Shaptic Shaptic commented Nov 15, 2023

Due to the fact that React Native does not have strong support for BigInt literals (see facebook/react-native#34603 (comment)), this library (and, by extension, the entire Stellar JavaScript SDK, e.g. stellar-base and stellar-sdk) is not compatible with React Native.

The ecosystem recommendation is to use JSBI as a drop-in replacement for BigInt, then use a Babel plugin (transform-jsbi-to-bigint) to transpile the final code to have native BigInts.

This is an experimental fork to port the codebase to use JSBI.

As far as I understand, we should not use the aforementioned plugin in this codebase and rather let downstream systems with strong BigInt support do the replacement. Unfortunately, this would have to be an "opt-in" action rather than an "opt-out", so the best path forward to getting this into RN projects is still unclear.

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.

1 participant