Skip to content

dfinity/motoko-core

Repository files navigation

Motoko Core Library

Work in progress! Please consider providing feedback on the GitHub discussions page.


This repository contains the standard library for the Motoko programming language.

The original standard library (known as "base") is available here.

Quick Start

A preview of the core library is available via the core Mops package.

You can quickly try out the core library by making the following change to your mops.toml config file:

core = "0.5.0"

It's also possible to use the latest changes in the GitHub repository:

core = "https://github.com/dfinity/motoko-core"

Since this is a preview release for community feedback, expect breaking changes. Please report any bugs or inconsistencies by opening a GitHub issue.

Local Environment

Make sure that Node.js >= 22.x and the latest version of dfx are 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.

Documentation

It's possible to generate a documentation preview by running the following command:

npm run docs

We automatically generate previews for each pull request.

Contributing

PRs are welcome! Please check out the contributor guidelines for more information.

Code and documentation style guidelines for the repository can be found here.

Big thanks to the following community contributors:

About

The official standard library for Motoko (work in progress).

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published