OxL Reference

III.2 Package and build

toml
[package]
name = "shop"
version = "0.3.0"
edition = "2027"

[deps]
auth  = "^2.1"                                      # registry pkg.oxl.dev
mlkit = { git = "https://github.com/me/mlkit", tag = "v0.4" }
zlib  = { c = "system", header = "zlib.h" }         # a native library

[dev-deps]
faker = "^1"

[profile.prod]
opt = 3
lto = true

[build]
targets = ["linux-x64", "linux-arm64"]

[lint]
magic-literal = "error"

[workspace]
members = ["svc/*"]
Profileoptdebug-infocontractstracepanic
dev0fullononunwind
test1fullononunwind
prod3lineoffoffunwind
  • [lint]: the level of a rule is error, warn (a synonym of warning) or off (a synonym of allow); the example above shows error (an edition 1.0 correction, D-8056; DIV-042; D-6552).
  • The profile key dbg = true|false switches the output of dbg (§2.2) on or off; it is off by default in prod (D-8064; D-7800).
  • Version resolution: minimal version selection (MVS), one version of a package per graph; a conflict is an error with the chain of requirements.
  • oxl.lock stores exact versions and hashes; the build is byte-for-byte reproducible with the same compiler.
  • oxl.schema.lock holds field tags (§9.2); oxl publish compares the schema with the last published version.
  • Cross-compilation is built in; AWS-LC and native dependencies are built for the target by the built-in clang.
  • The build cache is by module hash, a remote cache is [build] cache = "s3://…".

Implementation-defined. Build and registry (D-8056; DIV-042; D-6552). This implementation: cross-compilation [build] targets is not implemented (it builds for Linux x86-64); the build cache is per package, not per module; the remote cache s3:// is not supported; registry serve does not use TLS; the build target with AWS-LC — impl-crypto-backend.

bad-manifest, dep-checksum, dep-conflict, dep-not-found, lock-outdated, publish-refused

Source: docs/spec/oxl-standard.en.md