Sam Clegg

Results 1453 comments of Sam Clegg

Yes, this issue has been much discussed. See https://github.com/WebAssembly/design/issues/1160 and https://github.com/WebAssembly/WASI/issues/487 https://github.com/WebAssembly/WASI/issues/19 I'm not sure if any of those discussions lets to documentation changes anywhere.

The status quo is that `_start` is reserved for use by the linker (at least with llvm/wasm-ld) and cannot run user code.

Yes, sorry I meant the wasm start function.

As you can see the terminology is confusing here :)

The memory for a given program must be defined in exactly one module, from which it is exported. All the other modules then import that memory. Currently the way this...

I suppose it could/should validate that there is exactly one export called `memory`. Two different modules in the same program both exporting the linear memory would be an error I...

https://github.com/WebAssembly/WASI/blob/main/legacy/application-abi.md was written before WASI had any concept of dynamic linking, so easy program is just one module. I will likely need to be updated if/when we want to support...

At yes, that does look odd. In emscripten for some reason we defined the table on the JS side and import it, but your are correct, the main module should...

I took another look at emscripten and even attempted to convert it to using main-module-exported memory: https://github.com/emscripten-core/emscripten/pull/22332. However, don't think this can work today, at least as long as the...

I do think we could remove the restriction in https://github.com/llvm/llvm-project/blob/04e7eaf91f3e9b6830feb2e08bb5b0ddb14c3174/lld/wasm/Driver.cpp#L632 but that still leaves the problem of what value to use for `--initial-table`. The current default of "use the size...