Skip to content

stet 0.8.0

Choose a tag to compare

@github-actions github-actions released this 30 Aug 19:06
· 23 commits to main since this release

The release you can download. Every release before this one shipped source
only, so trying stet meant installing a Rust toolchain and compiling a
workspace including a GUI stack — a barrier for exactly the people most
likely to want it, who are replacing a Ghostscript call in a pipeline. This
one attaches prebuilt binaries for Linux, macOS and Windows, and adds the
-o flag such a pipeline needs to say where output goes.

Added

  • Prebuilt binaries on every release. Linux (static musl and glibc+viewer),
    macOS (Apple Silicon and Intel) and Windows, with a SHA256SUMS file.

    The static musl build is the one most people want: no glibc version
    requirement, no runtime libraries, no GUI, and nothing to install alongside
    it — all 56 resources are embedded in the binary. The glibc build adds the
    interactive viewer and needs glibc 2.35 or newer.

    The binaries are unsigned, and the release notes say so rather than letting
    you find out: macOS Gatekeeper quarantines browser downloads (install with
    curl instead), and Windows SmartScreen warns about an unknown publisher.

  • -o / --output for the CLI. Output no longer has to land next to the
    input. The path is a template: a %d in it is replaced by the page number
    and %0Nd zero-pads (p-%03d.png gives p-001.png), while a path without
    a token names a single file, written exactly as given with no extension
    mangling. This is the shape gs -sOutputFile= uses, so an existing
    shell-out pipeline can point at stet without restructuring.

    Naming is decided by the template rather than by the page count, which is
    what makes PostScript and PDF input behave identically — a PostScript page
    count is not knowable in advance, since pages appear as showpage runs.
    Where Ghostscript resolves that by opening the literal path once and
    streaming every page into it (leaving several concatenated images in one
    file, exit 0, no warning), stet stops with an error on the second page,
    names a %03d form to use, and leaves page 1 intact. For PDF input the page
    count is known up front, so the same mistake is refused before anything is
    rendered.

    -o takes one input file, and is rejected for --device viewer and
    --device null, which write no file. --device pdf collects every page
    into one file, so a %d token there is an error rather than being ignored.
    Writing to stdout (-o -) is not implemented and says so.

    Default naming without -o is unchanged: in-0001.png for PostScript,
    doc.png / doc-001.png for PDF.

Fixed

  • stet-cli did not build with --no-default-features. The viewer
    feature was not genuinely optional: render_dropped_pdf names viewer
    channel types in its signature but carried no #[cfg], so a headless build
    failed to compile even though both of its callers sit inside the
    viewer-gated run_viewer_mode. This is the configuration a server, CI or
    container install wants, and the one a static musl binary requires.

  • A headless build's --help advertised a viewer it does not have. It
    listed --device viewer — which exits with "viewer not available" — and
    claimed a bare stet launches the viewer, when it starts the REPL. Both
    lines are now conditional on the feature.

  • A job that requested a non-zero exit status was reported as having
    completed.
    .quitwithcode 1 and the new --output failure both end the
    job through quit, which printed "completed (quit)" regardless of the code
    requested. A non-zero code now prints "FAILED". The process exit status was
    already correct.

Downloads

stet-<version>-x86_64-unknown-linux-musl.tar.gz is the one most people
want: statically linked, no glibc requirement, no runtime libraries, no GUI.
It is the right choice for servers, CI and containers.

The -gnu Linux build adds the desktop viewer and needs glibc 2.35 or newer
(Debian 12, Ubuntu 22.04 and later) plus X11 or Wayland and OpenGL to open a
window. Rendering to files works without them.

macOS: the binaries are unsigned, so opening a downloaded archive from
Finder trips Gatekeeper ("cannot be opened because the developer cannot be
verified"). Installing with curl avoids it entirely, because the quarantine
attribute is set by the downloading application and curl does not set one:

curl -L <asset-url> | tar xz

If you already downloaded it in a browser, clear the flag with
xattr -dr com.apple.quarantine stet.

Windows: SmartScreen will warn that the publisher is unknown; choose
More info -> Run anyway. Code signing certificates cost money and stet does
not have one.

Rendering is identical across these artifacts with one caveat: the musl
build's libm differs from glibc's in the last bits, which can shift
antialiasing coverage by a pixel or two on heavily curved PostScript
artwork (measured: 265 of 5.4M pixels on one sample, invisible in practice;
all PDF samples tested were byte-identical). Do not generate rendering
baselines with one build and compare them against another.

Verify a download against SHA256SUMS.