#!/bin/bash set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "$SCRIPT_DIR/dev.env" mkdir -p ${RUSTUP_HOME} ${CARGO_HOME} 2> /dev/null || : cd /tmp curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \ && rustup default stable rustup update rustup component add rustfmt clippy rustup target add wasm32-unknown-unknown rustup toolchain install nightly rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu cargo install --version 2.12.0 flutter_rust_bridge_codegen cargo install cargo-expand cargo install wasm-pack dart pub global activate fvm dart --disable-analytics # Build demo project if present if [ -d "$RUST_SAMPLE_PROJECT" ]; then "$RUST_SAMPLE_PROJECT/build.sh" else echo "No sample project found in $RUST_SAMPLE_PROJECT" fi echo "Rust development environment setup completed successfully!"