WalkLang v3 Package Ecosystem

v3 adds a local package workflow on top of project mode and user modules.

Packages are ordinary WalkLang projects with:

walk.toml
README.md
src/<package>/<module>.walk
tests/*_test.walk

The package manager is intentionally local and file-backed in v3. It does not add a remote public registry protocol yet.

Create A Package

Create a package project:

walk package init geometry
cd geometry

Generated layout:

geometry/
  README.md
  walk.toml
  src/
    main.walk
    geometry/
      core.walk
  tests/
    main_test.walk
  build/

Package names must contain only letters, numbers, and _, and must start with a letter or _. This keeps package names usable as import namespaces.

Package Modules

Package modules are imported with dotted names:

imp: geometry.core

out: geometry.core.double(3)

The import maps to:

src/geometry/core.walk

Exports still use exp: inside the module.

func: double(x int) int
    return: * x 2

exp: double

Pin Dependencies

Project dependencies live in walk.toml.

name = "shape_app"
version = "0.1.0"
entry = "src/main.walk"

[build]
output = "build/shape_app"
release = false

[dependencies]
geometry = "0.1.0"

Dependency versions must use MAJOR.MINOR.PATCH.

Resolve Dependencies

Resolve from a local registry directory:

walk package resolve ../registry

The resolver copies packages into:

.walk/packages/<name>/<version>/

It writes walk.lock with each package name, version, and checksum. Project walk check, walk test, and walk build require the lock and verify cached package contents against it.

If the cache changes after locking, project commands fail until dependencies are resolved again.

Publish A Package

Publish to a local registry directory:

walk package publish ../registry

Publish rules:

README.md is required and must be non-empty
package name must be import-safe
package version must be MAJOR.MINOR.PATCH
walk check --warnings=error must pass
walk test --warnings=error must pass
existing registry versions are not overwritten
build/, .walk/, .git/, and walk.lock are not published

The published package lands at:

<registry>/<name>/<version>/

Reproducibility

v3 reproducibility comes from:

explicit dependency versions in walk.toml
locked package checksums in walk.lock
local package cache verification before build/check/test
deterministic package source lookup
publish-time check and test gates

Non-Goals

v3 does not add:

remote registry protocol
package account authentication
version range solving
multiple versions of the same package in one build
automatic package download during build