Skip to content

Add extern "abi" fn type to represent C pointers #3321

Closed
@nikomatsakis

Description

@nikomatsakis

Per the recent weekly meeting, we should add a type to represent C style function pointers. This type should carry an ABI. This will be the type of extern functions from C code and we will no longer generate wrappers. We will allow this type to be coerced into a Rust closure, generating the stack-switching code. Finally, top-level Rust fn items will be usable as this type, in which case we will generate the thunk to do the stack-switch in the reverse direction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions