8000 zedra/docs/GET_STARTED.md at main · bu5hm4nn/zedra · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
119 lines (90 loc) · 4.12 KB

GET_STARTED.md

File metadata and controls

119 lines (90 loc) · 4.12 KB

Getting Started

Prerequisites

Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add aarch64-apple-ios aarch64-apple-ios-sim  # iOS
rustup target add aarch64-linux-android                     # Android

Git Submodules

git submodule update --init --recursive

iOS

  • Xcode 26+ (App Store) — sudo xcodebuild -license accept
  • xcodegen: brew install xcodegen
  • libimobiledevice: brew install libimobiledevi 6A0C ce (for device logs)
  • CocoaPods: sudo gem install cocoapods

Android

  • Android Studio / SDK (API 31+)
  • Android NDK r25c+
  • Set env vars:
    export ANDROID_NDK_ROOT=$HOME/Library/Android/sdk/ndk/<version>
    export ANDROID_HOME=$HOME/Library/Android/sdk
  • cargo install cargo-ndk

iOS Development

./scripts/run-ios.sh device          # full build + install + launch
./scripts/run-ios.sh sim             # simulator
./scripts/run-ios.sh device --release  # release build
./scripts/ios-log.sh tail                 # stream device logs
./scripts/ios-log.sh tail --filter zedra  # filtered logs

See docs/IOS_WORKFLOW.md for full pipeline details.

Android Development

./scripts/build-android.sh                     # build Rust .so
cd android && ./gradlew installDebug && cd ..  # install APK
./scripts/log-android.sh start                 # background log monitor
./scripts/log-android.sh tail                  # view logs

Android release builds read signing credentials from Gradle properties. Gradle loads ~/.gradle/gradle.properties automatically, so a global config can use:

ZEDRA_KEYSTORE=/absolute/path/to/zedra-release.jks
ZEDRA_KEYSTORE_ALIAS=zedra
ZEDRA_KEYSTORE_PASSWORD=...
# Optional when the key password differs from the keystore password:
ZEDRA_KEY_PASSWORD=...

Host Daemon

cargo run -p zedra-host -- start                    # start, show QR
cargo run -p zedra-host -- start --workdir ~/project  # specific directory
cargo run -p zedra-host -- start --detach           # keep running after SSH logout
cargo run -p zedra-host -- start --static-qr        # static startup QR for review/testing
cargo run -p zedra-host -- qr --workdir .           # refresh one-time QR
cargo run -p zedra-host -- qr --workdir . --static  # static QR for testing/store review
cargo run -p zedra-host -- logs --workdir .         # show recent daemon logs
cargo run -p zedra-host -- client                   # measure RTT
cargo run -p zedra-host -- stop                     # stop daemon

Scan the printed QR from the app, or pass the URL during development:

./scripts/run-ios.sh sim --no-build --launch-url 'zedra://connect?ticket=...'

Windows Host CLI

Windows support is for the host daemon, not a native desktop client.

irm https://zedra.dev/install.ps1 | iex
zedra start --workdir C:\path\to\project --detach
zedra qr --workdir C:\path\to\project
zedra status --workdir C:\path\to\project
zedra logs --workdir C:\path\to\project
zedra client --workdir C:\path\to\project --count 3
zedra stop --workdir C:\path\to\project

Runtime files are stored under %APPDATA%\zedra\workspaces\. daemon.lock uses the lock hash for the workdir; daemon.log, sessions.json, host-info.json, and API discovery files use the stable workspace hash. Terminal sessions use ZEDRA_SHELL when set, otherwise Zedra detects the shell that launched the host, then falls back to SHELL, then %ComSpec% (cmd.exe). Supported launch shells are cmd.exe, pwsh.exe, powershell.exe, and Git Bash/POSIX-style shells.

To build from source instead, install the MSVC Rust toolchain and Git for Windows, then run cargo build -p zedra-host.

Pre-Commit Checks

cargo fmt
cargo check -p zedra-rpc -p zedra-session -p zedra-terminal -p zedra-host

Troubleshooting

  • Black screen (Android): surface dimensions must be physical pixels. Check Vulkan 1.1+: adb shell getprop ro.hardware.vulkan
  • Submodule missing: git submodule update --init --recursive
  • iOS provisioning: check DEVELOPMENT_TEAM in ios/project.yml
  • Metal shader fail: xcodebuild -downloadComponent MetalToolchain
0