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
// SPDX-License-Identifier: Apache-2.0
//! `heddle-fuse-worker` — out-of-process FUSE callback handler.
//!
//! See `crates/mount/src/worker.rs` for the architecture; this file
//! is the thinnest possible `main` shim — argv → [`mount::worker::run_worker`].
//!
//! Co-located in the CLI crate so `cargo install --path crates/cli`
//! (and `cargo install heddle` from crates.io) ships the worker
//! binary alongside `heddle` itself. Without that co-location the
//! sibling lookup in `mount::worker::default_worker_binary` finds
//! nothing on a standard install and the mount lifecycle silently
//! falls back to NFS (heddle#190 r4 / Codex PR #225 P1).
//!
//! Per-function cfg (not crate-level) so the binary still compiles
//! on macOS/Windows when someone runs `cargo install heddle-cli
//! --features mount` there: `required-features = ["mount"]` selects
//! the `[[bin]]` on all three platforms, so `main` must exist on
//! every target the `mount` feature compiles for. The non-Linux
//! main is a stub that prints a usable error and exits 2 — the
//! supervisor on those platforms uses the in-process mount path
//! (heddle#190 r5 / Codex PR #225 P1).
//!
//! Cross-platform correctness of this pattern is verified by code
//! review + `cargo check` at PR time, not by a CI cross-compile
//! job: provisioning mingw-w64 + cross-compiling `aws-lc-sys`
//! (transitive via `rustls`) added several minutes to every CI run
//! to verify a handful of lines of trivial cfg, which is out of
//! proportion to the value (heddle#190 r7).
use ExitCode;
use ;
// Non-Linux stub. The crash-isolation worker is FUSE-specific and
// only meaningful on Linux; FSKit and ProjFS run their callbacks
// in-process via their own platform sandboxes. We still ship the
// binary on macOS/Windows so `cargo install` produces the same
// file set everywhere (avoids "missing binary" surprises in
// scripts and packagers); invoking it exits with a clear error.