Skip to main content

mops.toml file

[package]

FieldDescription
namePackage name (e.g. lib)
versionPackage version in format x.y.z (e.g. 0.1.2)
descriptionPackage description shown in search results
repositoryRepository url (e.g. https://github.com/dfinity/motoko)
keywordsArray of keywords (max 10 items, max 20 chars)
licensePackage license. Use SPDX license identifier

[dependencies]

FieldDescription
<mops_package_name>
Example: base
Version in format x.y.z (e.g. 0.1.2)
<mops_package_name>@<pinned_version>
Example: base@0.11.0
Version in format x.y.z (e.g. 0.1.2)
<github_package_name>
Example: gh-pkg
Format: https://github.com/<repo>#<branch/tag/ref>
Example: https://github.com/dfinity/motoko-base#moc-0.11.0

Learn how Mops resolves dependencies here.

Learn about version pinning here.

[dev-dependencies]

Same structure as [dependencies].

dev-dependencies are only used for testing and benchmarking purposes. They are not installed when the package is used as a dependency.

[toolchain]

See toolchain management page for more details.

FieldDescription
mocMotoko compiler used for building canisters and running tests
wasmtimeWASM runtime used to run tests in wasi mode
pocket-icLocal IC replica used to run benchmarks

[requirements]

When a user installs your package(as a transitive dependency too), Mops will check if the requirements are met and display a warning if they are not.

Use only if your package will not work with older versions of the moc.

FieldDescription
mocMotoko compiler version (e.g. 0.11.0 which means >=0.11.0)