Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imwildcat/rust-mobile-web-demo
Build and run Rust on Android, iOS and Web
https://github.com/imwildcat/rust-mobile-web-demo
Last synced: 5 days ago
JSON representation
Build and run Rust on Android, iOS and Web
- Host: GitHub
- URL: https://github.com/imwildcat/rust-mobile-web-demo
- Owner: imWildCat
- Created: 2023-09-12T18:01:52.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-12T20:26:34.000Z (about 1 year ago)
- Last Synced: 2024-10-26T07:33:42.727Z (18 days ago)
- Language: Kotlin
- Homepage:
- Size: 113 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rust Mobile / Web Demo
## Get Started
### Install Rust
### Android
```bash
# prepare rust toolchain
rustup target add aarch64-linux-android x86_64-linux-android i686-linux-android armv7-linux-androideabi
``````bash
# generate kotlin API
pushd shared_lib && scripts/generate_kotlin.sh && popd
``````bash
# build android libs
pushd apps/RustKotlinDemo && ./gradlew cargoBuild --info && popd
```Open `apps/RustKotlinDemo` in Android Studio and run the app.
### iOS
```bash
# prepare rust toolchain
rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim
``````bash
# generate swift API
pushd shared_lib && scripts/generate_swift.sh && popd
``````bash
# build for iOS simulator (Apple Silicon)
pushd shared_lib && scripts/build_for_ios_simulator.sh && popd
```Open `apps/DemoRustSwiftApp/DemoRustSwiftApp.xcodeproj` and run the app.
### Build for Web
#### Install node.js and pnpm
#### Build and run the web demo
```bash
cd apps/web-demo && pnpm install && pnpm run build && pnpm run serve
```## Misc
### Enabling Rust breakpioints in Xcode
## License
MIT