Root Swift package mirroring PureYAML's structure, rules, and verification gates. Includes the XML node model (Node, Element, Attribute, QualifiedName), a working emitter (Serializer) with escaping and pretty/compact options, and structural validation. The parser surface is stable; parse() raises notImplemented until the scanner lands, pinned by a test. - dependency-free, namespaced under PureXML - portability and style gates carried over (style, namespacing, forbidden patterns, swiftformat, swiftlint, linux, wasm, windows CI) - 11 tests passing
1.1 KiB
1.1 KiB
Package Architecture
PureXML starts as one root Swift package with one library target:
- product:
PureXML - target:
PureXML - tests:
PureXMLTests
Rules
- Keep dependencies explicit and minimal.
- Keep external dependencies at zero unless the maintainer explicitly changes the project contract.
- Add a new target only when a responsibility needs independent compilation, testing, or platform boundaries.
- Keep dependencies unidirectional if new targets are added.
Current Layers
PureXML
├── Model ordered YAML value tree
├── Parsing parser implementation
└── Emitting dumper implementation
The public namespace tree mirrors this layout.
When to Split a Target
Do not split for aesthetics. Split when one of these becomes true:
- the parser and emitter need independent platform gates
- a reusable scanner/lexer becomes large enough to test independently
- a compatibility layer for Yams-style decoding needs isolation from the core model
- a CLI or research tool appears and should not ship as library code