site: Adds languages page, starting with TinyGo (#759)

This consolidates common notes we've had into a landing page.
This is intentionally only simplified content for TinyGo to make the
first review easier (as well the writing easier). After this, PRs will
happen to consolidate the other notes we have sporadically in the
examples directory.

Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
Crypt Keeper
2022-08-23 15:40:29 +08:00
committed by GitHub
parent 1a46d471f8
commit 6d1d7d33aa
4 changed files with 141 additions and 11 deletions

View File

@@ -15,14 +15,4 @@ Under the covers, [greet.go](testdata/greet.go) does a few things of interest:
* Uses `reflect.StringHeader` to build back a string from a pointer, len pair.
* Relies on TinyGo not eagerly freeing pointers returned.
Go does not export allocation functions, but when TinyGo generates WebAssembly,
it exports "malloc" and "free", which we use for that purpose. These are not
documented, so not necessarily a best practice. See the following issues for
updates:
* WebAssembly exports for allocation: https://github.com/tinygo-org/tinygo/issues/2788
* Memory ownership of TinyGo allocated pointers: https://github.com/tinygo-org/tinygo/issues/2787
Note: While folks here are familiar with TinyGo, wazero isn't a TinyGo project.
We hope this gets you started. For next steps, consider reading the
[TinyGo Using WebAssembly Guide](https://tinygo.org/docs/guides/webassembly/)
or joining the [#TinyGo channel on the Gophers Slack](https://github.com/tinygo-org/tinygo#getting-help).
See https://wazero.io/languages/tinygo/ for more tips.