Build

  • install and config rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
  • use rust nightly
rustup default nightly

we use build-std feature, so add nightly src component

rustup component add rust-src --toolchain nightly-x86_64-apple-darwin

clone repository and open in command line tool. then run

cargo check

wait crates download…

cargo build -p ezlog

for Flutter build

flutter packages get

flutter packages upgrade

For android build

  • add android targets
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android

we use cargo-ndk to build dylib

cargo install cargo-ndk

cd android

sh b_android.sh

then open current workspace in AndroidStudio

For iOS build

  • add iOS targets
rustup target add aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios

install cbindgen

cargo install --force cbindgen

cd ios dir

sh b_ios.sh

open the ios/EZlog.xcworkspace in Xcode