v0.11.1: Embedded shader registry by default
v0.11.0 shipped to crates.io, npm, the Swift xcframework, and the Android AAR, but its PyPI wheels never landed. v0.11.1 is the patch release that unblocks the Linux publish path, and it reframes the decision underneath: a graphics library should not drag a TLS stack into every consumer’s dep tree.
Defaults
Section titled “Defaults”- Every native build now embeds the whole public shader library by default (about 86 KB of WGSL across 233 files).
Shader::new("sdf2d/circle")resolves from the binary, no network needed. Slim down withdefault-features = falseif size matters. - Registry URLs short-circuit to the embedded library. FragmentColor detects a URL of the form
<registry-base>/<category>/<name>.wgsl(default basehttps://fragmentcolor.org/shaders/) as a registry URL and resolves it locally on native, with no network round-trip. SoShader::new("https://fragmentcolor.org/shaders/sdf2d/circle.wgsl")andShader::new("sdf2d/circle")produce the same result, and the verbose URL form keeps working in docs and quickstart examples on every platform. - The web build (
build_web) skips the embedded library via--no-default-features. Slugs and registry URLs resolve over the browser’sfetch()against the live registry instead, keeping the wasm bundle small. networkis a new Cargo feature, off by default on every native target. When on,ureqcompiles withnative-tls, so off-registry URLs (https://example.com/foo.wgsl, etc.) and arbitraryRenderer::create_texture(url)calls fetch over the platform’s system TLS stack (OpenSSL on Linux, Schannel on Windows, Secure Transport on macOS). When off, those non-registry URL paths return a typedNetworkError::feature_disabled()with a clear “rebuild with--features network” message.- No API drift.
Shader::fetchandRenderer::create_textureaccept the same input shapes on every binding. Slugs, registry URLs, file paths, and raw source work everywhere; only off-registry URL fetches change behavior based on how you compile the binary.
Internal
Section titled “Internal”- A new
crate::net::NetworkErrorreplaces directureq::Errorreferences inFragmentColorError::NetworkRequest,RendererError::NetworkRequestError, andShaderError::RequestError. With the feature on, the crate providesFrom<ureq::Error>, and call sites keep using?unchanged. ureqis now an optional dep gated on thenetworkfeature. Without the feature,ring,rustls, andopenssl-sysare out of the default dep tree entirely; PyPI wheels build cleanly across every Linux arch.
- The release regenerates
.github/workflows/publish_py.ymlwith maturin 1.13.1. It picks up newer action versions (actions/checkout@v6,setup-python@v6,upload-artifact@v6,download-artifact@v7,attest-build-provenance@v3), drops the Node.js 20 deprecation warnings, switches touv publish, builds wheels on every PR (so CI catches cross-compile breakage before a release), and adds a Windows ARM64 target.
Metadata
Section titled “Metadata”- The PyPI development status moves from
2 - Pre-Alphato3 - Alpha. Five language bindings ship; the API is settling but pre-1.0 churn continues.
Migration
Section titled “Migration”Most call sites need no changes. On native, registry URLs (https://fragmentcolor.org/shaders/<category>/<name>.wgsl) resolve from the embedded library without touching the network.
Off-registry URLs (anything that doesn’t match <registry-base>/<category>/<name>.wgsl) on native:
- If you can use a registry slug or registry URL, that’s the easiest path. It works offline on every platform.
- If you need an arbitrary URL on native, add
--features networkto your build (cargo add fragmentcolor --features network, or rebuild the Python wheel withmaturin build --features network). - The web binding is unchanged.
Shader.fetch(url)keeps working throughfetch()in the browser for any URL.
Release notes: GitHub v0.11.1.
Rafael
docs/website/src/content/docs/blog/announcing-v0-11-1.mdx