YANG
Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.
YANG Preview.
At a glance
| Purpose | A YANG data model (RFC 7950): a module or submodule defining the configuration and state tree used by NETCONF and RESTCONF. |
| Extensions | .yang |
| Poka parser | poka-yang |
| Viewer | poka-tree-viewer |
| Depth tier | Parser with a shared viewer (see Depth tiers) |
| Breadth tier | B3 Core (see Breadth tiers) |
How much Poka reads
B3 Core. Only the main content type or types are decoded (for example geometry but not materials, layers or annotations, or only one version family). The list of gaps is substantial.
Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-26: read parsers/poka-yang/src/main.rs (763 lines, a tokeniser and statement-tree parser) and plugin.json. No unit tests or tests/samples.rs; the corpus has openconfig-if-ethernet.yang, openconfig-interfaces.yang but no test reads them. Covers .yang. The tree shows module metadata (namespace, prefix, yang-version, belongs-to, organisation, contact, description, latest revision), imports and includes, the data tree (container, list with key, leaf and leaf-list with type, choice and case, uses, rpc, action and notification with input and output, anydata and anyxml) and the names of typedefs, groupings, identities, features, extensions and augments. Judgement: B3: groupings are listed by name and uses is not expanded, so in modules that define their schema in groupings (both OpenConfig samples do) most of the tree is hidden.
What Poka does not read
- Groupings are listed by name only and uses statements are not expanded
- augment targets are named but their contents are not shown
- typedef and identity bodies (base types, ranges, patterns, bases) are not shown
- Node properties are not shown: config, mandatory, default, must, when, units, status, description and if-feature
- deviation statements and revision descriptions are not read
- Files over 64 MiB are cut without a flag; caps of 1,000 data nodes and 3,000 nodes, 64 levels
Libraries
Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.
- libyang (CESNET) (candidate; BSD-3-Clause; C; https://github.com/CESNET/libyang) — Reference YANG 1.0/1.1 and YIN parser with XML/JSON instance data support; has C, Python, C++, Rust bindings.
- libyang (Rust crate) (candidate; MIT OR Apache-2.0; Rust; https://docs.rs/crate/libyang/2.2.0) — Parses YANG modules with import/include resolution into an Entry tree; docs.rs build failed for 2.2.0; not confirmed free of C code.
- yang3 (candidate; MIT; Rust; https://lib.rs/crates/yang3) — Rust bindings to CESNET libyang; bundled feature builds the C library, which may complicate wasm32.
- pyang (candidate; ISC; Python; https://github.com/mbj4668/pyang) — YANG validator and converter (YANG/YIN) per RFC 7950.
- dang-yang (candidate; MIT; Rust; https://crates.io/crates/dang-yang) — A practical yang parser that allows custom type extension and definitions at build time; v0.0.3, updated 2026-04-14; matched on lib.rs, not tested
Sources
- parsers/poka-yang/src/main.rs
- parsers/poka-yang/plugin.json