-
-
Notifications
You must be signed in to change notification settings - Fork 15k
remove the need for foreign ABI wrappers #10116
Copy link
Copy link
Closed
Labels
I-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.
Description
Metadata
Metadata
Assignees
Labels
I-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.
Type
Fields
Give feedbackNo fields configured for issues without a type.
To generate code for
extern "C" fn foo(),rustcwill create a Rust function and wrap it inside a function exposing the C ABI. This is bad for compile-time, but more importantly it makes it very hard to write functions likememset,memcpyandmemmovefor freestanding Rust because LLVM will kindly replace their body with a call to the intrinsic, and then lower that to an infinitely recursive function.https://github.com/thestinger/rust-core#freestanding