diff --git a/.config/ship.figl b/.config/ship.figl index 483ef28..b921e74 100644 --- a/.config/ship.figl +++ b/.config/ship.figl @@ -22,9 +22,8 @@ publishes = false # by `bash -eo pipefail -c` at the repository root). `runner` is the workflow's: # `components` are the rustup components it installs, `toolchain` the Rust it # installs (stable when left out), and `builds = false` is the one job that does -# not compile, so it needs neither the pinned Zig (`fig` and `twig`, under prov, -# flower and leaf alike, are Zig-backed and their build.rs runs `zig build`) nor -# the cargo cache. Cheapest and most likely to fail first. +# not compile, so it skips the cargo cache. Cheapest and most likely to fail +# first. job > * > > id = fmt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 635dcd2..00fa7c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,9 +10,7 @@ name: CI # # What the runner still owns is the toolchain, because only it knows how to # install one: the toolchain and components a job's `runner` table asks for, and -# — for every job but the one that says `builds = false` — the pinned Zig, since -# everything under provui reaches `fig` and `twig`, which are Zig-backed and -# whose build.rs runs `zig build`. The Zig version mirrors the sibling repos. +# — for every job but the one that says `builds = false` — the cargo cache. on: push: { branches: [main] } pull_request: null @@ -27,8 +25,8 @@ env: CARGO_TERM_COLOR: always jobs: - # Ask ship what CI consists of. Needs no Zig and no cache: it compiles ship - # and nothing of provui's. + # Ask ship what CI consists of. Needs no cache: it compiles ship and nothing + # of provui's. plan: name: Plan runs-on: ubuntu-latest @@ -56,18 +54,14 @@ jobs: steps: - uses: actions/checkout@v7 # A field a job's runner table leaves out is null here: stable Rust, no - # components, and Zig and the cache set up unless the job says - # `builds = false`. + # components, and the cache set up unless the job says `builds = false`. - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.job.toolchain || 'stable' }} components: ${{ matrix.job.components }} - - uses: mlugg/setup-zig@v2 + - uses: Swatinem/rust-cache@v2 # A missing `builds` is null, and GitHub compares loosely, so `null != false` # is false: the test is for null itself. if: matrix.job.builds == null || matrix.job.builds - with: { version: "0.17.0" } - - uses: Swatinem/rust-cache@v2 - if: matrix.job.builds == null || matrix.job.builds - run: cargo install --locked --git https://github.com/diaryx-org/ship ship - run: ship ci ${{ matrix.job.id }} diff --git a/Cargo.lock b/Cargo.lock index 518b8bf..008538c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,6 +71,15 @@ version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" +[[package]] +name = "ar_archive_writer" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73cd58deff2140a0a8eae87e417bd01db68a33e148aa93d1e8cd837e55e312b6" +dependencies = [ + "object", +] + [[package]] name = "arrayref" version = "0.3.9" @@ -500,78 +509,107 @@ dependencies = [ [[package]] name = "fig" -version = "5.1.3" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f833bdb4084079570be64717cf99b47675d6118363626b0aa7e71052e502d9f7" +checksum = "1912585cea7b84fd1cbacdd0ee85c57b12f54cc46a917145d97a62b95c3eafab" dependencies = [ + "fig-core", "fig-macros", - "fig-sys", "indexmap", - "serde", ] [[package]] -name = "fig-macros" -version = "5.1.3" +name = "fig-core" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca9cc54b41c911664402a3fec0301045d25c207ec52ffacbd2d3f36f3b51c14e" +checksum = "310da8e88299b38abe3aadfa1aecce5c46a93dc767ee38900f23e9f630e05290" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", + "fig-kit", ] [[package]] -name = "fig-schema" -version = "0.4.0" +name = "fig-css" +version = "0.1.0" +source = "git+https://github.com/diaryx-org/fig-css?branch=main#d2400882084ed83510f452ded0603cf1d05fc611" +dependencies = [ + "fig", +] + +[[package]] +name = "fig-figl" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fbbb9f9c0c455439ad47f6ea858e6302da0aca21ef88a6977edd25715cb9331" +checksum = "408de7cd00cce13acf2174086a66f4e8438559462711f13a0032b8e9198d58df" dependencies = [ "fig", + "fig-kit", ] [[package]] -name = "fig-sys" -version = "5.1.3" +name = "fig-json" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25f09d42f0b99ba91a6a465d829b24dabdc55c3ce487354a13d41a96011db5e2" +checksum = "1a4baefafc7c88ebacda7d1d2423eba469828d490199462f032bfbf3db6637b7" dependencies = [ - "fig-sys-linux-arm64-gnu", - "fig-sys-linux-x64-gnu", - "fig-sys-macos-arm64", - "fig-sys-wasm32", - "fig-sys-windows-x64-msvc", + "fig", + "fig-kit", ] [[package]] -name = "fig-sys-linux-arm64-gnu" -version = "5.1.3" +name = "fig-kit" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d5fa65c26a742bfbadec07bad9c60b617048d73704bee117916421679bbb62c" +checksum = "a0005cbc0579d07474d9a452c76f23cbf55ba6c82dd84c7e7ed5c38ace903a7a" [[package]] -name = "fig-sys-linux-x64-gnu" -version = "5.1.3" +name = "fig-macros" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1441bc4c704d104473aee2123e0a122ccffd712827ef05a763237eae5cb0a3" +checksum = "706b610edc1a38659bdb586bd1697a78b7641e749d490000ec1b4b3a209efae2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] [[package]] -name = "fig-sys-macos-arm64" -version = "5.1.3" +name = "fig-schema" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e304705f2e7ecc0b2d9ff29318dc6cb93ce4cf841e93531800229330c62e4dd" +checksum = "53d7116306a4231b3b1fb2fae939acb9a07e86c604223afb9ddcf6d8fa10da5b" +dependencies = [ + "fig", +] [[package]] -name = "fig-sys-wasm32" -version = "5.1.3" +name = "fig-toml" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5824a0955487dc096a3ddefe2acd1e87d6722f7e73c36e885324acfb536fecab" +checksum = "47f4110cda967917a1447fbc44082620ba71ff202ab7a34b61b7abfd19a3de54" +dependencies = [ + "fig", + "fig-kit", +] + +[[package]] +name = "fig-yaml" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62e8dca9c7c5083277a28c48a0b16a6fabc110a7fea8e2c53d197afc129f07e3" +dependencies = [ + "fig", + "fig-kit", +] [[package]] -name = "fig-sys-windows-x64-msvc" -version = "5.1.3" +name = "fig-zon" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6027a1876c12c400294cffd20c0a3c0713e6cde18e72d846ee34514b64ebcad8" +checksum = "cf6ddb7ae3d30bc1d9827384e1b5b1defdf5e8dccb20fee01d83e052a9415c81" +dependencies = [ + "fig", + "fig-kit", +] [[package]] name = "find-msvc-tools" @@ -599,17 +637,22 @@ checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" [[package]] name = "flower-core" version = "0.6.4" -source = "git+https://github.com/diaryx-org/flower?branch=main#f84dc24719279fde719d38b5a0f5279128b3cea5" +source = "git+https://github.com/diaryx-org/flower?branch=main#6d82c4d08e2ce247e802ded3bec5b1cc5af77390" dependencies = [ "anyhow", "fig", + "fig-figl", + "fig-json", "fig-schema", + "fig-toml", + "fig-yaml", + "fig-zon", ] [[package]] name = "flower-ratatui" version = "0.6.4" -source = "git+https://github.com/diaryx-org/flower?branch=main#f84dc24719279fde719d38b5a0f5279128b3cea5" +source = "git+https://github.com/diaryx-org/flower?branch=main#6d82c4d08e2ce247e802ded3bec5b1cc5af77390" dependencies = [ "flower-core", "ratatui", @@ -920,12 +963,18 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "leaf-core" -version = "0.5.0" -source = "git+https://github.com/diaryx-org/leaf?branch=main#17dd988c6855ee0c1b8991898dccb6c088c934ed" +version = "0.5.1" +source = "git+https://github.com/diaryx-org/leaf?branch=cc%2Fmodest-mendel-tw57ql#f11ee17890b27f161ba18fece87ee76f7716c3ef" dependencies = [ "anyhow", + "fig-css", "syntect", + "twig-asciidoc", + "twig-djot", "twig-doc", + "twig-html", + "twig-markdown", + "twig-xml", "two-face", "unicode-segmentation", "unicode-width 0.2.0", @@ -933,8 +982,8 @@ dependencies = [ [[package]] name = "leaf-math" -version = "0.5.0" -source = "git+https://github.com/diaryx-org/leaf?branch=main#17dd988c6855ee0c1b8991898dccb6c088c934ed" +version = "0.5.1" +source = "git+https://github.com/diaryx-org/leaf?branch=cc%2Fmodest-mendel-tw57ql#f11ee17890b27f161ba18fece87ee76f7716c3ef" dependencies = [ "ratex-layout", "ratex-parser", @@ -944,8 +993,8 @@ dependencies = [ [[package]] name = "leaf-raster" -version = "0.5.0" -source = "git+https://github.com/diaryx-org/leaf?branch=main#17dd988c6855ee0c1b8991898dccb6c088c934ed" +version = "0.5.1" +source = "git+https://github.com/diaryx-org/leaf?branch=cc%2Fmodest-mendel-tw57ql#f11ee17890b27f161ba18fece87ee76f7716c3ef" dependencies = [ "cosmic-text", "image", @@ -954,8 +1003,8 @@ dependencies = [ [[package]] name = "leaf-ratatui" -version = "0.5.0" -source = "git+https://github.com/diaryx-org/leaf?branch=main#17dd988c6855ee0c1b8991898dccb6c088c934ed" +version = "0.5.1" +source = "git+https://github.com/diaryx-org/leaf?branch=cc%2Fmodest-mendel-tw57ql#f11ee17890b27f161ba18fece87ee76f7716c3ef" dependencies = [ "leaf-core", "leaf-math", @@ -1126,6 +1175,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "object" +version = "0.39.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e5a6c098c7a3b6547378093f5cc30bc54fd361ce711e05293a5cc589562739b" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" version = "1.21.4" @@ -1292,7 +1350,7 @@ dependencies = [ [[package]] name = "prov" version = "0.18.0" -source = "git+https://github.com/diaryx-org/prov?branch=main#6376783b121f742b23cdb620991906d908eae6c1" +source = "git+https://github.com/diaryx-org/prov?branch=main#8427c39106d7cfab107ea110d6c3e2b2b187ee27" dependencies = [ "edtf-normalize", "fig", @@ -1313,7 +1371,7 @@ dependencies = [ [[package]] name = "prov-config" version = "0.18.0" -source = "git+https://github.com/diaryx-org/prov?branch=main#6376783b121f742b23cdb620991906d908eae6c1" +source = "git+https://github.com/diaryx-org/prov?branch=main#8427c39106d7cfab107ea110d6c3e2b2b187ee27" dependencies = [ "fig", "fig-schema", @@ -1328,7 +1386,7 @@ dependencies = [ [[package]] name = "prov-exports" version = "0.18.0" -source = "git+https://github.com/diaryx-org/prov?branch=main#6376783b121f742b23cdb620991906d908eae6c1" +source = "git+https://github.com/diaryx-org/prov?branch=main#8427c39106d7cfab107ea110d6c3e2b2b187ee27" dependencies = [ "prov-graph", "prov-views", @@ -1337,7 +1395,7 @@ dependencies = [ [[package]] name = "prov-filing" version = "0.18.0" -source = "git+https://github.com/diaryx-org/prov?branch=main#6376783b121f742b23cdb620991906d908eae6c1" +source = "git+https://github.com/diaryx-org/prov?branch=main#8427c39106d7cfab107ea110d6c3e2b2b187ee27" dependencies = [ "prov-grain", "prov-graph", @@ -1346,7 +1404,7 @@ dependencies = [ [[package]] name = "prov-grain" version = "0.18.0" -source = "git+https://github.com/diaryx-org/prov?branch=main#6376783b121f742b23cdb620991906d908eae6c1" +source = "git+https://github.com/diaryx-org/prov?branch=main#8427c39106d7cfab107ea110d6c3e2b2b187ee27" dependencies = [ "edtf-core", "prov-graph", @@ -1355,21 +1413,28 @@ dependencies = [ [[package]] name = "prov-graph" version = "0.18.0" -source = "git+https://github.com/diaryx-org/prov?branch=main#6376783b121f742b23cdb620991906d908eae6c1" +source = "git+https://github.com/diaryx-org/prov?branch=main#8427c39106d7cfab107ea110d6c3e2b2b187ee27" dependencies = [ "fig", + "fig-figl", + "fig-json", + "fig-toml", + "fig-yaml", "fs-transaction 0.4.0", "indexmap", "moid", "sha2", "thiserror 2.0.20", + "twig-djot", "twig-doc", + "twig-html", + "twig-markdown", ] [[package]] name = "prov-store" version = "0.18.0" -source = "git+https://github.com/diaryx-org/prov?branch=main#6376783b121f742b23cdb620991906d908eae6c1" +source = "git+https://github.com/diaryx-org/prov?branch=main#8427c39106d7cfab107ea110d6c3e2b2b187ee27" dependencies = [ "fig", "fs-transaction 0.4.0", @@ -1379,11 +1444,12 @@ dependencies = [ [[package]] name = "prov-views" version = "0.18.0" -source = "git+https://github.com/diaryx-org/prov?branch=main#6376783b121f742b23cdb620991906d908eae6c1" +source = "git+https://github.com/diaryx-org/prov?branch=main#8427c39106d7cfab107ea110d6c3e2b2b187ee27" dependencies = [ "cel", "prov-grain", "prov-graph", + "stacker", "unicode-normalization", ] @@ -1410,6 +1476,16 @@ dependencies = [ "ratatui", ] +[[package]] +name = "psm" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd034599e63b970727f70d79e02d62390a4a84f7c6b827c27c46d5ac3fa622" +dependencies = [ + "ar_archive_writer", + "cc", +] + [[package]] name = "pxfm" version = "0.1.30" @@ -1983,6 +2059,19 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9676b89cd56310a87b93dec47b11af744f34d5fc9f367b829474eec0a891350d" +[[package]] +name = "stacker" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707f49d46706bacf8a2b00d51dace3f9de527c13eec3778f570c411f89e69967" +dependencies = [ + "cc", + "cfg-if", + "libc", + "psm", + "windows-sys 0.61.2", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -2215,56 +2304,75 @@ dependencies = [ ] [[package]] -name = "twig-doc" -version = "4.0.1" +name = "twig-asciidoc" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fec21bef3a70ee790273973779f6fe06c3e799c80290744b94ff44edc5cce5" +checksum = "3bbaea0529c2c7e65273c20116a4c6a0730c31e3b3fe49dc741a0d085d40e9ea" dependencies = [ - "twig-sys", + "twig-doc", + "twig-kit", ] [[package]] -name = "twig-sys" -version = "4.0.1" +name = "twig-djot" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b11592bb6fcb414f5113a58f39c2c2f64305069376961a5479339bb98e40b6e4" +checksum = "d8619b5a7e9b37e5f25463b25d43424c5afea59b0d0478f0bc45e99744af4203" dependencies = [ - "twig-sys-linux-arm64-gnu", - "twig-sys-linux-x64-gnu", - "twig-sys-macos-arm64", - "twig-sys-wasm32", - "twig-sys-windows-x64-msvc", + "twig-doc", + "twig-kit", ] [[package]] -name = "twig-sys-linux-arm64-gnu" -version = "4.0.1" +name = "twig-doc" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2180d01a6591ba271f3fb5953ace853128f6a13953c38f4deaa53ec97999ff65" +checksum = "0cd6cc20c4f31dd31e5e56dfa7d01f3dbdf5692695b1007e8c54640f9766193f" +dependencies = [ + "fig", + "fig-figl", + "fig-json", + "fig-toml", + "fig-yaml", + "twig-kit", +] [[package]] -name = "twig-sys-linux-x64-gnu" -version = "4.0.1" +name = "twig-html" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "526a7761e5f8d477989e74b301a87ee263de5b0e32dce1ad4229719ab2714d4e" +checksum = "1beb6c0999dc04d89a5a0da40e585cb05a9a7c13ecb19c2e5a65085a147f62ca" +dependencies = [ + "twig-doc", + "twig-kit", +] [[package]] -name = "twig-sys-macos-arm64" -version = "4.0.1" +name = "twig-kit" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e0690f38799f3fd9c5fcb22a4ef54f3b754c35638d25b190467a7c31cab1d4b" +checksum = "1bc21949975c1e3c5ab858d0d104e9d4f4d6000e1dcfa9e46bb7dcc460bba24f" [[package]] -name = "twig-sys-wasm32" -version = "4.0.1" +name = "twig-markdown" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97c7d9680ac1f598863391f06f998c224e1d2f027e2937fe4f72e4407a205112" +checksum = "60ffcae233483874bec0f3c39f8a2480a087d71beb038049a9ee287e0e570745" +dependencies = [ + "twig-doc", + "twig-html", + "twig-kit", +] [[package]] -name = "twig-sys-windows-x64-msvc" -version = "4.0.1" +name = "twig-xml" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab10dc47862d50b3d8115f01321ee6e86fdcd4d7d0ab2a48c2d2e66e04141133" +checksum = "8634fdd8e854401a1f21aef62ef80e3a87d1723ad59e810f6a633c66bf2c42c6" +dependencies = [ + "twig-doc", + "twig-kit", +] [[package]] name = "two-face" diff --git a/Cargo.toml b/Cargo.toml index 219d1fa..ac58b8d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,19 +26,18 @@ readme = "README.md" publish = false [workspace.dependencies] -# The self-describing plaintext workspace library. Defaults to `yaml` alone, -# which is the carrier `---` frontmatter uses; a frontend that wants JSON/TOML -# vaults turns those features on. +# The self-describing plaintext workspace library. It reads every metadata +# format it knows — YAML, JSON, TOML, figl — with no features to turn on. # # From git, not crates.io: prov is an org repository that does not publish, and # every repository that builds against it names this same source — `branch = # "main"`, written identically — so diaryx, which links provui-core and prov # both, holds one prov, at the commit its own Cargo.lock records. prov = { git = "https://github.com/diaryx-org/prov", branch = "main" } -# The Zig-backed config AST + lossless editor prov and flower are both built on. -# Named directly because `ProvBackend` reaches for `fig::Embed::replace_body` and -# `fig::Value`, which are the tree and the splice both halves agree on. -fig = "5" +# The config AST + lossless editor prov and flower are both built on. Named +# directly because `ProvBackend` reaches for `fig::Value` and `fig::Editor`, +# which are the tree and the splice both halves agree on. +fig = "7" # Crash-atomic file writes, and the optimistic check that refuses one when the # file moved underneath. prov writes through it too; named directly because a # save is one document's bytes and none of prov's policy, so `DocumentSession` @@ -49,9 +48,13 @@ fs-transaction = "0.2" # does not know the word "prov" and should not learn it. flower-core = { git = "https://github.com/diaryx-org/flower", branch = "main" } # The rich-text body editor over twig. `default-features = false` so a consumer -# that also links `leaf-ffi` unifies on one leaf-core copy and one twig-sys -# build rather than two. -leaf-core = { git = "https://github.com/diaryx-org/leaf", branch = "main", default-features = false } +# that also links `leaf-ffi` unifies on one leaf-core copy rather than two. +# +# TEMPORARY: `branch = "cc/modest-mendel-tw57ql"` is leaf's twig 6 port +# (diaryx-org/leaf#11), which provui needs to share one twig with prov and +# flower. It goes back to `branch = "main"` — here and on `leaf-ratatui` below — +# once leaf#11 merges. +leaf-core = { git = "https://github.com/diaryx-org/leaf", branch = "cc/modest-mendel-tw57ql", default-features = false } # The two terminal widgets, which `provui-tui` embeds. # @@ -63,5 +66,14 @@ leaf-core = { git = "https://github.com/diaryx-org/leaf", branch = "main", defau # be a second, different type. (`cargo tree -i leaf-core` proves there is # one.) To build against a checkout instead, turn on the git-URL patches in # `~/diaryx/.cargo/patches.toml`. -leaf-ratatui = { git = "https://github.com/diaryx-org/leaf", branch = "main" } +# TEMPORARY: back to `branch = "main"` once diaryx-org/leaf#11 merges. +leaf-ratatui = { git = "https://github.com/diaryx-org/leaf", branch = "cc/modest-mendel-tw57ql" } flower-ratatui = { git = "https://github.com/diaryx-org/flower", branch = "main" } + +# TEMPORARY: prov's `main` still takes fig-schema from its git `master`, while +# flower takes the published 0.5 — two fig-schemas, and so two `FieldType`s +# that `schema_from_config` cannot pass from one to the other. prov's move to +# crates.io (`take fig-schema 0.5 from crates.io`, on its branch +# `cc/modest-mendel-tw57ql`) unifies them; drop this patch once it merges. +[patch."https://github.com/diaryx-org/fig-schema"] +fig-schema = { version = "0.5" } diff --git a/README.md b/README.md index 07eed5d..3489cd4 100644 --- a/README.md +++ b/README.md @@ -603,14 +603,13 @@ field looks like. - [`leaf`](https://github.com/diaryx-org/leaf) — the rich-text document editor over `twig` (has `leaf-ratatui`, `leaf-swift`). - [`fig`](https://github.com/diaryx-org/fig) / - [`twig`](https://github.com/diaryx-org/twig) — the Zig parsing/editing + [`twig`](https://github.com/diaryx-org/twig) — the parsing/editing libraries underneath both. ## Building -The dependency chain reaches `fig` and `twig`, which are Zig-backed, so a build -needs `zig` on `PATH`. `nix develop` in `prov` or -[`nix`](https://github.com/diaryx-org/nix) provides one. +The whole dependency chain, `fig` and `twig` included, is plain Rust: a +stable toolchain is all a build needs. ```sh cargo test --workspace diff --git a/crates/provui-core/src/config_schema.rs b/crates/provui-core/src/config_schema.rs index b31f7ce..50043c1 100644 --- a/crates/provui-core/src/config_schema.rs +++ b/crates/provui-core/src/config_schema.rs @@ -38,8 +38,7 @@ use flower_core::{Consequence, FieldType, Icon, Severity, Term, Tint}; use prov::{FIELD_TYPES, WorkspaceConfig}; use crate::rules::{ - choice, choice_terms, costly, costly_when, open_choice, open_choice_terms, path, present, term, - text, toggle, + choice, choice_terms, costly, costly_when, open_choice_terms, path, present, term, text, toggle, }; /// The config-document keys the editor should show but refuse to edit: `spec` is @@ -104,12 +103,11 @@ pub fn config_rules(config: &WorkspaceConfig) -> Vec { ], ), // ── metadata ──────────────────────────────────────────────────────── - // Open rather than closed: prov compiles `json`/`toml`/`fig` behind - // cargo features, so a build that lacks one would reject a spelling that - // is perfectly legal elsewhere. Offering without rejecting is the honest - // shape for a vocabulary this crate cannot fully see. + // Closed: every prov build reads all four, so a spelling outside them + // is one prov rejects. `figl` is fig's name for its own dialect, and + // the spelling prov writes back. costly( - open_choice( + choice( path(&["metadata", "format"]), "Metadata format", Icon::Enum, @@ -117,7 +115,7 @@ pub fn config_rules(config: &WorkspaceConfig) -> Vec { ("yaml", "YAML frontmatter"), ("json", "JSON metadata"), ("toml", "TOML metadata"), - ("fig", "fig metadata"), + ("figl", "figl metadata"), ], ), Tint::Warning, @@ -129,10 +127,7 @@ pub fn config_rules(config: &WorkspaceConfig) -> Vec { "How metadata is embedded", Icon::Enum, &[ - ("delimited", "Fenced frontmatter (`---`)"), - ("code_block", "A fenced code block"), - ("html_script", "A