| 24 |
24 |
|
`-e PROGRAM [ARGS...]` runs a program instead of the login shell, as every
|
| 25 |
25 |
|
terminal does. `--exec 'CMD'` is the shell-string form, for benchmarks.
|
| 26 |
26 |
|
|
|
27 |
+ |
## Building
|
|
28 |
+ |
|
|
29 |
+ |
Three system libraries are linked at build time, so their development headers
|
|
30 |
+ |
have to be installed. A Rust toolchain and these are the whole list.
|
|
31 |
+ |
|
|
32 |
+ |
Fedora:
|
|
33 |
+ |
|
|
34 |
+ |
```
|
|
35 |
+ |
dnf install rust cargo pkgconf wayland-devel libxkbcommon-devel fontconfig-devel
|
|
36 |
+ |
```
|
|
37 |
+ |
|
|
38 |
+ |
Debian, Ubuntu, Pop!_OS:
|
|
39 |
+ |
|
|
40 |
+ |
```
|
|
41 |
+ |
apt install pkg-config libwayland-dev libxkbcommon-dev libfontconfig-1-dev
|
|
42 |
+ |
```
|
|
43 |
+ |
|
|
44 |
+ |
Then `cargo build --release`, which leaves the binary at `target/release/shop`.
|
|
45 |
+ |
`ldd` on it is the check if this list ever looks wrong.
|
|
46 |
+ |
|
|
47 |
+ |
What each one is for, and how it fails if it is missing:
|
|
48 |
+ |
|
|
49 |
+ |
- **libwayland-client.** `wayland-client` is built with its `system` feature, so
|
|
50 |
+ |
it calls the C library instead of reimplementing the wire protocol. Its
|
|
51 |
+ |
`wayland-sys` build script probes `wayland-client` through pkg-config and
|
|
52 |
+ |
panics if it is absent.
|
|
53 |
+ |
- **libxkbcommon.** Keymap handling and key encoding, reached through
|
|
54 |
+ |
smithay-client-toolkit. The `xkbcommon` crate has no build script and no
|
|
55 |
+ |
pkg-config probe; it declares `#[link(name = "xkbcommon")]` directly, so a
|
|
56 |
+ |
missing dev package surfaces late, as a linker error about `-lxkbcommon`
|
|
57 |
+ |
rather than as a build-script message. The runtime `.so.0` is not enough on
|
|
58 |
+ |
its own: the link needs the `.so` symlink the dev package carries.
|
|
59 |
+ |
- **libfontconfig.** The system font query described under Fonts.
|
|
60 |
+ |
`yeslogic-fontconfig-sys` panics out of its build script with a pkg-config
|
|
61 |
+ |
dump advising you to set `PKG_CONFIG_PATH`, which is the wrong instruction
|
|
62 |
+ |
when the package is simply not installed.
|
|
63 |
+ |
|
|
64 |
+ |
Fontconfig is linked rather than dlopened, deliberately. The crate supports
|
|
65 |
+ |
`RUST_FONTCONFIG_DLOPEN` and shop does not set it: the font lookup runs on the
|
|
66 |
+ |
first character the bundled font lacks, which can be a long way into a session,
|
|
67 |
+ |
and a link error at build time is a better failure than a missing library found
|
|
68 |
+ |
when somebody prints CJK. Anyone repackaging shop who wants fontconfig soft can
|
|
69 |
+ |
set that variable and accept the runtime failure instead.
|
|
70 |
+ |
|
| 27 |
71 |
|
## Layout
|
| 28 |
72 |
|
|
| 29 |
73 |
|
- `crates/shop/` — the binary.
|