qmetrics.net

GopherJS

Go to JavaScript compiler for browser front-end code

GopherJS translates Go programs into JavaScript so front-end logic can run in browsers. Install the gopherjs CLI to build, test, and serve packages like the standard go tool.

Overview

GopherJS is a compiler that turns Go source into pure JavaScript. Its purpose is to let teams write client-side code in Go while still targeting normal browser environments.

The tool mirrors familiar go commands: build, install, test, run, and help, emitting JavaScript and source maps for main packages. A development server compiles packages on demand, serves static assets, and can supply minimal HTML when no index file exists.

Language support is broad, including goroutines, with compatibility notes in the project docs. Cgo is not supported. Supported build targets include linux and darwin GOOS values; other hosts can set GOOS when invoking the compiler. Minification and file watching are available via flags.

Community bindings help call DOM and JavaScript APIs from Go, including packages for jQuery and AngularJS patterns. An online playground lets you try compilation without a local project. Running generated code locally for test and run flows expects a recent Node.js runtime.

Key features

  • Go source to JavaScript output
  • goroutine support in browsers
  • gopherjs build and install commands
  • Development HTTP serve command
  • JavaScript source maps
  • Minification flag
  • syscall/js compatibility
  • js package for DOM access

Use cases

  • Browser UI logic in Go
  • Share Go types on the client
  • Interactive front-end prototypes
  • Teaching Go in the browser

Tags

Similar software

TypeScript

Typed JavaScript language with compile-time checks

TypeScript adds optional static types to JavaScript and compiles to standard JavaScript. It targets application-scale code on browsers, Node.js, and other JavaScript runtimes.

★ 111.9k⟳ yesterdayApache-2.0

Carbon Lang

Experimental successor language interoperating with C++

Carbon Language is an experimental programming language and toolchain aimed at C++ interoperability, migration, and modernization. It is not ready for production use and remains under active development.

★ 34k⟳ yesterdayApache-2.0 · open core

Roslyn

Open-source C# and Visual Basic compiler platform APIs

Roslyn implements the .NET C# and Visual Basic compilers and exposes APIs for analyzing, refactoring, and generating .NET code in tools and applications.

★ 20.8k⟳ todayMIT

Halide

Embedded language for fast image and array pipelines

Halide helps write high-performance image and array processing code, embedded in C++ or Python. Pipelines compile to CPUs and multiple GPU compute APIs.

★ 6.6k⟳ todayMIT · open core

The Agda Wiki

Dependently typed functional language and interactive proof assistant

Agda combines a dependently typed functional programming language with an interactive environment for writing and checking constructive proofs.

★ 3k⟳ yesterdayMIT

Dingo

Go meta-language transpiling to idiomatic Go

Dingo is a language that compiles to clean Go code, adding Result types, error propagation, pattern matching, and related syntax while staying compatible with the Go toolchain.

★ 1.9k⟳ 2 months agoApache-2.0