Skip to content

Minimal build doesn't include GC (good) but C API doesn't allow creating engine without GC (bad) #12628

@effulgentsia

Description

@effulgentsia

Feature

Either enable the equivalent of config.gc_support(false) to be called from the C API, or make the default be false when using the minimal (without GC) wasmtime build. Currently, the combination of the minimal build not having GC, but the default assumption of GC support being true and no C API to set it to false results in a panic when creating the engine.

Benefit

To be able to use wasmtime-go (or any other SDK that uses the C API) to embed the minimal wasmtime build into an application when Cranelift, GC, etc. aren't needed and wanting to minimize the size of the compiled application.

Implementation

I think exposing config.gc_support(false) to the C API would be the most straightforward and useful beyond the minimal build use case.

Alternatives

Packaging the minimal build in such a way that it defaults to returning false for GC support since it lacks GC.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wasmtime:c-apiIssues pertaining to the C API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions