How to export a function named "main" accepting no arguments?

If you’re targeting wasm32-wasi, you can set lib.wasi_exec_model = .reactor. This will export a small _initialize function which must be called before any other exported symbols are accessed, but not require your artifact to export any main symbol.

3 Likes