{"id":13718239,"url":"https://github.com/dfinity/motoko-base","last_synced_at":"2025-09-02T16:56:51.649Z","repository":{"id":37401759,"uuid":"255664515","full_name":"dfinity/motoko-base","owner":"dfinity","description":"The original Motoko base library (replaced by `core`)","archived":false,"fork":false,"pushed_at":"2025-08-15T19:16:21.000Z","size":3881,"stargazers_count":492,"open_issues_count":157,"forks_count":100,"subscribers_count":39,"default_branch":"master","last_synced_at":"2025-08-15T21:43:30.541Z","etag":null,"topics":["internet-computer","library","modules","motoko"],"latest_commit_sha":null,"homepage":"https://github.com/dfinity/motoko-core","language":"Motoko","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dfinity.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-04-14T16:34:26.000Z","updated_at":"2025-08-15T19:19:03.000Z","dependencies_parsed_at":"2023-11-12T22:19:42.437Z","dependency_job_id":"29be4545-915f-40b8-9350-e35f0c272514","html_url":"https://github.com/dfinity/motoko-base","commit_stats":null,"previous_names":[],"tags_count":121,"template":false,"template_full_name":null,"purl":"pkg:github/dfinity/motoko-base","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Fmotoko-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Fmotoko-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Fmotoko-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Fmotoko-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfinity","download_url":"https://codeload.github.com/dfinity/motoko-base/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Fmotoko-base/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273317765,"owners_count":25084037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["internet-computer","library","modules","motoko"],"created_at":"2024-08-03T00:08:22.863Z","updated_at":"2025-09-02T16:56:51.596Z","avatar_url":"https://github.com/dfinity.png","language":"Motoko","readme":"The Motoko base library\n=======================\n\nThis repository contains the Motoko base library. It is intended to be used with the [`moc` compiler](https://github.com/dfinity/motoko) (and tools that wrap it, like `dfx`).\n\nUsage\n-----\n\nIf you are installing Motoko through the DFINITY SDK releases, then this base\nlibrary is already included.\n\nIf you build your project using the [Mops package manager], run the following command to add the base package to your project:\n\n```sh\nmops add base\n```\n\nIf 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`:\n\n```\n  {\n    name = \"base\",\n    repo = \"https://github.com/dfinity/motoko-base\",\n    version = \"master\",\n    dependencies = [] : List Text\n  }\n```\n\nThe 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.\n\n[Mops package manager]: https://mops.one\n\n[Vessel package manager]: https://github.com/dfinity/vessel\n\nBuilding \u0026 Testing\n------------------\n\nRun the following commands to configure your local development branch:\n\n```sh\n# First-time setup\ngit clone https://github.com/dfinity/motoko-base\ncd motoko-base\nnpm install\n\n# Run tests\nnpm test\n\n# Run all tests in wasi mode\nnpm test -- --mode wasi\n\n# Run formatter\nnpm run prettier:format\n```\n\n**Note**:\n- If you are using `npm test` to run the tests:\n  - You don't need to install any additional dependencies.\n  - The test runner will automatically download the `moc` and `wasmtime` versions specified in `mops.toml` in the `[toolchain]` section.\n\n- If you are using `Makefile` to run the tests:\n  - The test runner will automatically detect the `moc` compiler from your system path or `dfx` installation.\n\n  - Running the tests locally also requires [Wasmtime](https://wasmtime.dev/) and [Vessel](https://github.com/dfinity/vessel) to be installed on your system.\n\nRun only specific test files:\n```sh\nnpm test \u003cfilter\u003e\n```\n\nFor example `npm test list` will run `List.test.mo` and `AssocList.test.mo` test files.\n\nRun tests in watch mode:\n```sh\nnpm test -- --watch\n\n# useful to combine with filter when writing tests\nnpm test array -- --watch\n```\n\nDocumentation\n-------------\n\nThe documentation can be generated in `doc/` by running\n\n```sh\n./make_docs.sh\n```\n\nwhich creates `_out/html/index.html`.\n\nThe `next-moc` branch\n---------------------\n\nThe `next-moc` branch contains changes that make base compatible with the\nin-development version of `moc`. This repository's public CI does _not_ run\non that branch.\n\nExternal contributions are best made against `master`.\n\n- `master` branch is meant for the newest **released** version of `moc`\n  - The CI runs on this branch\n- `next-moc` branch is meant for the **in-development** version of `moc`\n  - This branch is used by the [`motoko` repository](https://github.com/dfinity/motoko)'s CI\n\nBoth branches are kept in sync with each other by mutual, circular merges:\n- `next-moc` is updated automatically on each push to `master` via the [sync.yml](.github/workflows/sync.yml) workflow\n- `master` is updated **manually** on each release of `moc` as part of the `motoko` release process\n\nOnly *normal* merges are allowed between `master` and `next-moc`, because development is permitted on both branches.\nThis policy makes every PR (to either branch) visible in the history of both branches.\n\nContributing\n------------\n\nPlease read the [Interface Design Guide for Motoko Base Library](doc/design.md) before making a pull request.\n","funding_links":[],"categories":["Libraries","Motoko","Metaverse, NFTs \u0026 Gaming"],"sub_categories":["Data structures"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfinity%2Fmotoko-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfinity%2Fmotoko-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfinity%2Fmotoko-base/lists"}