GithubHelp home page GithubHelp logo

khalilsworld / from-motoko-base Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dfinity/motoko-base

0.0 0.0 0.0 2.72 MB

The Motoko base library

License: Apache License 2.0

Shell 0.01% JavaScript 0.15% Makefile 0.08% Modelica 21.45% Dhall 0.02% Motoko 78.30%

from-motoko-base's Introduction

The Motoko base library

This repository contains the Motoko base library. It is intended to be used with the moc compiler (and tools that wrap it, like dfx).

Usage

If you are installing Motoko through the DFINITY SDK releases, then this base library is already included.

If you build your project using the Vessel package manager your package-set most likely already includes base, but if it doesn't or you want to override its version, add an entry like so to your package-set.dhall:

  {
    name = "base",
    repo = "https://github.com/dfinity/motoko-base",
    version = "master",
    dependencies = [] : List Text
  }

The package name "base" appears when importing its modules in Motoko (e.g., import "mo:base/Nat"). The repo may either be your local clone path, or this public repository url, as above. The version can be any git branch or tag name (such as version = "moc-0.8.4"). There are no dependencies. See the Vessel package manager docs for more details.

Building & Testing

Run the following commands to configure your local development branch:

# First-time setup
git clone https://github.com/dfinity/motoko-base
cd motoko-base
npm install

# Run tests
npm test

# Run all tests in wasi mode
npm test -- --mode wasi

# Run formatter
npm run prettier:format

The test runner will automatically detect the moc compiler from your system path or dfx installation.

Running the tests locally also requires Wasmtime and Vessel to be installed on your system.

Run only specific test files:

npm test <filter>

For example npm test list will run List.test.mo and AssocList.test.mo test files.

Run tests in watch mode:

npm test -- --watch

# useful to combine with filter when writing tests
npm test array -- --watch

Documentation

The documentation can be generated in doc/ by running

./make_docs.sh

which creates _out/html/index.html.

The next-moc branch

The next-moc branch contains changes that make base compatible with the in-development version of moc. This repository's public CI does not run on that branch.

External contributions are best made against master.

Contributing

Please read the Interface Design Guide for Motoko Base Library before making a pull request.

from-motoko-base's People

Contributors

github-actions[bot] avatar crusso avatar ggreif avatar kritzcreek avatar nomeata avatar chenyan-dfinity avatar rvanasa avatar matthewhammer avatar kentosugama avatar lsgunnlsgunn avatar luc-blaeser avatar rossberg avatar enzoh avatar paulyoung avatar dfx-json avatar zenvoich avatar letmejustputthishere avatar floorlamp avatar jzxchiang1 avatar byronbecker avatar actions-user avatar krpeacock avatar mmicu avatar q-uint avatar roman-kashitsyn avatar web3nl avatar hoosan avatar joaolago1113 avatar o0x avatar osa1 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.