Installing snug
Status @ 2025-03-15: there is a build of snug being done on Forgejo but it’ snot being uploaded anywhere yet.
Typically, one would clone the https://code.bearcove.cloud/snug repository
to ~/bearcove/snug
, then run just run
, which will do all the building required:
snug on main [$] via 🦀 v1.85.0
❯ just run
Finished `release` profile [optimized + debuginfo] target(s) in 0.47s
Usage: snug <COMMAND>
Commands:
serve Serves the site
mom Serves mom
term Records a terminal session with colors, ready to paste into markdown
init Initializes the project
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
error: Recipe `run` failed with exit code 2
…and after that, put in ~/.cargo/bin/snug
a launcher script like so:
#!/bin/bash
pushd ~/bearcove/snug > /dev/null
export DYLD_LIBRARY_PATH="$(rustc --print target-libdir)"
popd > /dev/null
export DYLO_BUILD=0
export PROFILE=release
~/bearcove/snug/target/run/${PROFILE}/snug "$@"
Make it executable, and take it for a spin:
snug-from-scratch on main
❯ chmod +x ~/.cargo/bin/snug
snug-from-scratch on main
❯ which snug
/Users/amos/.cargo/bin/snug
snug-from-scratch on main
❯ snug help
Usage: snug <COMMAND>
Commands:
serve Serves the site
mom Serves mom
term Records a terminal session with colors, ready to paste into markdown
init Initializes the project
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
Now, let’s set up a fresh snug site