Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 1.46 KB

README.md

File metadata and controls

45 lines (34 loc) · 1.46 KB

suit

Exploring the concept of cross platform wasm powered apps.

My current goal is to build a web, Android and iOS (native) apps that all depend on the same core business logic using WASM.

  • /suit-logic holds the business logic - currently a counter but hopefully soon something more interesting (todos? 😬)

  • /www holds the web version. It uses a "WASM platform provider" that's specific to the platform (web/JS - suit-web) that uses the core one, but the rendering is done on the native platform - the browser/JS, currently using React.

Running

Web version

  1. Build the suit-web WASM module
cd www/suit-web
wasm-pack build --target web
  1. Build the JS app
cd .. # back to www/
npm install
npm run build # or 'npm run dev' for watch
  1. Serve the static web app
npx serve

For development, you can also watch the Rust files with cargo-watch:

# from www/suit-web
 cargo watch --ignore pkg/ -s 'wasm-pack build --target web'

TODOs / Open questions

  • Add persistence to the app with a platform specific persistence provider (ie localstorage for web)
  • [web] Figure out why --target bundle doesn't work with esbuild and if that's something we should be using here
  • [web] Come up with a better way to send the closures to the WebClient
  • [iOS] Build PoC with Swift
  • [Android] Build PoC with Kotlin