Crate extern_attrib [] [src]


Rust automatic ABI attribute macro: #[extern_auto]

The purpose of this library is to replace or insert the ABI name at compile time for functions. This is useful for hiding the calling convention for FFI callbacks while avoiding code duplication.

  • Requires nightly rust, depends on #[proc_macro_attribute].
  • Currenly only handles target_os = "windows" / "macos" / "linux".
  • See the tests/ for a usage example.
  • Pull Requests Welcome!

TODO: Investigate how error handling should best be done in procedural macros.