diff --git a/.cargo/config.toml b/.cargo/config.toml index 2ccbcc61a3..7538a50cb0 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -6,10 +6,17 @@ xtask = "run -p xtask --" [target.wasm32-unknown-unknown] rustflags = ["-C", "target-feature=+simd128"] +[env] # aws-lc (digital signatures and TLS, through aws-lc-rs) detects the CPU when `main` asks it to # (`pdfcraft_sign::init_crypto`), not in a static initializer before `main`. On x86 it reads # `OPENSSL_ia32cap` then, and aborts when that asks for a feature the processor lacks; each # executable first runs itself again without the variable (#2916, `pdfcraft_platform::crypto_env`), # which it can only do once `main` runs. -[env] AWS_LC_SYS_CFLAGS = "-DBORINGSSL_NO_STATIC_INITIALIZER" + +# The optional craft-fonts build input (the Japanese face and the other UI faces; see +# crates/fonts/build.rs). A plain build embeds nothing and prints no warning, so a local build +# embeds a craft-fonts checkout next to this repository when there is one. A `CRAFT_FONTS_DIR` +# already in the environment wins (CI sets its own), and a missing checkout only gives the +# "building without craft-fonts" warning. +CRAFT_FONTS_DIR = { value = "../craft-fonts", relative = true } diff --git a/AGENTS.md b/AGENTS.md index 29e6fba85b..81ca8809a7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -81,7 +81,7 @@ For the crates you changed: `cargo fmt --check`, `cargo clippy -p -- -D - The workspace sets `unsafe_code = "forbid"`; no module allows `unsafe`. `[lints] workspace = true` in every crate. - Hostile-input sweep: `crates/automation/tests/it/hostile_args.rs`. The last-resort `catch_unwind` guards are in `crates/engine/src/doc_state.rs` and `crates/ui-egui/src/frame_guard.rs`. - Attribution: `ATTRIBUTION.toml` is the source (one entry per asset, SHA-256 each); `ATTRIBUTION.md` is generated by `cargo xtask assets --write`. The ArtCraft logos in `docs/brand/` are trademark assets under `docs/brand/LICENSE-brand.txt`. -- Translations come from storytold/craft-i18n at the commit in `craft-i18n.rev`; PdfCraft keeps no catalogs. Fonts come from storytold/craft-fonts through `CRAFT_FONTS_DIR` (optional build input; code using `pdfcraft_fonts::CRAFT_FONTS` must work when it is empty); the Latin UI fonts in `assets/fonts/` stay here. The system interface font is read at runtime through `OnDemandFonts` with `SystemCandidates` (never embedded or shipped). +- Translations come from storytold/craft-i18n at the commit in `craft-i18n.rev`; PdfCraft keeps no catalogs. Fonts come from storytold/craft-fonts through `CRAFT_FONTS_DIR` (optional build input; `.cargo/config.toml` points it at `../craft-fonts`, and a `CRAFT_FONTS_DIR` in the environment wins; code using `pdfcraft_fonts::CRAFT_FONTS` must work when it is empty); the Latin UI fonts in `assets/fonts/` stay here. The system interface font is read at runtime through `OnDemandFonts` with `SystemCandidates` (never embedded or shipped). - Automation: every feature is a tool in `crates/automation` (`pdfcraft-cli run` and `pdfcraft-cli mcp` share the table; see `crates/automation/README.md`). MCP and the UI control channel are opt-in. The control channel runs only with `--control `, binds to loopback and authenticates with a token (`--control-token`, or an owner-only file named by `--control-token-file`, which `craft_platform::owner_only` sets and checks); never enable it by default or log the token. - Page modules register `PagePart`s (`canvas/page_parts.rs`) and act through the tool host (`canvas/page_tools.rs`). Keys and clipboard events are commands and tool claims, and the framework blocks both while a modal is open. - Large binary test oracles live in storytold/photocraft-corpus, not here; `cargo xtask corpus` fetches the pdf.js corpus pinned by commit and SHA-256.