sqzass.git

sqzass

~ A static site generator written in Rust
git clone https://github.com/debuman/sqzass.git

docs/content/start/installation.md (4046B)

      1 +++
      2 title = "Installation"
      3 description = "One line, a prebuilt binary, or from source"
      4 weight = 10
      5 toc = true
      6 +++
      7 
      8 sqzass is a single binary with no runtime dependencies. No Node, no Python, no
      9 system libraries.
     10 
     11 ## One line
     12 
     13 ```bash
     14 curl -fsSL https://sqzass.sqzer.com/install.sh | sh
     15 ```
     16 
     17 The script does exactly four things, and you can [read it](/install.sh) first:
     18 detect the platform (Linux on x86_64 or ARM64, or Apple-silicon macOS), download the latest
     19 release tarball with its `.sha256`, verify the checksum, and `install` the
     20 binary into `/usr/local/bin` — asking for sudo only if that directory is not
     21 writable. Set `SQZASS_INSTALL_DIR` to install somewhere else. It touches
     22 nothing else: no shell config, no `PATH` edits.
     23 
     24 ## With Cargo
     25 
     26 If you already have Rust, one line builds it from source:
     27 
     28 ```bash
     29 cargo install --git https://github.com/debuman/sqzass
     30 ```
     31 
     32 ## Arch Linux
     33 
     34 [`sqzass`](https://aur.archlinux.org/packages/sqzass) is in the AUR, built from
     35 the release tag:
     36 
     37 ```bash
     38 yay -S sqzass          # or paru, or makepkg -si on a clone
     39 ```
     40 
     41 There is no `sqzass-bin`. Building a Rust tool from source is normal on Arch,
     42 and two packages would only raise the question of which one is current.
     43 
     44 ## With a coding agent
     45 
     46 Paste this at an agent and it has enough to finish without guessing:
     47 
     48 ```
     49 Set up sqzass in this project.
     50 Read https://sqzass.sqzer.com/agent.md first — it covers the install (sqzass is
     51 not on crates.io), the TOML front matter, how @/ links resolve, and the error
     52 identifiers to match on.
     53 ```
     54 
     55 [`/agent.md`](/agent.md) is the long version: the same install commands, the
     56 rules that are not guessable from a file tree, and the exit-code table. It exists
     57 because an agent asked to "add a static site generator" will otherwise reach for
     58 `cargo install sqzass`, which fails — sqzass is installed from git or a release
     59 tarball.
     60 
     61 ## From source
     62 
     63 ```bash
     64 git clone https://github.com/debuman/sqzass
     65 cd sqzass
     66 cargo build --release
     67 ```
     68 
     69 The binary lands at `target/release/sqzass`.
     70 
     71 ## Requirements
     72 
     73 | Requirement | Version |
     74 |---|---|
     75 | Rust | 1.97 or newer |
     76 | A C compiler | rustc drives the linker with it; the default build also compiles Oniguruma, the highlighter's regex engine, with it. |
     77 | Everything else | — |
     78 
     79 The exact configuration the static release ships — the pure-Rust regex
     80 engine, no C source compiled — is a feature flag away:
     81 
     82 ```bash
     83 cargo build --release --no-default-features --features pure-rust
     84 ```
     85 
     86 ## Prebuilt binaries
     87 
     88 Attached to each [release](https://github.com/debuman/sqzass/releases): two
     89 statically linked Linux builds, `x86_64-unknown-linux-musl` and
     90 `aarch64-unknown-linux-musl`, and an `aarch64-apple-darwin` one, each with a
     91 `.sha256` beside it.
     92 
     93 ```bash
     94 curl -LO https://github.com/debuman/sqzass/releases/latest/download/sqzass-x86_64-unknown-linux-musl.tar.gz
     95 tar xzf sqzass-x86_64-unknown-linux-musl.tar.gz
     96 sudo install -m755 sqzass-*/sqzass /usr/local/bin/
     97 ```
     98 
     99 The Linux builds are static, so they have no glibc requirement and run on
    100 distributions older than the one they were built on — which is also why one
    101 tarball covers Debian, Fedora and Arch alike. They are the builds that use the
    102 pure-Rust regex engine: everywhere else sqzass highlights with Oniguruma, which
    103 is measurably faster on code-heavy sites, but Oniguruma is a C binding and a C
    104 binding is exactly what breaks a musl static build. The engines' grammar sets
    105 are not identical either: the pure-Rust engine cannot run a few grammars'
    106 regexes, so the static artifacts drop seven of them entirely — PowerShell,
    107 JavaScript (Babel), Salt State and ARM Assembly among them. A ` ```powershell `
    108 or ` ```jsx ` fence that a native build highlights in full falls back to plain
    109 text there, without an error. Even ` ```js ` differs in markup structure: the
    110 native build resolves it to the Babel grammar, the static ones to plain
    111 JavaScript. Each binary is still fully deterministic on its own.
    112 
    113 ## Checking the install
    114 
    115 ```bash
    116 sqzass --version
    117 ```
    118 
    119 Next: [Your first site](@/start/first-site.md).