1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
[]
= "fig"
= true
= true
= true
= "Parse, edit, and convert config files while preserving comments. Supports JSON, YAML, TOML, and more."
= "https://github.com/diaryx-org/fig"
# Rendered by crates.io on the package page. The file is the repo-root `fig.md`,
# copied in by `zig build vendor-rust` before publishing (git-ignored here, so
# `include` force-adds it to the tarball — see below). A local checkout that has
# not run the vendor step simply has no README.md; cargo only requires it when
# packaging/publishing, not for `build`/`test`.
= "README.md"
# The native library and its Zig source now live entirely in `fig-sys` (a
# dependency), so this crate packages only its own Rust sources plus the
# vendored README/licenses. No `build.rs`, no `zig/` tree, no `links` here.
= [
"src/**/*",
# Vendored in by `zig build vendor-rust` from the repo root (git-ignored here).
"LICENSE-MIT",
"LICENSE-APACHE",
"README.md",
]
[]
= "fig"
= "src/lib.rs"
# JSON is in `default`, not implied by the base crate: `--no-default-features`
# compiles it out too (like any other language). `serde` is opt-in — the crate
# parses, edits, and serializes through the `Value` tree (and `#[derive]`) with
# no serde at all.
[]
= ["json", "yaml", "toml", "fig"]
# Typed (de)serialization: `to_string`/`from_str`, the editor's `T: Serialize`
# value methods, and serde impls for `Value`. Opt-in (not in `default`); without
# it, the binding still parses, edits, and serializes via the `Value` tree
# directly, and `#[derive(ToValue, FromValue)]` covers typed struct mapping.
= ["dep:serde"]
# Ergonomic typed mapping without serde: `#[derive(fig::ToValue, fig::FromValue)]`
# generates straight-line conversions to/from the concrete `Value` tree (no
# format-generic Visitor machinery), via the `fig-macros` proc-macro crate.
= ["dep:fig-macros"]
# `ToValue`/`FromValue` impls for `indexmap::IndexMap<String, T>`, preserving
# insertion order (unlike the std map impls). Opt-in to keep the dep optional.
= ["dep:indexmap"]
# Per-language gates, mirroring `build.zig`'s `-D<lang>` options. Each forwards
# to the like-named `fig-sys` feature, which `fig-sys`'s build script reads to
# compile that format's parser/printer in or out of `libfig.a` (the `default`
# set links a prebuilt archive with no Zig toolchain; any other combination
# builds from source). The `Format` enum keeps every variant regardless;
# selecting a format whose feature is off returns `Error::UnsupportedFormat`.
# `json` gates the shared JSON/JSONC/JSON5 core.
= ["fig-sys/json"]
= ["fig-sys/yaml"]
= ["fig-sys/toml"]
= ["fig-sys/zon"]
= ["fig-sys/xml"]
= ["fig-sys/fig"]
[]
# The `-sys` layer: raw FFI + the `links = "fig"` build script that provides
# `libfig.a`. The workspace entry sets `default-features = false` so this
# crate's own per-language features are the sole driver of what fig-sys compiles.
= { = true }
= { = "1", = true }
= { = true, = true }
= { = "2", = true }
[]
= { = "1", = ["derive"] }