-
Notifications
You must be signed in to change notification settings - Fork 1
/
justfile
29 lines (21 loc) · 1005 Bytes
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
default: gen lint
gen:
export REPO_DIR="$PWD"; cd /; flutter_rust_bridge_codegen \
--rust-input "$REPO_DIR/rust/src/api.rs" \
--dart-output "$REPO_DIR/lib/src/bridge_generated.dart" \
--c-output "$REPO_DIR/frameworks/rust_crate/rust_crate/bridge_generated.h"
build-linux:
export REPO_DIR="$PWD"; cd "$PWD/rust"; cargo build --release; cp "$REPO_DIR/rust/target/release/librust.so" "$REPO_DIR/linux/"
build-windows:
export REPO_DIR="$PWD"; cd "$PWD/rust"; cargo build --release; cp "$REPO_DIR/rust/target/release/rust.dll" "$REPO_DIR/windows"
build-macos:
export REPO_DIR="$PWD"; cd "$PWD/rust"; cargo build --release; cp "$REPO_DIR/rust/target/release/librust.dylib" "$REPO_DIR/macos/Libs"
build-android:
cd rust; cargo ndk -t armeabi-v7a -t arm64-v8a -t x86_64 -t x86 -o ../android/src/main/jniLibs build --release
lint:
cd rust && cargo fmt
dart format .
clean:
flutter clean
cd rust && cargo clean
# vim:expandtab:sw=4:ts=4