caffeinelabs/motoko
caffeinelabs/motoko
Simple high-level language for writing Internet Computer canisters
- Stars: 588
- Forks: 127
- Watchers: 588
- Open issues: 259
- License: Apache License 2.0
- Default branch: master
- Created: 2018-05-11T11:12:10Z
Languages
- C
- Dune
- Emacs Lisp
- HTML
- Haskell
- JavaScript
- Makefile
- Nix
- OCaml
- Perl
- Python
- Rust
- Shell
- Standard ML
- Swift
- TeX
- WebAssembly
- sed
Topics
- internet-computer
- motoko
- motoko-language
- programming-language
Top Contributors
- nomeata (1707 contributions)
- crusso (910 contributions)
- ggreif (666 contributions)
- dfinity-bot (632 contributions)
- matthewhammer (535 contributions)
- rossberg (280 contributions)
- chenyan-dfinity (164 contributions)
- paulyoung (146 contributions)
- dependabot[bot] (129 contributions)
- lsgunnlsgunn (126 contributions)
README
Motoko ·

A safe, simple, actor-based programming language for building Internet Computer (ICP) canister smart contracts.
User Documentation & Samples
- Introduction
- Basic concepts and terms
- Sample code
- Language manual
- Concrete syntax
- Documentation sources
- Core package documentation
Introduction
Motivation and Goals
-
High-level programming language for ICP smart contracts
-
Simple design and familiar syntax
-
Convenient support for the actor model
-
Good fit for underlying Wasm and ICP execution model
Key Design Points
-
Object-based language with actors, classes, modules, etc. as closures
-
Classes can be actors
-
Async construct for direct-style programming of asynchronous messaging
-
Structurally typed with simple generics and subtyping
-
Overflow-checked number types, explicit conversions
-
JavaScript/TypeScript-style syntax but without the JavaScript madness
-
Inspirations from Java, C#, JavaScript, Swift, Pony, ML, Haskell
Related Repositories
- Next-Gen Core package
- Legacy Base package
- Vessel package manager
- Example projects
- ICP Ninja, online authoring of canisters
- Motoko Playground · (DEPRECATED — online IDE)
- Embed Motoko code snippets · (online interpreter)
- VS Code extension · (install)
- Browser and Node.js bindings · (npm package)
Community Resources
- Awesome Motoko
- Blocks - an online low-code editor for Motoko
- MOPS - a Motoko package manager hosted on the IC
- Motoko Bootcamp · (YouTube channel)
- Motoko library starter template
Contributing
See our contribution guidelines, code of conduct and build instructions to get started.