stet 0.7.0 — PDF-only builds drop the PostScript VM
A dependency-hygiene release. A PDF-only consumer no longer compiles the
PostScript interpreter, a mesh-shading memory fault that scaled with core
count is fixed, and --device null works for the scripting use it is
documented for.
Breaking
One change, affecting only consumers who already opt out of stet-render's
default features. This is why the bump is minor rather than patch.
-
stet-renderwithdefault-features = falseno longer provides
SkiaDeviceor itsOutputDeviceimplementation. They now sit behind the
new default-onps-devicefeature. At 0.6.0, opting out of defaults dropped
onlyparallel; it now drops the device as well, so a consumer who declared
stet-render = { version = "0.6", default-features = false }to get a
single-threaded build will fail to compile against 0.7. Add the features you
want by name:stet-render = { version = "0.7", default-features = false, features = ["ps-device"] }
Nothing changes for consumers on default features, which is the overwhelming
majority:default = ["parallel", "ps-device"].
Changed
-
stet-pdf-readerno longer links the PostScript interpreter. Its
default features pulledstet-render, which depended unconditionally on
stet-corefor a single trait, so a PDF-only consumer compiled the whole
PostScript VM — contradicting the README's "PDF-only users don't pay for the
VM".stet-rendernow gatesSkiaDeviceand itsOutputDevice
implementation behind a new default-onps-devicefeature, and the reader
takes the crate without it.stet-pdf-reader's dependency closure is now
stet-fonts,stet-graphics,stet-renderand the two tiny-skia forks,
with PDF → RGBA rendering and parallelism unchanged.Consumers on default features are unaffected; see Breaking above for the
one case that is not.
Fixed
-
--device nullaborted PostScript programs that query the page device.
The flag is documented for "test / scripting use", but it installed the PLRM
nulldeviceoperator rather than a page device. That resets the CTM to
identity and leaves no page-device parameters, socurrentpagedevice /OutputDevice getraisedundefinedandinitmatrixhad no device matrix
to restore — stet's own PostScript test suite aborted partway through under
the flag meant for running it.--device nullnow installs a real page
device (a newOutputDevice/null.psresource) that reports itself as
/null, carries a page size and resolution like any other device, and still
produces no output: nothing is rasterized and/EndPagenever transmits a
page. The suite now passes identically onpng,pdfandnull, and CI
runs it onnullas well so this cannot regress unnoticed. -
Mesh-shaded PDFs could exhaust memory and fail to render, worse the more
cores the machine had.render_patch_shadingtriangulated every patch of
a shading regardless of which band was being drawn, and bands render
concurrently — one per thread — so the same triangle list was built once per
core. Cost scaled with core count rather than with the file. A prepress PDF
with a page-spanning Coons mesh at 300 dpi peaked at 2.1 GB on one thread and
31.4 GB on sixteen, and on a 24-core machine with less than ~50 GB of RAM it
did not render at all. Patches and triangles that cannot reach the band being
drawn are now skipped before they are built. The same file now renders in
0.94 s at 2.2 GB on 24 threads, and CPU time at 16 threads fell from 99.1 s
to 5.8 s — the surplus was duplicated work, so throughput improves alongside
memory. Rendered output is byte-identical.