bytecodealliance / bytecodealliance/go-modules

Discussion: Strategy to remove shell-exec from compilation path

Aperta
#202 5 commenti 0 reazioni 1 assegnatario Rivendicata da @ydnar Vedi su GitHub
Lingua principale
Go
Stelle
148
Fork
20
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

TinyGo's current behavior is to handle module -> component conversion for `-target wasip2`.

## Where is shell exec today?

### wit-bindgen-go
https://github.com/bytecodealliance/wasm-tools-go/blob/main/wit/load.go#L54

wit: parsing / world resolver

Uses wasm-tools to convert wit -> resolved world json.
The resulting json is converted into structs for codegen.

### TinyGo
https://github.com/tinygo-org/tinygo/blob/release/builder/build.go#L864

wit: parsing / world resolver
wasm metadata: attach wit to wasm (`wasm-tools component embed`)
wasm component encoder: convert wasm module to component ( `wasm-tools component new` )

Uses `wasm-tools` to [adapt a wasm module to component](https://component-model.bytecodealliance.org/language-support/go.html).

# Discussion

Should TinyGo / Go generate core wasm modules and leave metadata/component encoding to 3rd party tools; or should they be part of a wasi target ( or goos/goarch combination )?

Assuming we implement wit parsing / wasm patching in Go:
- How do we keep up with wit spec?
- In what sequence we'd create these packages?

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.