0x0LearnReferenceLibrariesMigration0x0.jmp0x1b.com

Imports, Modules, And Packages

Current implementation evidence: examples/import-main.0x0, docs/packages.html,

0x0.pkg, and 0x0.lock.

File Imports

Use to import another source file:


(↥ "import-helper.0x0")

Relative paths resolve from the importing file's directory.

Namespaced Imports

Imports can declare an alias:


(↥ "import-helper.0x0" helper)

With an alias, imported functions are called through helper.name symbols.

Exports

Imported modules may declare exported functions with :


(↦ public-add another-public-function)

If a module has no export form, all of its functions are exported for

namespaced imports. If it has one or more export forms, only those functions are

available through the import alias.

Package Imports

Package imports use pkg: paths:


(↥ "pkg:core-map")

The package lockfile maps the package name to a local source path.

Manifest And Lockfile

The repository package manifest is 0x0.pkg. The generated lockfile is

0x0.lock.

Use safe package checks when changing package metadata:


make package-check

Current Limit

This is a local package and import slice. It is not a network registry

resolver. Public library registry work lands later in the website roadmap.