moxzi
Docs / On-chain builds / Sources and packages

Sources and packagesalpha

How source files reach the compiler canister, the storage limits, and building from registered mops packages without uploading them.

The compiler canister keeps a separate set of files for each caller. moxzi build --remote uploads every file in the build, under the same paths a local build uses (/src/… for your project, /pkg/NAME/… for packages). moxzi deps FILE lists them.

Files stay in the canister until you remove them. The canister's controllers can read them.

Limits#

LimitValue
Per caller64 MiB
All callers together1 GiB

An upload past either limit fails rather than storing part of a file. To free space, remove files with the canister's remove(path) or removeExcept(keep) method.

File methods#

MethodEffect
write(path, bytes)Store a file, replacing any previous version
appendChunk(path, bytes)Append to a file. moxzi splits files larger than 1.9 MB this way
read(path), list()Read your own files
remove(path)Delete a file and free its space
removeExcept(keep)Delete every file not in keep and free its space; returns how many it deleted. moxzi build --remote calls it before each build
vfsStats()Space used and available

Registered packages#

A published mops package version never changes, so the canister can store it once and let every build use it. Registered package files aren't uploaded and don't count against your limit.

Registration checks every file against the hashes the mops registry publishes. The canister uses only packages that pass.

MethodEffect
putTagFrom(tag, entries, source)Register a package version, name@version, after uploading any missing file contents with missingBlobs and putBlobs
verifyTagAgainstMops(tag)Check the registered files against the mops registry
useTags([tag, …])Add verified packages to your files, without uploading

A build from registered packages produces the same bytes as one that uploaded them.

Limitations#

LimitationWhat to do
moxzi build --remote uploads everything; it can't use registered packages yetCall the canister methods above from your own tooling
Your own source files must always be uploadedBuild locally, or run your own compiler canister, if they must stay private
On this pageLimitsFile methodsRegistered packagesLimitations