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

**URL:** <https://ziggit.dev/t/how-to-export-a-function-named-main-accepting-no-arguments/3750>\
**Category:** Help\
**Tags:** language\
**Created:** [March 29, 2024, 2:20pm UTC](https://ziggit.dev/t/how-to-export-a-function-named-main-accepting-no-arguments/3750 "2024-03-29T14:20:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![castholm](https://ziggit.dev/user_avatar/ziggit.dev/castholm/32/1330_2.png) [@castholm](https://ziggit.dev/u/castholm)\
**Post date:** [March 29, 2024, 4:33pm UTC](https://ziggit.dev/t/how-to-export-a-function-named-main-accepting-no-arguments/3750/4 "2024-03-29T16:33:33Z")

</div>

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.

---

_[View the full topic](https://ziggit.dev/t/how-to-export-a-function-named-main-accepting-no-arguments/3750)._
