https://github.com/williamvenner/fn_abi
✨ A proc attribute macro that sets the ABI/calling convention for the attributed function
https://github.com/williamvenner/fn_abi
abi calling convention ffi macro proc-macro proc-macro-attributes rust unsafe
Last synced: 3 days ago
JSON representation
✨ A proc attribute macro that sets the ABI/calling convention for the attributed function
- Host: GitHub
- URL: https://github.com/williamvenner/fn_abi
- Owner: WilliamVenner
- License: mit
- Created: 2021-09-23T23:06:42.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-07T11:44:02.000Z (about 3 years ago)
- Last Synced: 2025-04-19T12:45:46.917Z (4 days ago)
- Topics: abi, calling, convention, ffi, macro, proc-macro, proc-macro-attributes, rust, unsafe
- Language: Rust
- Homepage: https://crates.io/crates/fn_abi
- Size: 11.7 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://crates.io/crates/fn_abi)
# ✨ `fn_abi`
A proc attribute macro that sets the ABI/calling convention for the attributed function.
## Example
```rust
#[macro_use] extern crate fn_abi;#[abi("fastcall")]
extern fn hello_world_fastcall() {
println!("hello world!");
}#[cfg_attr(all(target_os = "windows", target_pointer_width = "32"), abi("thiscall"))]
#[cfg_attr(all(target_os = "windows", target_pointer_width = "64"), abi("fastcall"))]
extern fn hello_world_windows() {
println!("hello world!");
}
```