0x0LearnReferenceLibrariesMigration0x0.jmp0x1b.com

Core Library Guide

lib/core contains the first portable 0x0 library modules. These modules are

ordinary .0x0 source files loaded with ; they are not compiler intrinsics.

Every core module must pass the same gates as examples:

Modules

field access.

Result-returning safe constructor, and reversible hexadecimal text

conversion.

The JSON helpers are deliberately small. They handle flat object fields and

unescaped string values; they are a seed for the future full JSON package, not a

complete parser.

Source Contract

make core-library-check verifies the source-level contract for every core

module without invoking the compiler. The current checked exports are:

error field access.

map-remove.

indexing, sum, and hex text encode/decode helpers.

validation, and the flat-field scanning helpers they require.

conversion.

search, and update helpers.

joins, contains, starts-with, and ends-with.

Importing

Example:


(↥ "pkg:core-map")
(↥ "pkg:core-json")

Examples should prefer package imports from the package root. Core modules may

still import sibling core modules by relative path. The compiler loader threads

the transitive import seen set, so shared dependencies such as option.0x0

are loaded once when multiple imported modules depend on them.

Representation

The current representations are intentionally simple and public for v0.1.x:

conversion returns lowercase text and decodes lowercase or uppercase input.

These are source-level conventions, not stable v1.0 ABIs. Future type and module

slices should replace broad Any annotations with parametric contracts once the

language can express them.