Skip to content

Commit

Permalink
linking in general has more pitfalls than just call ABI
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Nov 17, 2023
1 parent 52d22ea commit 8f03a55
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions library/core/src/primitive_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1521,8 +1521,9 @@ mod prim_ref {}
/// exceptional circumstances. Most Rust code just imports functions via `use`. `#[target_feature]`
/// is also used rarely. So, most likely you do not have to worry about ABI compatibility.
///
/// But assuming such circumstances, what are the rules? For this section, we are specifically
/// concerned with the case where both the caller and the callee are defined in Rust.
/// But assuming such circumstances, what are the rules? For this section, we are only considering
/// the ABI of direct Rust-to-Rust calls, not linking in general -- once functions are imported via
/// `extern` blocks, there are more things to consider that we do not go into here.
///
/// For two signatures to be considered *ABI-compatible*, they must use a compatible ABI string,
/// must take the same number of arguments, the individual argument types and the return types must
Expand Down

0 comments on commit 8f03a55

Please sign in to comment.