Skip to content

Cài đặt môi trường ​

Prerequisites ​

ToolMục đíchCài đặt
BunPackage managercurl -fsSL https://bun.sh/install | bash
RustToolchaincurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
XcodeiOS developmentApp Store
Android StudioAndroid developmentdeveloper.android.com

Quick Start ​

bash
bun install
bun run tauri dev          # Desktop development

Workflow Scripts ​

ScriptMô tảKhi nào dùng
./generate.shXóa src/gen/, chạy bunx buf generateSau khi thay đổi file .proto
./dev.shSet TAURI_DEV_HOST, chạy tauri ios dev trên devicePhát triển iOS hàng ngày
./install.shBuild debug IPA, install lên deviceTest debug build
./release.shBuild release IPA, install lên deviceTest production build

Luôn dùng scripts

Scripts đã config sẵn device ID, bundle ID, và env vars. Không cần nhớ raw commands.

Raw Commands ​

CommandMô tả
bun run tauri devDesktop dev server
bun run tauri buildDesktop production build
bun run tauri ios deviOS simulator
bun run tauri android devAndroid emulator

Environment Variables ​

VariableMô tảDefault
VITE_API_URLURL của gRPC serverhttp://localhost:3000
TAURI_DEV_HOSTIP để iOS device kết nối dev server-

Proto Codegen ​

Sau khi thay đổi file .proto:

bash
./generate.sh    # Regenerate TypeScript types từ proto

Flow: server/proto/mymo/v1/mymo.proto → buf generate → src/gen/mymo/v1/mymo_pb.ts

Type Checking ​

bash
vue-tsc --noEmit    # Frontend TypeScript
cargo clippy        # Server Rust