Skip to content

Add cfg Support for Distinguishing WASI Targets #125803

Closed
@namse

Description

@namse

WASI supports different features depending on whether it is p1 or p2. Additionally, p1-threads support threads. The problem is that we cannot determine these distinctions using cfg or similar mechanisms. In crates like tokio, it's impossible to create conditional compilation branches with cfg, such as 'this feature is not available in p1 but is supported in p2, so let's create a conditional branch.'

Therefore, I would like to request support for a method to distinguish WASI targets more precisely using cfg or a similar mechanism.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-target-specsArea: Compile-target specificationsA-targetsArea: Concerning the implications of different compiler targetsO-wasiOperating system: Wasi, Webassembly System InterfaceT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions