Skip to content

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

Draft
Shaptic wants to merge 4 commits intomasterfrom
jsbi-port
Draft

[Draft] Experimental fork: replace native usage of BigInt with JSBI.#109
Shaptic wants to merge 4 commits intomasterfrom
jsbi-port

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