Skip to content

[wasm][wasi] No main function should be required when building a library #96869

@silesmo

Description

@silesmo

Description

Currently mono requires a main function when building for wasi. This shouldn't be required.

Related: #96419

@AaronRobinsonMSFT @lewing @yowl @jsturtevant

Reproduction Steps

Try to build example with main removed.
Example: https://github.com/silesmo/wasm-unmanaged-callers-bug/blob/main/mono-example/MonoEntrypoint.cs

Expected behavior

No main function should be required for a library.

Actual behavior

Main function is required.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Labels

arch-wasmWebAssembly architecturearea-Build-monoin-prThere is an active PR which will close this issue when it is mergedos-wasiRelated to WASI variant of arch-wasm

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions