tinygo

command module
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2019 License: MIT Imports: 3 Imported by: 0

README

tinygo

Go Report Card

This project demonstrates how to shrink a WebAssembly App, with a total size of around 3 Megabyte, down to 50 Kilobyte by using tinygo.

Table of Contents

Goals

Installation

TinyGo via Docker

docker pull tinygo/tinygo:latest

From Source

go get -u github.com/andygeiss/tinygo

Build

Build the WebAssembly file

sudo docker run \
    -v $PWD:/src \
    -v $GOPATH:/gohost \
    -e "GOPATH=$GOPATH:/gohost" \
    tinygo/tinygo \
    tinygo build -o /src/web/app/app.wasm -target wasm /src/main_wasm.go

Compress the file

gzip -9 web/app/app.wasm \
    && mv web/app/app.wasm.gz web/app/app.wasm

Usage

sudo go run main.go

http://127.0.0.1

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
app

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL