Skip to content

Moving catch_unwind to libcore #2810

@elichai

Description

@elichai

Hi,
I think FFI is a very common thing people do in no-std environments.
a common thing in C/FFI is passing function pointers as callback, this currently cannot happen safely without a catch_unwind wrapper, otherwise it will panic through FFI boundaries.

It looks like the only reason this can't happen is because of the Box in the result Result<R, Box<dyn Any + Send>>. am I right? is there some inherent reason why it can't happen?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ffiFFI related proposals.A-no_stdProposals relating to #[no_std].A-panicPanics related proposals & ideasT-libs-apiRelevant to the library API team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions