Skip to content

NightProg/cxx_linker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cxx_linker

A procedural macro for linking Rust functions with C++ using Itanium name mangling.

Example

use cxx_linker::cxx_link;

extern "C" {
    #[cxx_link("blobstore::foo<int>::bar(int, blobstore::SomeType&, bool)")]
    fn bar(a: i32, b: *mut (), c: bool);
}

will be expanded to

extern "C" {
    #[link_name = "_ZN9blobstore3fooIiE3barEiRNS_8SomeTypeEb"]
    fn bar(a: i32, b: *mut (), c: bool);
}

About

A procedural macro for linking Rust functions with C++ using Itanium name mangling.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages