emscripten-core / emscripten-core/emscripten

Use `_start` rather than `main` for the default entry point

Open
#15,733 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

We already do this in `STANDALONE_WASM` mode. In this most we have crt1.o which defines start which calls `__wasm_eval_ctors` then `main` then `exit`.

Doing the same thing for the normal code path should simplify the codebase and could be a codesize win (since we would no longer need to export `__wasm_eval_ctors` to JS).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.