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
//! shoka — your repository bookshelf.
pub
/// Install the `aws_lc_rs` rustls `CryptoProvider` as the process
/// default. Both reqwest and octocrab pull rustls 0.23 into the
/// build with conflicting `CryptoProvider` features enabled, so
/// rustls refuses to auto-pick one and panics the first time any
/// HTTPS handshake runs unless this is called first. Call it as
/// early as possible in `main()` — before any code path that
/// touches HTTPS (`shoka cache refresh`, gh snapshot, self-update,
/// clone).
///
/// The `Result` is intentionally discarded: `install_default()` is
/// idempotent in the success case but returns `Err` when *some
/// other* library has already claimed the slot. Racing-and-losing
/// silently is the right behavior — we just need *a* provider
/// installed, and the other library's choice is fine if it got
/// there first.
/// Windows `CreateProcess` flag that suppresses the new-console-window
/// allocation for a console-subsystem child. Set on every short-
/// lived subprocess shoka spawns (`gh auth token`, `jj git clone`,
/// `jj git fetch/push`, etc.) because the background cache refresh
/// runs detached without a console — and when a console-less parent
/// spawns a console child, Windows allocates a fresh black window
/// for the child by default, flashing on every command tail. The
/// flag is a no-op when the parent already owns a console (the
/// child just inherits it as usual), so it's safe to apply
/// unconditionally at every subprocess site.
pub const