-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Moving catch_unwind to libcore #2810
Copy link
Copy link
Open
Labels
A-ffiFFI related proposals.FFI related proposals.A-no_stdProposals relating to #[no_std].Proposals relating to #[no_std].A-panicPanics related proposals & ideasPanics related proposals & ideasT-libs-apiRelevant to the library API team, which will review and decide on the RFC.Relevant to the library API team, which will review and decide on the RFC.
Metadata
Metadata
Assignees
Labels
A-ffiFFI related proposals.FFI related proposals.A-no_stdProposals relating to #[no_std].Proposals relating to #[no_std].A-panicPanics related proposals & ideasPanics related proposals & ideasT-libs-apiRelevant to the library API team, which will review and decide on the RFC.Relevant to the library API team, which will review and decide on the RFC.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Hi,
I think FFI is a very common thing people do in
no-stdenvironments.a common thing in C/FFI is passing function pointers as callback, this currently cannot happen safely without a
catch_unwindwrapper, 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?