Skip to content

Latest commit

 

History

History
78 lines (50 loc) · 2.77 KB

README.md

File metadata and controls

78 lines (50 loc) · 2.77 KB

New Motoko Base Library

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


This repository contains the source code for a revamped Motoko base library.

If you are new to Motoko, the original base library is available here.

Quick Start

A preview of the new base library is available via the new-base Mops package.

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

base = "https://github.com/dfinity/new-motoko-base"

It's also possible to use both versions in parallel:

base = "0.14.4"
new-base = "0.4.0"

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/new-motoko-base
cd new-motoko-base
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: