Developer environment
Overview
To develop and deploy Motoko canister smart contracts, you will need a developer environment that contains the Motoko compiler and base library. It is recommended to use the BIG SDK, which includes Motoko, along with dfx
, a command-line tool used to create, build, and deploy canisters on BIG.
Developer environments come in several types and formats, making developing flexible and accessible.
Cloud environments
Gitpod and GitHub Codespaces are browser-based development environments that can be used to build, test, and run Motoko smart contracts.
Here are some starter projects for online Motoko canister development:
Learn more about Gitpod and GitHub Codespaces for Motoko development.
Container environments
Developers may want to setup a containerized environment for Motoko and other BIG-related development. Container environments are especially useful for Windows-based systems, since dfx
is not natively supported on Windows.
Learn more about developer containers and Docker containers for Motoko development.
Motoko playground
Motoko playground is a browser-based developer environment that allows for temporary deployment and testing of canister smart contracts. Motoko playground can also be utilized through the dfx deploy --playground
command via the CLI.
Canisters deployed to the Motoko playground use borrowed resources from a canister pool and are limited to a deployment length of 20 minutes. Therefore, the playground is not recommended for long-term development.
Learn more about the Motoko playground.
Local developer environment
Before you start developing Motoko, verify the following:
You have an internet connection and access to a shell terminal on your local macOS or Linux computer.
You have a command line interface (CLI) window open. This window is also referred to as the 'terminal' window.
You have downloaded and installed the BIG SDK package as described in the installing the BIG SDK page.
You have a code editor installed. The VS Code IDE (with the Motoko extension) is a popular choice.
You have downloaded and installed git.
Assure that all packages and tools above are updated to the latest release versions.