Zigland Playground - an interactive playground to experiment with Zig code in your browser

Hi everyone! I recently built an interactive playground for the Zig language. Please give it a try:

https://zigland.dev/play

It just reached an MVP stage, and it currently offers two main features:

  1. Experiment with Zig code snippets directly in the browser, with instant compile-and-run results.
  2. Share playground URLs as an easy way to exchange and discuss code snippets.

This project was mainly inspired by TS Playground and A Tour of Go.

A bit more background: I’m a beginner in Zig — and honestly a beginner in system programming as well. I’ve been deeply impressed by Zig’s ideas, philosophy, and long-term vision, and I want to spend more time diving deeper and contributing to the community. I believe that having a portable, browser-based playground can be very helpful when learning a new language and sharing insights, so I created Zigland as a platform, starting with this playground.

In the future, I hope Zigland can offer more tools and learning experiences for exploring and deep-diving into Zig. I’m excited to learn together with all of you and hopefully contribute something meaningful to the ecosystem.

22 Likes

This is awesome! I just tried it out, and it works like a charm. The interface is clean, and it’s fantastic that you’ve already got features like sharing URLs for snippets.

As you think about future features, I had one idea that would be super valuable: an option to select the Zig version. That would make it incredibly useful for testing snippets against different releases or even the master branch.

FYI, the Zigtools team has a similar playground (https://playground.zigtools.org), you might want to check it out.

4 Likes

Thanks! Really glad to hear it’s working well. I appreciate the suggestion about version selection, definitely already on my radar, along with support for different target platforms!

Thanks for the heads-up about the Zigtools playground. Checking it out taught me a lot! It looks like they use WebAssembly for in-browser execution.

For Zigland Playground, I decided to go with a sandboxed backend runner. I believe this approach will allow me to implement more future features, like running snippets on different platforms.

1 Like

at least show Zig version

Showing it without running anything would be better, but Zigland already shows the version in its log output.
You also can run a program like:

const std = @import("std");
const builtin = @import("builtin");

pub fn main() !void {
    std.debug.print("version: {s}\n", .{builtin.zig_version_string});
}
3 Likes