core
July 28, 2026 · View on GitHub
- 📦 Mops Package
- ✨ Documentation
The core package is the official standard library for the Motoko programming language.
This replaces the original base library, which is available here.
An official migration guide is available for upgrading projects from base to core.
Quick Start
- Install the Mops package manager
- Open a terminal in your project directory
- Run
mops add core
This adds the following dependency to your mops.toml config file:
[dependencies]
core = "2.6.1"
Contributing
This repository is currently closed to external contributions. Please feel free to report a bug, ask a question, or request a feature on the project's GitHub issues page.
Interface design and code style guidelines for the repository can be found here.
Dev Environment
Make sure that Node.js
>= 22.xis installed on your system.
Run the following commands to configure your local development branch:
# First-time setup
git clone https://github.com/dfinity/motoko-core
cd motoko-core
npm ci
npx ic-mops toolchain init
Below is a quick reference for commonly-used scripts during development:
npm test # Run all tests
npm run format # Format Motoko files
npm run validate:api # Update the public API lockfile
npm run validate:docs Array # Run code snippets in `src/Array.mo`
All available scripts can be found in the project's package.json file.
Major Contributors
Big thanks to the following community contributors: