GopherJS compiles Go code to pure JavaScript code. Its main purpose is to give you the opportunity to write front-end code in Go which will still run in all browsers. Nearly everything is supported, including Goroutines (compatibility documentation). Performance is quite good in most cases, see HTML5 game engine benchmark. Cgo is not supported. GopherJS requires Go 1.16 or newer. If you need an older Go version, you can use an older Gopher release. GopherJS uses your platform's default GOOS value when generating code. Supported GOOS values are: linux, darwin. If you're on a different platform (e.g., Windows or FreeBSD), you'll need to set the GOOS environment variable to a supported value. gopherjs serve is a useful command you can use during development. It will start an HTTP server serving on ":8080" by default, then dynamically compile your Go packages with GopherJS and serve them.

Features

  • A compiler from Go to JavaScript
  • GopherJS requires Go 1.16 or newer
  • Use the -m command line flag to generate minified code
  • Refreshing in the browser will rebuild the served files if needed
  • On supported GOOS platforms, it's possible to make system calls (file system access, etc.) available
  • GopherJS emulates a 32-bit environment

Project Samples

Project Activity

See All Activity >

Categories

Browsers, Compilers

License

BSD License

Follow GopherJS

GopherJS Web Site

Other Useful Business Software
Skillfully - The future of skills based hiring Icon
Skillfully - The future of skills based hiring

Realistic Workplace Simulations that Show Applicant Skills in Action

Skillfully transforms hiring through AI-powered skill simulations that show you how candidates actually perform before you hire them. Our platform helps companies cut through AI-generated resumes and rehearsed interviews by validating real capabilities in action. Through dynamic job specific simulations and skill-based assessments, companies like Bloomberg and McKinsey have cut screening time by 50% while dramatically improving hire quality.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of GopherJS!

Additional Project Details

Operating Systems

FreeBSD, Linux, Windows

Programming Language

Go

Related Categories

Go Browsers, Go Compilers

Registered

2021-06-07