fedimint / fedimint-web-sdk

Tools for developing Fedimint web clients
https://web.fedimint.org
MIT License
20 stars 10 forks source link

Make SDK work with React Native #75

Open elsirion opened 1 month ago

elsirion commented 1 month ago

@alexlwn123 can you add some context please?

1M bounty once scoped out.

alexlwn123 commented 1 month ago

Make the Fedimint Web SDK Work with React Native

Scope overview: Enable the fedimint-client SDK to function within React Native environments, sharing library code with the existing web SDK.

Background

Our current SDK includes a WebAssembly (WASM) bundle that exposes the Rust-based fedimint-client to web applications. This setup allows web environments to interact seamlessly with the fedimint client.

However, React Native—a popular framework for building native/mobile apps using React—cannot directly leverage the existing WASM bundle due to environment differences between web and native mobile platforms.

Objective

Scope of Work

1. UniFFI Bindings for React Native

2. Architecting Shared Library Code

3. Testing and Validation

Deliverables

Acceptance Criteria

Additional Information

Challenges to Anticipate

References:

Note: This bounty aims to expand our SDK’s reach to mobile platforms via React Native, promoting broader adoption and community engagement. Your contribution will play a crucial role in achieving this goal.

alexlwn123 commented 1 month ago

@maan2003 take a look

maan2003 commented 3 weeks ago

fedimint react native is not going to be fun

we have to bundle rocksdb, and doing it as a library is not great :/ Maybe we can just force nix on all developers. But, forcing it for existing wallets is not great.

alexlwn123 commented 3 weeks ago

sad... any way around using rocks? Can we get a lighter-weight version of the DB with similar guarantees?

elsirion commented 3 weeks ago

we have to bundle rocksdb, and doing it as a library is not great :/

Is that a problem if we just leave it to the rust RocksDB crate? That is statically linking by default anyway, right? We only do dynamic linking because it avoids recompiling it all the time.

maan2003 commented 3 weeks ago

yea that sounds like the way to go