Skip to main content

YLSpec

CI License: Apache 2.0 Format: 0.1 Python: 3.11–3.15 C: C11 JavaScript and TypeScript JVM and Android VS Code Platforms

Portable metadata documents that work on their own and inside other file formats.

YLSpec defines a versioned document envelope around TOML 1.1 and an optional, length-delimited binary frame for embedding that document into another file. The reference implementation is written in C11. Its Python package uses the same C core through a native CPython extension. JavaScript and TypeScript use Node-API on Node.js and WebAssembly in browsers and React applications. Java and Kotlin use JNI on desktop JVMs and Android. A VS Code extension brings the same parser to .ylspec editing.

Status: 0.1.1, experimental. The specification and APIs may change before 1.0. Review the compatibility policy before depending on an experimental version. A release's support claims are backed by its linked GitHub Actions run. Package-registry publication requires the account setup described in the registry guide; release assets can be used independently of those uploads.

Why YLSpec?

Applications frequently need the same metadata in several contexts: editable configuration, a component manifest, or a small record embedded in a larger binary file. YLSpec gives those contexts a shared document model and an explicit version boundary.

Capability Standalone document Embedded frame
Human-editable UTF-8 TOML 1.1 Yes The payload is the same text
Standard and profile versioning Yes Yes
Namespaced project extensions Yes Yes
Exact temporal literals Yes Yes
Read without touching unrelated host content Entire document Header plus declared document bytes
Requires an archive or decompressor No No
Executes embedded code No No

YLSpec does not define plugin execution, package installation, dependency resolution, signatures, or a host file's layout. Future formats can place YLSpec frames wherever their own headers or indexes specify.

Architecture

flowchart LR
    Text["Standalone .ylspec text"] --> Core["C11 document core"]
    Host["Host-supplied offset and region"] --> Frame["32-byte frame decoder"]
    Frame --> Core
    Core --> Values["Typed document values"]
    Values --> Profile["Explicit profile validation"]
    Core --> Python["Native Python API"]
    Core --> Node["Node-API: JavaScript and TypeScript"]
    Core --> WASM["WebAssembly: browser and React"]
    Core --> JNI["JNI: Java, Kotlin, and Android"]
    WASM --> Editor["VS Code language tools"]
    Core --> CLI["Inspection CLI"]

The embedding guide explains the byte layout and the host's responsibilities. The normative specification defines document validity independently of the reference implementation.

Installation

After the first PyPI release, install the native Python package with:

python -m pip install ylspec

Until then, download a wheel from a successful CI run's wheels-* artifact and install that wheel with python -m pip install path/to/the-wheel.whl. The release workflow adds published distributions to PyPI; this README does not display a PyPI version badge before a real project exists.

Native release assets contain both static/ and shared/ installations, with headers, libraries, CLI binaries, CMake package exports, and license notices. Choose one installation as your CMake prefix:

find_package(YLSpec CONFIG REQUIRED)
target_link_libraries(my_application PRIVATE YLSpec::ylspec)

See building for source builds and supported toolchains.

Other language packages

Consumer Distribution Integration guide
JavaScript / TypeScript / Node.js @younglionorganization/ylspec, native Node-API JavaScript API
Browser / React The same npm package, bundled C WebAssembly Browser initialization
Java / Kotlin desktop io.github.younglionorganization:ylspec and ylspec-kotlin JVM guide
Android Common Java/Kotlin API plus ylspec-android JNI AAR Android dependencies
VS Code ylspec-0.1.1.vsix; language tools using bundled WebAssembly Editor guide

These names describe the built distributions. npm, Central, and Marketplace listings become available after their separate publishing workflows succeed. Until then, use the checksummed tarball, Maven-layout ZIP, or VSIX from the GitHub Release. No registry availability badge is shown before publication.

import {createClient} from '@younglionorganization/ylspec';
const yl = await createClient();
const document = new yl.Document({name: 'Example', count: 42n});
const restored = yl.unpack(yl.pack(document));
console.assert(restored.data.count === 42n);

Integer values are bigint in JavaScript and Long in Java/Kotlin. Exact temporal values retain their original fractional precision across adapters. The type mapping explains conversion boundaries. Browser initialization is asynchronous; once initialized, in-memory parsing and framing use the same synchronous C implementation.

Document example

[_ylspec]
version = "0.1"
profile = "core.data"
profile_version = "0.1"

[data]
name = "Example component"
enabled = true
platforms = ["linux-x86_64", "windows-x64", "macos-arm64"]

[extensions."xyz.younglion.example"]
channel = "stable"

data is application-defined. An application's version inside data is independent of the YLSpec format version and the profile version.

Python quick start

The complete, CI-executed example is examples/basic.py.

import io
import ylspec

document = ylspec.Document({"name": "Example", "enabled": True})
document.validate()

text = ylspec.dumps(document)
restored = ylspec.loads(text)
assert restored.data == document.data

prefix = b"host-defined prefix"
frame = ylspec.pack(document)
host = io.BytesIO(prefix + frame + b"unrelated payload")
metadata = ylspec.read_at(host, offset=len(prefix), available=len(frame))
assert metadata.data["name"] == "Example"

read_at restores the stream's original position. It reads the 32-byte header and exactly the document bytes declared in that header. Determining the region size may seek to the end, but does not read the host payload.

See the Python API for types, profile validators, errors, and exact timestamps. Detailed __init__.pyi and _native.pyi stubs and a py.typed marker ship with the package for editor completion and static checks; no separate stub distribution is required.

C quick start

The complete, CI-executed example is examples/basic.c.

#include <stdio.h>
#include <string.h>
#include <ylspec.h>

int main(void) {
    const char text[] =
        "[_ylspec]\nversion='0.1'\nprofile='core.data'\n"
        "profile_version='0.1'\n[data]\nname='Example'\n";
    yl_document *document = NULL;
    yl_error error = {0};
    if (yl_parse(text, strlen(text), NULL, &document, &error) != YL_OK) {
        fprintf(stderr, "%s\n", error.message);
        return 1;
    }
    yl_document_free(document);
    return 0;
}

Lengths are explicit; the input does not need a terminating NUL. The core does not open files. A host can supply a yl_read_at_fn callback to read an embedded document from a file, mapping, device, or other bounded source.

Resource limits and trust boundaries

Property Default or policy
Maximum document text 16 MiB; configurable
Maximum value depth 64 edges from root; configurable up to 128
Frame header 32 bytes, little-endian
Embedded text UTF-8 TOML 1.1, uncompressed
Integer / float Signed 64-bit / IEEE-754 binary64
Required feature or profile validation Explicit; unsupported means failure
Integrity and authenticity Supplied by the host, if needed

Additional parser limits are listed in compatibility. Parsing does not imply profile approval, cryptographic verification, or permission to execute host content. See security.

CLI

ylspec --version
ylspec validate examples/config.ylspec
ylspec inspect examples/manifest.ylspec
ylspec pack examples/config.ylspec > metadata.bin
ylspec inspect-frame metadata.bin 0

See the CLI reference for commands, output, and exit codes.

Verification and releases

GitHub Actions builds static/shared C artifacts and Python wheels, runs C and Python tests, checks TOML 1.1 decoding against toml-test, runs sanitizers and bounded fuzzing, executes documentation examples, and renders Mermaid diagrams. Benchmark reports record the workload and environment without asserting an unmeasured speed threshold.

Language verification executes Node-API and JNI on the target systems, tests TypeScript ESM/CommonJS consumers, launches React in Chromium, builds four Android ABIs, executes JNI on an API 26 emulator, and tests a real VS Code Extension Host before packaging the VSIX.

The manually dispatched publish workflow rebuilds and verifies one commit, creates a draft release, attaches checksummed assets, publishes the same Python distributions to PyPI using the PYPI_API_TOKEN GitHub Actions secret, and then publishes the GitHub Release. Read publishing before the first release. Separate npm, Maven Central, and VS Code workflows consume the public release's checksummed artifacts. See registry setup for exact secret names, account ownership, and upload steps.

Documentation map

Guide Audience
Specification Independent implementers
Embedding Host-format designers
Profiles and extensions Application developers
C API and ownership C integrators
Python API and types Python integrators
JavaScript, TypeScript, browser, and React Web and Node.js developers
Java, Kotlin, and Android JVM and Android developers
VS Code integration Editor users and extension maintainers
CLI Users inspecting documents
Building Native-library consumers
Compatibility Maintainers and adopters
Publishing Release maintainers
Registry accounts and secrets Package publishers

License and authorship

Copyright 2026 Cavanşir Qurbanzadə. Created under YoungLionOrganization. Original project material is licensed under Apache-2.0. See NOTICE, AUTHORS.md, and third-party notices. A document created by a user does not acquire this project's license merely by using the YLSpec format.

Metadata

Release files for ylspec 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ylspec 0.1.1
File Size Uploaded Provenance Actions
ylspec-0.1.1.tar.gz 168.8 kB Without provenance Details for ylspec-0.1.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for ylspec 0.1.1
File Actions
ylspec-0.1.1-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for ylspec-0.1.1-cp311-abi3-win_amd64.whl
ylspec-0.1.1-cp311-abi3-musllinux_1_2_x86_64.whl CPython 3.11 abi3 Linux musl 1.2+ x86-64 Details for ylspec-0.1.1-cp311-abi3-musllinux_1_2_x86_64.whl
ylspec-0.1.1-cp311-abi3-musllinux_1_2_aarch64.whl CPython 3.11 abi3 Linux musl 1.2+ ARM64 Details for ylspec-0.1.1-cp311-abi3-musllinux_1_2_aarch64.whl
ylspec-0.1.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for ylspec-0.1.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
ylspec-0.1.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64, Linux glibc 2.28+ ARM64 Details for ylspec-0.1.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
ylspec-0.1.1-cp311-abi3-macosx_11_0_x86_64.whl CPython 3.11 abi3 macOS 11.0+ x86-64 Details for ylspec-0.1.1-cp311-abi3-macosx_11_0_x86_64.whl
ylspec-0.1.1-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for ylspec-0.1.1-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 630.0 kB

Release files / ylspec-0.1.1.tar.gz

Download URL ylspec-0.1.1.tar.gz
Size 168.8 kB
Tags Source
SHA-256 checksum
How to use checksums
72c636e99e2671e1d5340962a57869dd6de17dc27bf40f1ca88d8c02d1dc88fa
BLAKE2b-256 checksum
How to use checksums
2bba21cd2eb068b175aff8f0bb35f4e806352def615af276aa3f5f77a6c110b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ylspec-0.1.1-cp311-abi3-win_amd64.whl

Download URL ylspec-0.1.1-cp311-abi3-win_amd64.whl
Size 59.6 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
43ea6e602dc6674b3739cdd2ac325f30f5b28bb5bbd148f3bbe931bc098ee31f
BLAKE2b-256 checksum
How to use checksums
53def3177f4e60ff7510d934a42152b1b3b4e55d759d22bccf11aec3290d6a86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ylspec-0.1.1-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL ylspec-0.1.1-cp311-abi3-musllinux_1_2_x86_64.whl
Size 70.3 kB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
5955614d54c8caccaa94106f5cacec6deac68454e662d33d2fe354a7c435a604
BLAKE2b-256 checksum
How to use checksums
67424489c2247c4ce3c15708aec59b42a9b9f49cdde4b39d993b6428756e26e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ylspec-0.1.1-cp311-abi3-musllinux_1_2_aarch64.whl

Download URL ylspec-0.1.1-cp311-abi3-musllinux_1_2_aarch64.whl
Size 70.1 kB
Tags CPython 3.11 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
cd1945db00c0bbeab84355d4cbc9bc20fbe8727bd3b33386bc3f3d9a6651608b
BLAKE2b-256 checksum
How to use checksums
ae8c848ad61e0f64eb717af0351aae1377c3742c316bd7c72fc2563937e3ccec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ylspec-0.1.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL ylspec-0.1.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 70.6 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
5521dff642674de621f127861def94438f87cd2756e6783812a240dd1537645e
BLAKE2b-256 checksum
How to use checksums
4aca82908e4959e6e7f3ff515cbb133ff43f3bdf13466b2a09c551d97d00004d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ylspec-0.1.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Download URL ylspec-0.1.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 69.9 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
d86e58d7ea7dbef4b9fafc59d7633bfbdf15fc925d1a1839c994de7438afe7cb
BLAKE2b-256 checksum
How to use checksums
4ca7d919831268d954c82c2b0aa4271febcd50b975bcdad6a12882de7b12e4af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ylspec-0.1.1-cp311-abi3-macosx_11_0_x86_64.whl

Download URL ylspec-0.1.1-cp311-abi3-macosx_11_0_x86_64.whl
Size 60.8 kB
Tags CPython 3.11 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
7bbc7afd0a290569991bee6797aa08bb539e7ede781429e930b5932a58b8d2aa
BLAKE2b-256 checksum
How to use checksums
a770926f73c0b9672a097887350fb14a0ddb56cad85ed8d95a9b4f4c92f03ead
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ylspec-0.1.1-cp311-abi3-macosx_11_0_arm64.whl

Download URL ylspec-0.1.1-cp311-abi3-macosx_11_0_arm64.whl
Size 59.8 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f2b8d66d638a40d8ff7ad21692621b0c647cb625a38793e7f29029ee48f65dea
BLAKE2b-256 checksum
How to use checksums
91ec19122235a28726a05ffa3de458fb59d5edc05c5dd1ef17c360df3b68862f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for ylspec 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

8 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page