# Make extern ABI explicit

**URL:** <https://internals.rust-lang.org/t/make-extern-abi-explicit/1300>\
**Category:** Uncategorized\
**Created:** [January 12, 2015, 10:35pm UTC](https://internals.rust-lang.org/t/make-extern-abi-explicit/1300 "2015-01-12T22:35:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ranma42](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@ranma42](https://internals.rust-lang.org/u/ranma42)\
**Post date:** [January 12, 2015, 10:35pm UTC](https://internals.rust-lang.org/t/make-extern-abi-explicit/1300/1 "2015-01-12T22:35:50Z")

</div>

I think that although the “C” ABI is certainly the most widely used for FFI, forcing it to be explicit would be better than having an implicit default. I can see that the current policy allows 4 keystrokes (counting the space) to be saved, but to me that looks pretty minor, especially given that an `extern` block can contain multiple function declarations.

The advantages I see in always keeping it explicit are:

- it would ensure a more uniform coding style (even in the main rust repo you can find both `extern fn` and `extern "C" fn`)
- it would make it easier to search for what ABIs are used in a codebase
- it would be more familiar to C++ programmers

I found no previous thread about this, but pointers to dicussions/RFCs/… are welcome.

---

<div class="post-metadata">

**Author:** ![ranma42](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@ranma42](https://internals.rust-lang.org/u/ranma42)\
**Post date:** [January 21, 2015, 9:40pm UTC](https://internals.rust-lang.org/t/make-extern-abi-explicit/1300/2 "2015-01-21T21:40:16Z")

</div>

I wrote the RFC: [https://github.com/rust-lang/rfcs/pull/697](https://github.com/rust-lang/rfcs/pull/697)

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [March 25, 2019, 8:23am UTC](https://internals.rust-lang.org/t/make-extern-abi-explicit/1300/3 "2019-03-25T08:23:37Z")

</div>

Closed on March 25, 2019, 8:23am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
