<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/gopherjs-gopherjs-a-compiler-from-go-to-javascript-for-running-go-code-in-a-browser-epv4w7er8" -->

---
title: gopherjs/gopherjs: A compiler from Go to JavaScript for...
description: GopherJS is a Go to JavaScript compiler that allows writing front-end code in Go to run in all browsers. It has support for various Go versions and provides...
canonical: https://daily.dev/posts/gopherjs-gopherjs-a-compiler-from-go-to-javascript-for-running-go-code-in-a-browser-epv4w7er8
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: gopherjs/gopherjs: A compiler from Go to JavaScript for running Go code in a browser | daily.dev
og:description: GopherJS is a Go to JavaScript compiler that allows writing front-end code in Go to run in all browsers. It has support for various Go versions and provides...
og:url: https://daily.dev/posts/gopherjs-gopherjs-a-compiler-from-go-to-javascript-for-running-go-code-in-a-browser-epv4w7er8
og:image: https://api.daily.dev/og/posts/Epv4W7Er8.png
og:image:alt: gopherjs/gopherjs: A compiler from Go to JavaScript for running Go code in a browser
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# gopherjs/gopherjs: A compiler from Go to JavaScript for running Go code in a browser

**[Community Picks](https://daily.dev/sources/community)** · 6 min read · 65 upvotes · 11 comments

## Summary

GopherJS is a Go to JavaScript compiler that allows writing front-end code in Go to run in all browsers. It has support for various Go versions and provides bindings to JavaScript APIs and libraries. GopherJS can be installed using 'go install' command.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://github.com/gopherjs/gopherjs>

## Community discussion

Top comments from developers on daily.dev.

**@kpratik2015** · 3 upvotes

> People will do anything to avoid writing JS

**@angelvdev** · 1 upvotes

> Classic "_Compiler from %not_js% to JS_". Love it!

**@leonardomussato** · 1 upvotes

> Yeah, cool project but I don't see the point on doing something like this. Javascript is way easier to write and interact with the DOM so why this? For something similar I would go 100% with RUST that can compile in WASM and has already frameworks like TAURI to better manage the code... Please let me know if you know what is the potential of this :) Anyway, nice project

**@gfregalado** · 1 upvotes

> Why?

**@alexravenna** · 0 upvotes

> "Running Go code in a browser" when it's actually transpiled into a different language and then run...right.

---

Tags: [#compiler](https://daily.dev/tags/compiler), [#frontend](https://daily.dev/tags/frontend), [#golang](https://daily.dev/tags/golang), [#javascript](https://daily.dev/tags/javascript)

[View this post on daily.dev](https://daily.dev/posts/gopherjs-gopherjs-a-compiler-from-go-to-javascript-for-running-go-code-in-a-browser-epv4w7er8)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"gopherjs/gopherjs: A compiler from Go to JavaScript for running Go code in a browser","url":"https://daily.dev/posts/gopherjs-gopherjs-a-compiler-from-go-to-javascript-for-running-go-code-in-a-browser-epv4w7er8","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/gopherjs-gopherjs-a-compiler-from-go-to-javascript-for-running-go-code-in-a-browser-epv4w7er8"},"datePublished":"2024-05-06T04:43:40.914Z","dateModified":"2025-12-08T02:17:14.415Z","description":"GopherJS is a Go to JavaScript compiler that allows writing front-end code in Go to run in all browsers. It has support for various Go versions and provides...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6bab47daaf0b221df4034321ba710124?_a=AQAEuiZ","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6bab47daaf0b221df4034321ba710124?_a=AQAEuiZ","isAccessibleForFree":true,"articleSection":"Community Picks","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Community Picks","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1655817725/logos/community","url":"https://daily.dev/sources/community"},"commentCount":11,"discussionUrl":"https://daily.dev/posts/gopherjs-gopherjs-a-compiler-from-go-to-javascript-for-running-go-code-in-a-browser-epv4w7er8","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":65},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":11}],"keywords":"compiler,frontend,golang,javascript","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Community Picks","item":"https://daily.dev/sources/community"},{"@type":"ListItem","position":3,"name":"gopherjs/gopherjs: A compiler from Go to JavaScript for running Go code in a browser"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/gopherjs-gopherjs-a-compiler-from-go-to-javascript-for-running-go-code-in-a-browser-epv4w7er8","comment":[{"@type":"Comment","text":"People will do anything to avoid writing JS","datePublished":"2024-05-12T13:24:50.122Z","url":"https://daily.dev/posts/Epv4W7Er8#c-8jmp846by","author":{"@type":"Person","name":"Pratik Kataria","url":"https://daily.dev/kpratik2015","image":"https://lh3.googleusercontent.com/a-/AOh14GhCEc6CVFXZv1PGjUepbuLmZbTF7CauSEuVRD1yewo=s100"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"Classic “Compiler from %not_js% to JS”. Love it!","datePublished":"2024-05-19T02:17:14.873Z","url":"https://daily.dev/posts/Epv4W7Er8#c-xd6AMtw0m","author":{"@type":"Person","name":"Angel Scutari","url":"https://daily.dev/angelvdev","image":"https://media.daily.dev/image/upload/s--tTY6cNuH--/f_auto/v1748182138/avatars/avatar_OSmdi5U8fPDF8GN6SAJn9?_a=BAMClqUq0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"Yeah, cool project but I don’t see the point on doing something like this. Javascript is way easier to write and interact with the DOM so why this? For something similar I would go 100% with RUST that can compile in WASM and has already frameworks like TAURI to better manage the code… Please let me know if you know what is the potential of this :) Anyway, nice project","datePublished":"2024-05-13T11:05:47.524Z","url":"https://daily.dev/posts/Epv4W7Er8#c-nZ1URFNl6","author":{"@type":"Person","name":"Leonardo Mussato","url":"https://daily.dev/leonardomussato","image":"https://media.daily.dev/image/upload/s--1kCRRK_o--/f_auto/v1755352881/avatars/avatar_O7Irsuj3vRrLtWO0tWZrq?_a=BAMClqZW0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"Why?","datePublished":"2024-05-08T08:52:41.164Z","url":"https://daily.dev/posts/Epv4W7Er8#c-xPTwwII8U","author":{"@type":"Person","name":"Gonçalo Regalado","url":"https://daily.dev/gfregalado","image":"https://media.daily.dev/image/upload/f_auto/v1624871227/avatars/177bbbPg8"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"“Running Go code in a browser” when it’s actually transpiled into a different language and then run…right.","datePublished":"2024-05-13T12:47:59.543Z","url":"https://daily.dev/posts/Epv4W7Er8#c-TxrZpChsN","author":{"@type":"Person","name":"Alex Ravenna","url":"https://daily.dev/alexravenna","image":"https://avatars.githubusercontent.com/u/29532881?v=4"}}]}
```

