hero_core-wasm
v0.1.21
Published
Android ======= To Build the Android Library ------------------------ * **Ensure cargo.toml uses [lib] crate-type = ["cdylib"]** * Type: . ./scripts/build_ios.sh
Readme
Android
To Build the Android Library
- Ensure cargo.toml uses [lib] crate-type = ["cdylib"]
- Type: . ./scripts/build_ios.sh
iOS
To Build the iOS Library
- Ensure cargo.toml uses [lib] crate-type = ["staticlib"]
- Open a terminal
- cd to the project root directory.
- First Time:
- Type: cbindgen src/lib.rs -l c > hero_corelib.h
- Currently, cbindgen will include some unneeded #defines. Open hero_corelib.h in the project root and delete ALL #defines. Do the same for ios/include/hero_corelib.h
- Every Time:
- Type: . ./scripts/build_ios.sh
To Use the iOS Library
The library is already set up for use in the xcode project. Just open /ios/hero-designer-ios/hero-designer-ios.xcodeproj in xcode.
NPM
To Build the WASM Package:
- Ensure cargo.toml uses [lib] crate-type = ["cdylib", "rlib"]
- Type: wasm-pack build
To Publish the WASM Package to NPM:
- Open a terminal at the project root directory.
- Type: cd pkg
- Edit package.json, changing the package name to hero_core-wasm and bump the version number.
- https://www.npmjs.com/package/hero_core-wasm
- Type: npm login
- username: magicjava password: JazuTKPaaQV2ek+xAlRsub4iIYc= email: [email protected]
- Type: npm publish
Examples
To Build the Examples
- Ensure the [lib] section of cargo.toml has all entries commented out
- Type: cargo run --example [example_name]
Deploy To Heroku
To deploy
- Ensure the [lib] section of cargo.toml has all entries commented out
- Ensure code is pushed to git
- Type: git push heroku master
- [email protected]
- heroku git:remote -a gentle-dusk-67062
Resources
Android Resources
- Rust on Android (blogpost)
- Rust once and share it with Android, iOS and Flutter (blogpost)
- An Overview of the Android Jetpack Navigation Architecture Component
- Jetpack Compose basics
- Pickers
iOS Resources
- Rust once and share it with Android, iOS and Flutter (blogpost)
- Introduction to SwiftUI
- Human Interface Guidelines
Rust Resources
Add examples to your Rust libraries Heroku buildpack for Rust How to publish packages to npm (the way the industry does things)
- WASM Resources
