[package] name = "slides-pdf" version = "0.1.0" edition = "2021" [lib] crate-type = ["cdylib", "rlib"] [dependencies] # krilla is the PDF writer; krilla-svg draws a usvg tree onto one of its # surfaces. It is the successor to svg2pdf, which this crate used until # 2026-09-09 and whose repository (typst/svg2pdf) was archived on # 2026-07-10 pointing here. `raster-images` is krilla's decoder set for # `` hrefs (PNG, JPEG, GIF, WebP); `simple-text` (rustybuzz # shaping for krilla's own text API) is off because every glyph this # crate draws is already positioned by usvg, and krilla-svg calls the # glyph API directly. # # krilla-svg has no Cargo features of its own: its usvg, resvg, # tiny-skia, fontdb, skrifa, flate2 and smallvec dependencies are all # unconditional and all take default features, so there is nothing to # turn off from here. That includes usvg's and fontdb's filesystem # features (fs, memmap, fontconfig), which are pulled in whatever this # manifest says because Cargo features are additive across the graph. # It builds for wasm32-unknown-unknown regardless: memmap2 and # fontconfig-parser carry stubs for non-unix, non-windows targets, and # nothing here ever calls `load_system_fonts` — faces come only from # `Database::load_font_data`. tiny-skia's default `simd` feature also # builds clean for wasm32 (it falls back to scalar code where there is # no `std::arch` to use). krilla = { version = "=0.8.2", default-features = false, features = ["raster-images"] } krilla-svg = "=0.8.1" # Named directly so this crate can build a fontdb::Database from bytes # handed over the ABI and parse the SVG itself. The versions must be the # ones krilla-svg resolves, or `usvg::Tree` would be two distinct types. usvg = { version = "=0.47.0", default-features = false, features = ["text"] } fontdb = { version = "=0.23.0", default-features = false } # No getrandom: unlike the CRDT core (yrs -> fastrand -> getrandom), nothing # in this graph draws entropy (`cargo tree -i getrandom` names no crate), so # there is no backend to override and no `__getrandom_v03_custom` hook to # define. The `--cfg getrandom_backend="custom"` in the root .cargo/config # is inert for this crate. [profile.release] opt-level = "s" lto = true panic = "abort" [dev-dependencies] wasmparser = "=0.258.0" flate2 = "1"