entry_wasm.odin 479 B

1234567891011121314151617181920
  1. //+private
  2. //+build wasm32, wasm64p32
  3. //+no-instrumentation
  4. package runtime
  5. import "base:intrinsics"
  6. when !ODIN_TEST && !ODIN_NO_ENTRY_POINT {
  7. @(link_name="_start", linkage="strong", require, export)
  8. _start :: proc "c" () {
  9. context = default_context()
  10. #force_no_inline _startup_runtime()
  11. intrinsics.__entry_point()
  12. }
  13. @(link_name="_end", linkage="strong", require, export)
  14. _end :: proc "c" () {
  15. context = default_context()
  16. #force_no_inline _cleanup_runtime()
  17. }
  18. }