-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
107 lines (101 loc) · 5.46 KB
/
Copy pathCargo.toml
File metadata and controls
107 lines (101 loc) · 5.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# The universal DIG installer.
#
# By DEFAULT `dig-installer` installs the full DIG stack for the current OS/arch,
# from the canonical DIG-Network GitHub releases, in one run (#301):
# * the `digstore` CLI binary, placed on PATH, along with its `digs` alias
# binary (issue #434) — published in the SAME digstore release under its
# own asset stem, installed alongside digstore with no flag of its own;
# * the `dig-node` local-node binary, installed + started as a boot-start OS
# service by delegating to dig-node's own `install`/`start` subcommands (it
# is the standalone-server twin of the native DIG Browser's in-process
# dig-node; see SYSTEM.md → dig-companion/dig-node), along with its `dign`
# alias binary (issue #548) installed alongside it the same way as `digs`;
# * `dig-dns` (local `*.dig` name resolution, #177/#174), installed + started
# as a boot-start OS service — Windows Service / macOS LaunchDaemon / Linux
# systemd — but, unlike dig-node/dig-relay, dig-dns ships no service
# subcommands of its own, so this installer owns the full per-OS service +
# split-DNS/NRPT + browser-policy wiring directly (`src/dns/`), along with
# its `digd` alias binary (issue #548), same pattern as `digs`/`dign`; and
# * the `dig-updater` auto-update beacon (+ its `dig-updater-worker`
# sibling, issue #514), registered by delegating to dig-updater's own
# `schedule install` subcommand (a daily Windows Scheduled Task / systemd
# timer / macOS LaunchDaemon that checks for + installs new signed DIG
# releases automatically; see `src/beacon.rs`).
# Any of the four can be opted OUT with `--no-<component>`; `dig-relay` and the
# DIG Browser stay opt-in (`--with-relay`/`--with-browser`).
#
# It does NOT build either binary itself: digstore still `cargo`-builds and
# publishes the `digstore` binary from its own repo; dig-installer only CONSUMES
# those released artifacts. This is the canonical home of the DIG installer,
# migrated out of digstore (which previously shipped a Tauri GUI installer).
[package]
name = "dig-installer"
version = "0.17.0"
description = "Universal DIG installer — installs the digstore CLI, the dig-node service, the dig-dns service, and the DIG auto-update beacon by default (dig-relay + DIG Browser opt-in)"
authors = ["DIG Network"]
edition = "2021"
license = "GPL-2.0-only"
repository = "https://github.com/DIG-Network/dig-installer"
# Standalone single-crate repo — its own workspace root.
[[bin]]
name = "dig-installer"
path = "src/main.rs"
[lib]
name = "dig_installer"
path = "src/lib.rs"
[dependencies]
clap = { version = "4", features = ["derive"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Blocking HTTP with rustls (no system OpenSSL) — matches the digstore/dig-node
# crates' rustls-only posture so the installer is a self-contained binary.
ureq = { version = "2", default-features = false, features = ["tls", "json", "gzip"] }
sha2 = "0.10"
hex = "0.4"
dirs = "5"
tempfile = "3"
# Cross-platform service manager (Windows SCM via sc.exe, Linux systemd,
# macOS launchd) — used to register dig-dns as an OS service (task #177):
# unlike dig-node/dig-relay (which register THEMSELVES via their own
# `install`/`start` subcommands), dig-dns ships no such subcommand, so
# dig-installer registers it directly. `ServiceInstallCtx.contents` lets us
# supply a fully custom unit-file/plist body (CAP_NET_BIND_SERVICE, a
# dedicated user, log paths) that the crate's own generator does not cover.
service-manager = "0.7"
# The canonical DIG-node loopback port default (`DIG_NODE_PORT`) — one source of
# truth shared with dig-node itself, so the installer's own default (service.rs
# `ServiceConfig::default`, the `--dig-node-port` CLI default, and the
# `--help-json` doc value) can never drift from dig-node's real default. No
# `rev` pin (bare `version + git`): the ecosystem convention (see dig-node-core's
# own dig-constants dependency) so a shared consumer graph resolves to ONE copy.
dig-constants = { version = "0.3", git = "https://github.com/DIG-Network/dig-constants" }
[dev-dependencies]
# End-to-end CLI contract tests: drive the built `dig-installer` binary and
# assert its --help-json/--help/exit-code surface (no network).
assert_cmd = "2"
[target.'cfg(windows)'.dependencies]
# User-PATH update on Windows: read/write HKCU\Environment directly (no setx
# truncation) and broadcast WM_SETTINGCHANGE so new shells pick up the change.
winreg = "0.52"
windows-sys = { version = "0.59", features = [
"Win32_Foundation",
"Win32_UI_WindowsAndMessaging",
# SHGetKnownFolderPath(FOLDERID_ProgramData) — resolve %ProgramData% via the
# known-folder API (not the spoofable %PROGRAMDATA% env) for the hardened
# machine-wide daemon state dir (daemon_dir.rs). CoTaskMemFree frees its buffer.
"Win32_UI_Shell",
"Win32_System_Com",
# MoveFileExW(…, MOVEFILE_DELAY_UNTIL_REBOOT) — the locked-binary fallback
# (#544): stage + schedule a reboot-time replace when a running service still
# holds its exe open (download.rs::schedule_replace_on_reboot).
"Win32_Storage_FileSystem",
] }
# NOTE: the `windows-service` crate (the SCM service-protocol dispatcher) was
# removed with the host-shim (#499): the dig-dns Windows service now runs
# `dig-dns.exe run-service` DIRECTLY — dig-dns owns its own SCM entrypoint — so
# the installer no longer hosts the service and needs no dispatcher of its own.
[profile.release]
overflow-checks = true
opt-level = "s"
lto = true
strip = true