Skip to content

a way of exposing unmangled symbols directly from my shared library without requiring linking to any glue code #1677

@strike-ntzachar

Description

@strike-ntzachar

a way of exposing unmangled symbols directly from my shared library without requiring linking to any glue code

Would the cxx_gen::Opt::cxx_impl_annotations option help in your scenario without requiring manually-authored glue code with hardcoded mangled names?

As far as I understand this option, no.
I'll try to explain further. Say I have the following:

#[cxx::bridge(namespace = "alpine")]
pub mod ffi {
   extern "Rust" {
      fn init() -> i32;
   }
}

I then compile my crate as cdynlib. This results in a shared library, with the following symbol exported: alpine$cxxbridge1$190$init
As far as I understand, this option will not help (not to mention that I have no idea how to use it...)

Originally posted by @strike-ntzachar in #1665 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions