nimhuml
A Nim implementation of HUML (Human-Oriented Markup Language) parser and serializer
Summary
| Latest Version | Unknown |
|---|---|
| License | MIT |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:23 |
Tags
Installation
nimble install nimhuml
choosenim install nimhuml
git clone https://github.com/w3Abhishek/nimhuml
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| nimhuml | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/w3Abhishek/nimhuml |
|---|---|
| Homepage | https://github.com/w3Abhishek/nimhuml |
| Registry Source | nimble_official |
README
nimhuml
A Nim implementation of the HUML (Human-Oriented Markup Language) parser and serializer.
HUML is a machine-readable markup language with a focus on readability by humans. It borrows YAML's visual appearance, but avoids its complexities and ambiguities.
Installation
nimble install nimhuml
Or add to your .nimble file:
requires "nimhuml >= 0.2.0"
Usage
import nimhuml
import std/json
# Parse HUML string into a JsonNode
let data = loads("""
%HUML v0.2.0
name: "nimhuml"
version: "0.2.0"
features::
- "fast"
- "simple"
- "readable"
""")
echo data.pretty()
# Serialize a JsonNode back to HUML
let obj = %* {
"name": "example",
"count": 42,
"enabled": true
}
echo dumps(obj)
# File I/O
let parsed = load("config.huml")
dump(parsed, "output.huml")
Supported HUML v0.2.0 Features
- Scalars: strings (quoted + multiline
"""), integers, floats, booleans (true/false),null,nan,inf - Numbers: decimal, hex (
0x), octal (0o), binary (0b), scientific notation, underscores - Collections: multiline dicts/lists, inline dicts/lists, empty
{}/[] - Vectors:
::indicator for nested collections - Comments:
# comment(full-line and inline) - Version directive:
%HUML v0.2.0 - Strict formatting: no trailing spaces, consistent indentation (2 spaces)
Running Tests
# Clone test data
cd tests && git clone https://github.com/huml-lang/tests.git && cd ..
# Run tests
nimble test
License
Licensed under the MIT License.