Announcing Motoko Playground!

We are excited to announce Motoko Playground:

The Motoko playground allows users to build and deploy Motoko canisters directly in the browser,
without downloading SDK, setting up a local dev environment, and without a wallet.

The code is also open sourced at GitHub - dfinity/motoko-playground: Motoko playground

We plan on adding many more features to make playground a full-featured web IDE for the Internet Computer. Community contributions are highly welcomed!


Very impressive stuff!


Thanks for the tool it’s really helpful.
I have a question, how can one add new file?

Congrats :clap:

Would there be a Rust version of that playground?

Great, thanks!
Looking forward to deploying Playground to the test network and interacting with other apps!

1 Like

Really cool! I tried it and it is really smooth!

1 Like

I have a question, how can one add new file?

Not yet, we have an issue for this. For now, you can import files from github

Would there be a Rust version of that playground?

Rust works very differently from Motoko, so it will probably be a whole new project. But we can easily support users to upload arbitrary Wasm modules, so that you can compile Rust code locally and upload.


We add a “Save & Share” button so that you can save your work in the Motoko Playground to our backend canister. It’s also useful for people asking Motoko questions in the forum, where they can share the playground links instead of pasting code snippets.


In regards to the full-featured web IDE, has anyone had a look at VS Code in the browser? I understand that the core editor itself is monaco but I wonder if we can integrate into a well established, web based, full featured, open source IDE. It seems the [GitHub Project Selection], [Save & Share], [Deploy] and other features could be integrated into a fork of that project. Another feature could include a “simplified”, beginner friendly mode. It would look similar to the current project but can also switch to a “normal” mode, which would just be the full featured browser-based Visual Studio Code IDE.

Any thoughts?

I think that, plus a nice Github Action integration could be a totally viable workflow

1 Like

Could be. But that means we need to host the IDE on a cloud VM instead of IC. The IC can only run WebAssembly, not docker images. Our focus is to provide features that are unique to the IC, such as deployment, canister interaction, cycles, while adding some convenience features, such as code sharing, when resource permitting. The community is free to port the code to any platforms they like.


I see. Thank you for the clarity, moving to a cloud VM seems counter productive.

We just add canister profiling in Motoko playground. You can now count the number of Wasm instructions executed for each update call, including the number of instructions spent in garbage collection. Thanks to our recent improvements in GC, the GC cost is significantly reduced!


is there any test network?


the stupid forum often failed when pasting code:

I’m not found any network, Looking forward to future

Hi, only a quick question, how long are the files stored, when using the Save & Share Button ?


Indefinitely. Not sure what to do when we reach the wasm memory limit, but we are still far away from the limit.

ok, thanks for your answer.

We plan to publish our internal IC course and I would like to integrate the motoko playground like gitpod or stackblitz for coding examples.

Is there a simple way to use the playground with several example github repos?

1 Like

You can import from github via query parameters. For example,

We also allow postMessage from another website to transfer code directly to the playground: GitHub - dfinity/motoko-playground: Motoko playground