CINXE.COM
TinyGo
<!doctype html> <html itemscope itemtype="http://schema.org/WebPage" lang="en" class="no-js"> <head> <meta name="generator" content="Hugo 0.129.0"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <link rel="alternate" type="application/rss+xml" href="https://tinygo.org/index.xml"> <meta name="robots" content="index, follow"> <link rel="shortcut icon" href="/favicons/favicon.ico" > <link rel="apple-touch-icon" href="/favicons/apple-touch-icon-180x180.png" sizes="180x180"> <link rel="icon" type="image/png" href="/favicons/favicon-16x16.png" sizes="16x16"> <link rel="icon" type="image/png" href="/favicons/favicon-32x32.png" sizes="32x32"> <link rel="icon" type="image/png" href="/favicons/android-36x36.png" sizes="36x36"> <link rel="icon" type="image/png" href="/favicons/android-48x48.png" sizes="48x48"> <link rel="icon" type="image/png" href="/favicons/android-72x72.png" sizes="72x72"> <link rel="icon" type="image/png" href="/favicons/android-96x96.png" sizes="96x96"> <link rel="icon" type="image/png" href="/favicons/android-144x144.png" sizes="144x144"> <link rel="icon" type="image/png" href="/favicons/android-192x192.png" sizes="192x192"> <title>TinyGo</title> <meta name="description" content="A Go compiler for small places"> <meta property="og:url" content="https://tinygo.org/"> <meta property="og:site_name" content="TinyGo"> <meta property="og:title" content="TinyGo Home"> <meta property="og:description" content="TinyGo - A Go Compiler For Small Places Get Started See the code Go on embedded systems and WebAssembly TinyGo brings the Go programming language to embedded systems and to the modern web by creating a new compiler based on LLVM. You can compile and run TinyGo programs on over 100 different microcontroller boards from maker boards such as the BBC micro:bit and the Arduino Uno, to industrial processors from Nordic Semiconductor and ST Microelectronics."> <meta property="og:locale" content="en"> <meta property="og:type" content="website"> <meta itemprop="name" content="TinyGo Home"> <meta itemprop="description" content="TinyGo - A Go Compiler For Small Places Get Started See the code Go on embedded systems and WebAssembly TinyGo brings the Go programming language to embedded systems and to the modern web by creating a new compiler based on LLVM. You can compile and run TinyGo programs on over 100 different microcontroller boards from maker boards such as the BBC micro:bit and the Arduino Uno, to industrial processors from Nordic Semiconductor and ST Microelectronics."> <meta itemprop="dateModified" content="2024-06-16T16:55:08+02:00"> <meta itemprop="wordCount" content="199"> <meta name="twitter:card" content="summary"> <meta name="twitter:title" content="TinyGo Home"> <meta name="twitter:description" content="TinyGo - A Go Compiler For Small Places Get Started See the code Go on embedded systems and WebAssembly TinyGo brings the Go programming language to embedded systems and to the modern web by creating a new compiler based on LLVM. You can compile and run TinyGo programs on over 100 different microcontroller boards from maker boards such as the BBC micro:bit and the Arduino Uno, to industrial processors from Nordic Semiconductor and ST Microelectronics."> <link rel="preload" href="/scss/main.min.9cb6d1b842cece7be1aa278716fea9e53f2821ca4056ce1d4249c33cf9ae3e6a.css" as="style"> <link href="/scss/main.min.9cb6d1b842cece7be1aa278716fea9e53f2821ca4056ce1d4249c33cf9ae3e6a.css" rel="stylesheet" integrity=""> <script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous"></script> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" /> </head> <body class="td-home"> <header> <nav class="td-navbar js-navbar-scroll td-navbar-cover" data-bs-theme="dark"> <div class="container-fluid flex-column flex-md-row"> <a class="navbar-brand" href="/"><span class="navbar-brand__logo navbar-logo"><svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="60" height="51" viewBox="0 0 60 51" enable-background="new 0 0 60 51"><image id="image0" width="60" height="51" x="0" y="0" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAzCAYAAADLqmunAAAABGdBTUEAALGPC/xhBQAAACBjSFJN AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAA CXBIWXMAABTqAAAU6gF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spnN mzd/3NPTg5deeunx1tbWJ0VRlBiGQT6fx9WrV0FRFGZnZ+/RUf99haIozGUzyzkzAFQqlYWRkZHf /eAHPzh+7do1ZLNZ8Dz/ya3KbfSpHo/nv6x4I/7fKRz9hwmpvRGfyWT+G4DieoP+P3X284K/8yLU AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTA1LTA0VDEyOjEwOjUzKzAwOjAwtNpcCwAAACV0RVh0 ZGF0ZTptb2RpZnkAMjAyMS0wNS0wNFQxMjoxMDo1MyswMDowMMWH5LcAAAAASUVORK5CYII="/></svg></span><span class="navbar-brand__name">TinyGo</span></a> <div class="td-navbar-nav-scroll ms-md-auto" id="main_navbar"> <ul class="navbar-nav"> <li class="nav-item"> <a class="nav-link" href="/getting-started/"><span>Getting Started</span></a> </li> <li class="nav-item"> <a class="nav-link" href="/docs/"><span>Documentation</span></a> </li> <li class="nav-item"> <a class="nav-link" href="/media/"><span>Media</span></a> </li> <li class="td-light-dark-menu nav-item dropdown"> <svg xmlns="http://www.w3.org/2000/svg" class="d-none"> <symbol id="check2" viewBox="0 0 16 16"> <path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"/> </symbol> <symbol id="circle-half" viewBox="0 0 16 16"> <path d="M8 15A7 7 0 1 0 8 1v14zm0 1A8 8 0 1 1 8 0a8 8 0 0 1 0 16z"/> </symbol> <symbol id="moon-stars-fill" viewBox="0 0 16 16"> <path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"/> <path d="M10.794 3.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387a1.734 1.734 0 0 0-1.097 1.097l-.387 1.162a.217.217 0 0 1-.412 0l-.387-1.162A1.734 1.734 0 0 0 9.31 6.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387a1.734 1.734 0 0 0 1.097-1.097l.387-1.162zM13.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.156 1.156 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.156 1.156 0 0 0-.732-.732l-.774-.258a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732L13.863.1z"/> </symbol> <symbol id="sun-fill" viewBox="0 0 16 16"> <path d="M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"/> </symbol> </svg> <button class="btn btn-link nav-link dropdown-toggle d-flex align-items-center" id="bd-theme" type="button" aria-expanded="false" data-bs-toggle="dropdown" data-bs-display="static" aria-label="Toggle theme (auto)"> <svg class="bi my-1 theme-icon-active"><use href="#circle-half"></use></svg> </button> <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="bd-theme-text"> <li> <button type="button" class="dropdown-item d-flex align-items-center" data-bs-theme-value="light" aria-pressed="false"> <svg class="bi me-2 opacity-50"><use href="#sun-fill"></use></svg> Light <svg class="bi ms-auto d-none"><use href="#check2"></use></svg> </button> </li> <li> <button type="button" class="dropdown-item d-flex align-items-center" data-bs-theme-value="dark" aria-pressed="false"> <svg class="bi me-2 opacity-50"><use href="#moon-stars-fill"></use></svg> Dark <svg class="bi ms-auto d-none"><use href="#check2"></use></svg> </button> </li> <li> <button type="button" class="dropdown-item d-flex align-items-center active" data-bs-theme-value="auto" aria-pressed="true"> <svg class="bi me-2 opacity-50"><use href="#circle-half"></use></svg> Auto <svg class="bi ms-auto d-none"><use href="#check2"></use></svg> </button> </li> </ul> </li> </ul> </div> <div class="d-none d-lg-block"> <div class="td-search"> <div class="td-search__icon"></div> <input type="search" class="td-search__input form-control td-search-input" placeholder="Search this site…" aria-label="Search this site…" autocomplete="off"> </div> </div> </div> </nav> </header> <div class="container-fluid td-default td-outer"> <main role="main" class="td-main"> <link rel="preload" as="image" href="/arduino-background_hue78ae8632ca2e8661245f98f2f833186_281717_960x540_fill_q75_catmullrom_top.jpg" media="(max-width: 1200px)"> <link rel="preload" as="image" href="/arduino-background_hue78ae8632ca2e8661245f98f2f833186_281717_1920x1080_fill_q75_catmullrom_top.jpg" media="(min-width: 1200px)"> <style> #td-cover-block-0 { background-image: url(/arduino-background_hue78ae8632ca2e8661245f98f2f833186_281717_960x540_fill_q75_catmullrom_top.jpg); } @media only screen and (min-width: 1200px) { #td-cover-block-0 { background-image: url(/arduino-background_hue78ae8632ca2e8661245f98f2f833186_281717_1920x1080_fill_q75_catmullrom_top.jpg); } } </style> <section id="td-cover-block-0" class="row td-cover-block td-cover-block--height-full js-td-cover td-overlay td-overlay--dark -bg-primary"> <div class="col-12"> <div class="container td-overlay__inner"> <div class="text-center"> <h1 class="display-1 mt-0 mt-md-5 pb-4">TinyGo - A Go Compiler For Small Places</h1> <div class="pt-3 lead"> <p><img src="images/tinygo-logo.png" alt="TinyGo Logo"></p> <div class="mx-auto"> <a class="btn btn-lg btn-primary mr-3 mb-4" href="/getting-started/"> Get Started <i class="fas fa-arrow-alt-circle-right ml-2"></i> </a> <a class="btn btn-lg btn-secondary mr-3 mb-4" href="https://github.com/tinygo-org/tinygo"> See the code <i class="fab fa-github ml-2 "></i> </a> <p class="h2 mt-5">Go on embedded systems and WebAssembly</p> </div> </div> </div> </div> </div> </section> <div><a id="td-block-1" class="td-offset-anchor"></a></div> <section class="row td-box td-box--secondary position-relative td-box--height-auto"> <div class="col-12"> <div class="container text-center td-arrow-down"> <div class="h4 mb-0"> <p>TinyGo brings the <a href="https://golang.org">Go programming language</a> to embedded systems and to the modern web by creating a new compiler based on <a href="https://llvm.org/">LLVM</a>.</p> <p>You can compile and run TinyGo programs on over 100 different microcontroller boards from maker boards such as the <a href="https://www.microbit.co.uk/">BBC micro:bit</a> and the <a href="https://store.arduino.cc/usa/arduino-uno-rev3/">Arduino Uno</a>, to industrial processors from <a href="https://www.nordicsemi.com/">Nordic Semiconductor</a> and <a href="https://www.st.com/">ST Microelectronics</a>. <a href="/docs/reference/microcontrollers">Click here for the complete list</a></p> <p>TinyGo can also produce <a href="https://webassembly.org/">WebAssembly (WASM)</a> code which is very compact in size. You can compile programs for web browsers, as well as for server and edge computing environments that support the <a href="https://github.com/WebAssembly/WASI">WebAssembly System Interface (WASI)</a> family of interfaces.</p> <p>Ready to get started? <a href="getting-started">Click here</a>.</p> </div> </div> </div> </section> <div><a id="td-block-2" class="td-offset-anchor"></a></div> <section class="row td-box td-box--primary-light td-box--height-auto"> <div class="col"> <div class="container"> <link rel="stylesheet" href="playground/simulator.css"> <link rel="stylesheet" href="playground/simulator-bootstrap.css"> <script type="module" src="playground-home.js"></script> <link rel="modulepreload" href="/playground/resources/editor.bundle.min.js"/> <div class="col"> <div class="container" id="playground"> <h1 class="text-center">Try TinyGo</h1> <div class="row px-0"> <div class="col col-auto"> <div class="input-group mb-3"> <span class="input-group-text">Example</span> <select class="form-select example_select" disabled> <option value="hello">Hello world</option> <option value="arduino" selected>Blinking LED (Arduino Uno)</option> <option value="circuitplay_express">RGB LEDs (Adafruit Circuit Playground Express)</option> <option value="gopher_badge">Display (Gopher Badge)</option> </select> </div> </div> <div class="col col-auto"> <button class="btn btn-secondary playground-btn-flash mb-3" disabled>Download binary</button> <a href="/tour/" class="btn btn-link mb-3">Tour of TinyGo</a> </div> </div> <div class="playground-editor mb-3" tabindex="-1"></div> <div class="simulator"> <div class="schematic-buttons"> <button class="schematic-button-pause schematic-button" title="Pause/resume the simulation"> <!-- only one of these two images is visible at a time --> <img src="/playground/resources/codicon/debug-pause.svg" class="button-img-pause"/> <img src="/playground/resources/codicon/play.svg" class="button-img-play"/> </button> </div> <svg class="schematic" tabindex="0"> <g class="schematic-wrapper" style="transform: translate(50%, 50%)"> <g class="schematic-parts"></g> <g class="schematic-wires"></g> </g> </svg> <div class="card-header"> <ul class="nav nav-tabs card-header-tabs" role="tablist"> <li class="nav-item" role="presentation"> <button class="nav-link active panel-tab-terminal" id="simulator-tab-terminal" data-bs-toggle="tab" data-bs-target="#simulator-panel-terminal" type="button" role="tab" aria-controls="simulator-panel-terminal" aria-selected="true">Terminal</button> </li> <li class="nav-item" role="presentation"> <button class="nav-link" id="simulator-properties-tab" data-bs-toggle="tab" data-bs-target="#simulator-panel-properties" type="button" role="tab" aria-controls="simulator-panel-properties" aria-selected="false">Properties</button> </li> <li class="nav-item" role="presentation"> <button class="nav-link" id="simulator-power-tab" data-bs-toggle="tab" data-bs-target="#simulator-panel-power" type="button" role="tab" aria-controls="simulator-panel-power" aria-selected="false">Power</button> </li> <li class="nav-item" role="presentation"> <button class="nav-link" id="simulator-add-tab" data-bs-toggle="tab" data-bs-target="#simulator-panel-add" type="button" role="tab" aria-controls="simulator-panel-add" aria-selected="false">Add</button> </li> </ul> </div> <div class="tab-content"> <div class="tab-pane active terminal-box" id="simulator-panel-terminal" role="tabpanel" aria-labelledby="simulator-tab-terminal"> <div class="terminal" tabindex="0"></div> </div> <div class="tab-pane panel-properties content" id="simulator-panel-properties" role="tabpanel" aria-labelledby="simulator-properties-tab"> <div class="content" tabindex="0"></div> </div> <div class="tab-pane panel-power content" id="simulator-panel-power" role="tabpanel" aria-labelledby="simulator-power-tab"> <div class="content" tabindex="0"> <div class="power-table">Loading...</div> <p class="mb-0 mt-3"><strong>Note:</strong> these numbers are estimates, based on datasheets and measurements. They don't include everything and may be wrong.</p> </div> </div> <div class="tab-pane panel-add" id="simulator-panel-add" role="tabpanel" aria-labelledby="simulator-add-tab"> <div class="content" tabindex="0">Loading...</div> </div> </div> <div class="schematic-tooltip"></div> <div class="templates d-none"> <button class="panel-add-button btn btn-primary btn-sm">Add</button> <select class="panel-add-select form-select form-select-sm"></select> </div> </div> </div> </div> </div> </div> </section> <div><a id="td-block-3" class="td-offset-anchor"></a></div> <section class="row td-box td-box--primary td-box--height-auto"> <div class="col"> <div class="row"> <div class="col-lg-4 mb-5 mb-lg-0 text-center"> <div class="mb-4 h1"> <i class="fas fa-lightbulb"></i> </div> <h4 class="h3">TinyGo Playground</h4> <div class="mb-0"> <p>Try TinyGo online</p> </div> <p><a href="/play/">Read more</a></p> </div> <div class="col-lg-4 mb-5 mb-lg-0 text-center"> <div class="mb-4 h1"> <i class="fab fa-github"></i> </div> <h4 class="h3">TinyGo on Github</h4> <div class="mb-0"> <p>See the code here</p> </div> <p><a href="https://github.com/tinygo-org/tinygo">Read more</a></p> </div> <div class="col-lg-4 mb-5 mb-lg-0 text-center"> <div class="mb-4 h1"> <i class="fab fa-mastodon"></i> </div> <h4 class="h3">TinyGo on Mastodon</h4> <div class="mb-0"> <p>Join us on Mastodon</p> </div> <p><a href="https://mastodon.social/@TinyGo">Read more</a></p> </div> </div> </div> </section> </main> <footer class="td-footer row d-print-none"> <div class="container-fluid"> <div class="row mx-md-2"> <div class="td-footer__left col-6 col-sm-4 order-sm-1"> <ul class="td-footer__links-list"> <li class="td-footer__links-item" data-bs-toggle="tooltip" title="Mastodon" aria-label="Mastodon"> <a target="_blank" rel="noopener" href="https://mastodon.social/@TinyGo" aria-label="Mastodon"> <i class="fab fa-mastodon"></i> </a> </li> <li class="td-footer__links-item" data-bs-toggle="tooltip" title="Bluesky" aria-label="Bluesky"> <a target="_blank" rel="noopener" href="https://bsky.app/profile/tinygo.org" aria-label="Bluesky"> <i class="fab fa-bluesky"></i> </a> </li> <li class="td-footer__links-item" data-bs-toggle="tooltip" title="Go Pkg Docs" aria-label="Go Pkg Docs"> <a target="_blank" rel="noopener" href="https://pkg.go.dev/github.com/tinygo-org/tinygo?tab=doc" aria-label="Go Pkg Docs"> <i class="fa fa-book"></i> </a> </li> </ul> </div><div class="td-footer__right col-6 col-sm-4 order-sm-3"> <ul class="td-footer__links-list"> <li class="td-footer__links-item" data-bs-toggle="tooltip" title="GitHub" aria-label="GitHub"> <a target="_blank" rel="noopener" href="https://github.com/tinygo-org/tinygo" aria-label="GitHub"> <i class="fab fa-github"></i> </a> </li> <li class="td-footer__links-item" data-bs-toggle="tooltip" title="Slack" aria-label="Slack"> <a target="_blank" rel="noopener" href="https://gophers.slack.com/messages/CDJD3SUP6/" aria-label="Slack"> <i class="fab fa-slack"></i> </a> </li> </ul> </div><div class="td-footer__center col-12 col-sm-4 py-2 order-sm-2"> <span class="td-footer__copyright">© 2025 <span class="td-footer__authors">The TinyGo Authors</span></span><span class="td-footer__all_rights_reserved">All Rights Reserved</span> </div> </div> </div> </footer> </div> <script src="/js/main.min.6569abdcd49916dfef13e72bd1c71c596634fadc296335e279a89f779772dcfd.js" integrity="sha256-ZWmr3NSZFt/vE+cr0cccWWY0+twpYzXieaifd5dy3P0=" crossorigin="anonymous"></script> <script defer src="/js/click-to-copy.min.73478a7d4807698aed7e355eb23f9890ca18fea3158604c8471746d046702bad.js" integrity="sha256-c0eKfUgHaYrtfjVesj+YkMoY/qMVhgTIRxdG0EZwK60=" crossorigin="anonymous"></script> <script src='/js/tabpane-persist.js'></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script> <script type="text/javascript"> docsearch({ apiKey: '42f398a5126d862b7112ee3ba7fddfb2', indexName: 'tinygo', inputSelector: '.td-search-input', debug: false }); </script> </body> </html>