• Stars
    star
    249
  • Rank 162,987 (Top 4 %)
  • Language
    JavaScript
  • Created over 5 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Go compiler running entirely in your browser

wasm-go-playground

This is the Go compiler ("gc") compiled for WASM, running in your browser! It can be used to run a simple playground, Γ  la play.golang.org entirely in your browser!

You can try it out here: https://ccbrown.github.io/wasm-go-playground

⚠️ Important ⚠️

  • Safari works, but is unbearably slow. Chrome or Firefox for desktop is highly recommended.
  • Imports other than "runtime" are not supported. Making them work would be straightforward, but I'm not compelled to spend time on it right now since this probably has no practical uses.

Experimental Playgrounds

One potential use-case for this is making compiler changes easily and freely available for people to try out.

If you're interested in trying out the try proposal, you can do so here: https://ccbrown.github.io/wasm-go-playground/experimental/try-builtin/

If you're interested in trying out generics draft design, you can do so here: https://ccbrown.github.io/wasm-go-playground/experimental/generics/

Code

  • ./cmd – These are Go commands compiled for WASM. They were all produced by running commands such as GOOS=js GOARCH=wasm go build . from the Go source directories.
  • ./experimental – This directory contains experimental playgrounds, for testing out modified compilers.
  • ./prebuilt – These are prebuilt runtime WASM files. These were produced by copying them from Go's cache after compiling anything for WASM.
  • . – The top level directory contains all the static files for the in-browser Go playground. Most of the files are lightly modified copies of bits and pieces from play.golang.org. The most substantial work here is in index.html and wasm_exec.js as wasm_exec.js needed a virtual filesystem implementation.

More Repositories

1

teslacam-recovery

Python script to help recover lost video from TeslaCam USB drives
Python
107
star
2

needy

A C++ library dependency helper.
Python
53
star
3

api-fu

A collection of Go packages for creating robust GraphQL APIs
Go
52
star
4

neural-net

An educational neural net library in Rust
Rust
40
star
5

poe-go

A library and guide for creating PoE applications in Go
Go
28
star
6

gggtracker

Grinding Gear activity tracker for Path of Exile.
Go
24
star
7

go-immutable

A collection of fast, general-purpose immutable data structures for Go.
Go
18
star
8

xiv-sim

Simulator for Final Fantasy 14.
C++
11
star
9

razer-chroma-rs

Razer Chroma SDK for Rust
Rust
10
star
10

factorystatsd

This is a Factorio mod for next level reliability engineering. Build dashboards for your factory in Datadog or get woken up by PagerDuty when incidents occur!
Lua
10
star
11

serverless-bot

Demo for Mattermost dev talk on serverless bot building.
Python
5
star
12

poe-tree-json-generator

Generates the JSON for the POE skill tree using game files.
Python
5
star
13

mdx-viewer

Some code for viewing MDX models from Blizzard's MPQ files. Likely very out-of-date.
C++
5
star
14

aarch64-std

implementations of standard library components for bare-metal aarch64
Rust
4
star
15

codex

A light-weight programmer's text editor.
Objective-C
3
star
16

compiler

Hand-written compiler for a c++-like language.
C++
2
star
17

xiv-lua

Lua add-on platform for Final Fantasy 14.
C++
2
star
18

axi-lite-sv

SystemVerilog
2
star
19

lessdb

Rust
2
star
20

dotfiles

.dotfiles
Shell
1
star
21

imagenerics

An imaginary library for an imaginary Go feature
1
star
22

axi-lite-vhdl

axi4-lite implementation in vhdl
Verilog
1
star
23

gba-emu

An emulator for the Game Boy Advance.
C++
1
star
24

xiv-sim-web

Web front-end for xiv-sim.
JavaScript
1
star
25

mfado

Like sudo, but for AWS+MFA.
Python
1
star
26

gostd

Rewriting Go packages in C++ from scratch (-nostdlib)
C++
1
star