grain
grain copied to clipboard
New `foreign` syntax
This work likely won't be done until our module system rewrite. This is what declaring foreign values would look like:
@externalName("wasi_unstable")
foreign module WasiUnstable {
@externalName("fd_write")
let fdWrite: annotation
...
}
In the future when toplevel wasm imports exist, they would use the toplevel foreign
keyword, similar to how it is done now.