4 ms·
I’ve been playing around with code sharing options between web, mobile and desktop platforms. The idea is that the app core is written once in Rust and binding
by vbsteven 6y ago
I’ve been playing around with code sharing options between web, mobile and desktop platforms.
The idea is that the app core is written once in Rust and bindings are automatically generated to all target platforms.
I have a project that starts with protobuf files and generates Rust for the shared core, and Dart (ffi) and JS (wasm) for the client stubs. The generated client interface is “platform-native-async” so Dart Futures or JS Promises. The bridge passes protobuf messages back and forth between both language contexts and takes care of the threading/async mapping.