Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI

# Builds the Deck on macOS *and* Linux so cross-platform stays honest.
# Builds + tests the Deckard workspace on macOS *and* Linux so cross-platform stays honest.
# (GPUI renders with Metal on macOS and Vulkan via wgpu on Linux.)
#
# COST: free. Standard GitHub-hosted runners (macos-latest, ubuntu-latest) are
Expand Down Expand Up @@ -30,9 +30,11 @@ jobs:
# source of truth. rustup (preinstalled on GitHub runners) auto-installs the
# pinned version and its clippy/rustfmt components on the first cargo call.
- uses: Swatinem/rust-cache@v2
- run: cargo build
- run: cargo build --features tray
- run: cargo clippy --all-targets --features tray -- -D warnings
- run: cargo build --workspace
- run: cargo build -p deckard-app --features tray
- run: cargo test --workspace
- run: cargo clippy --workspace --all-targets -- -D warnings
- run: cargo clippy -p deckard-app --all-targets --features tray -- -D warnings

linux:
runs-on: ubuntu-latest
Expand All @@ -56,6 +58,8 @@ jobs:
libfontconfig1-dev libfreetype6-dev \
libssl-dev \
libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
- run: cargo build
- run: cargo build --features tray
- run: cargo clippy --all-targets --features tray -- -D warnings
- run: cargo build --workspace
- run: cargo build -p deckard-app --features tray
- run: cargo test --workspace
- run: cargo clippy --workspace --all-targets -- -D warnings
- run: cargo clippy -p deckard-app --all-targets --features tray -- -D warnings
74 changes: 56 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

89 changes: 17 additions & 72 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,80 +1,25 @@
[package]
name = "deckard"
version = "0.1.0"
edition = "2021"
description = "Deckard — a native, self-custodial Ethereum wallet for onchain operators (GPUI + Rust). Forked from the deck starter; now its own project."
license = "AGPL-3.0-or-later"
default-run = "deckard"

# The GUI app is the workspace root; `deckard-core` is the headless engine (no GPUI).
# Deckard — virtual Cargo workspace.
#
# The root carries NO `[package]`; every crate lives under `crates/`:
# - deckard-app the GPUI desktop app (binary `deckard`)
# - deckard-core the headless engine (Ethereum provider, balances, keystore)
# - deckard-contract the frozen wire contract (Intent / Decision / Policy / RPC)
#
# `cargo run` from the repo root still launches the app via `default-members`.
[workspace]
members = ["crates/deckard-core"]

[[bin]]
name = "deckard"
path = "src/main.rs"

[dependencies]
# The headless engine: Ethereum provider, balances, HD keys, keystore. No GPUI.
deckard-core = { path = "crates/deckard-core" }

# Fresh GPUI, straight from Zed's git — the DEFAULT channel (Metal on macOS, wgpu on
# Linux). `gpui-component` is developed against Zed's gpui HEAD, so the only way to pair
# fresh gpui with the component kit is this matched git pair. Reproducibility comes from
# the committed Cargo.lock (it pins exact commits); bump on a cadence with `just bump-gpui`.
# Prefer the simpler-but-stale pure-crates.io pair instead? See docs/UPGRADING.md.
gpui = { git = "https://github.com/zed-industries/zed" }
# After Zed split gpui into multiple crates, the windowing + renderer backend (and the
# `Application` bootstrap) live in `gpui_platform`.
gpui_platform = { git = "https://github.com/zed-industries/zed", features = ["font-kit"] }
gpui-component = { git = "https://github.com/longbridge/gpui-component" }
# Prebuilt asset source: all gpui-component icon SVGs + bundled fonts.
# Register it with `.with_assets(...)` so `IconName::*` renders.
gpui-component-assets = { git = "https://github.com/longbridge/gpui-component" }

# Preferences: serialize a Settings struct to the platform config dir.
serde = { version = "1", features = ["derive"] }
serde_json = "1"
directories = "5"
qrcode = "0.14"
# Scrub the pending recovery phrase from memory after onboarding.
zeroize = "1"
resolver = "2"
members = ["crates/deckard-app", "crates/deckard-core", "crates/deckard-contract"]
default-members = ["crates/deckard-app"]

# --- Optional: menu-bar / tray apps (`--features tray`) — cross-platform ---
# tray-icon draws a native status item on every OS: NSStatusItem (macOS),
# libappindicator / StatusNotifierItem (Linux), Shell_NotifyIcon (Windows).
# There is no second renderer — your windows stay GPUI everywhere.
tray-icon = { version = "0.24", optional = true }
alloy-signer-local = { version = "2.0.5", features = ["mnemonic"] }
[workspace.dependencies]
# Single-sourced versions shared across crates. deckard-contract pins to these;
# the app and core may layer extra features on top (e.g. alloy-primitives `serde`).
alloy-primitives = "1.6.0"
serde = { version = "1", features = ["derive"] }

[features]
default = []
tray = ["dep:tray-icon", "dep:objc2", "dep:objc2-app-kit", "dep:objc2-foundation"]

# objc2 is only used to hide the macOS dock icon — pull it on macOS only, so a
# Linux/Windows `--features tray` build never tries to compile Apple crates.
[target.'cfg(target_os = "macos")'.dependencies]
objc2 = { version = "0.6", optional = true }
objc2-app-kit = { version = "0.3", optional = true }
objc2-foundation = { version = "0.3", optional = true }

# Profiles are only honoured at the workspace root, so they live here (not in the
# app crate). These shrink the release binary: strip symbols, thin-LTO, one codegen unit.
[profile.release]
strip = true
lto = "thin"
codegen-units = 1

# ---------------------------------------------------------------------------
# `cargo bundle` config (batteries included). On macOS → Deck.app; cargo
# bundle can also emit `deb` on Linux. Run `just bundle`.
# cargo install cargo-bundle
# Drop your own 1024x1024 PNG at assets/icon.png and re-bundle to rebrand.
# ---------------------------------------------------------------------------
[package.metadata.bundle]
name = "Deckard"
identifier = "com.deckard.app"
icon = ["assets/icon.png"]
category = "public.app-category.finance"
short_description = "A native, self-custodial Ethereum wallet for onchain operators."
long_description = "Deckard is a fast, keyboard-first, self-custodial Ethereum wallet for people who live onchain. Native (macOS + Linux), trustless by construction, open source (AGPL-3.0)."
osx_minimum_system_version = "11.0"
Loading
Loading