Merge branch 'c-unwind' of https://github.com/BatmanAoD/nomicon into c-unwind

pull/365/head
Kyle Strand 3 years ago
commit e5a75d8b97

@ -721,12 +721,12 @@ No `transmute` required!
## FFI and unwinding
Its important to be mindful of unwinding when working with FFI. Each
non-`Rust` ABI comes in two variants, one with `-unwind` and one without. If
non-`Rust` ABI comes in two variants, one with `-unwind` suffix and one without. If
you expect Rust `panic`s or foreign (e.g. C++) exceptions to cross an FFI
boundary, that boundary must use the appropriate `-unwind` ABI string. (Note
boundary, that boundary must use the appropriate `-unwind` ABI string (note
that compiling with `panic=abort` will still cause `panic!` to immediately
abort the process, regardless of which ABI is specified by the function that
`panic`s.)
`panic`s).
Conversely, if you do not expect unwinding to cross an ABI boundary, use one of
the non-`unwind` ABI strings (other than `Rust`, which always permits

Loading…
Cancel
Save