Skip to content

justinclift/tinygo-wasm-basic-triangle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is just simple research code, directly copied from bobcob7, to see if TinyGo wasm can be used for WebGL.

Running demo:

    https://justinclift.github.io/tinygo-wasm-basic-triangle/

Original source:

    https://github.com/bobcob7/wasm-basic-triangle

To compile the WebAssembly file:

$ tinygo build -target wasm -no-debug -o docs/wasm.wasm main.go

To strip the custom name section from the end (reducing file size further):

$ wasm2wat docs/wasm.wasm -o docs/wasm.wat
$ wat2wasm docs/wasm.wat -o docs/wasm.wasm
$ rm -f docs/wasm.wat

About

Use TinyGo to create the basic WebGL triangle in Wasm. About 9.5kB compressed.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages