pre-RFC: a new symbol mangling scheme

I think the main problem here is the two namespaces Rust has but C++ doesn't (or at least not in this form). For manglings that only describe things in the type namespace (which won't occur in practice), c++filt should work. E.g. _RN12std_a1b2c3d43foo3FooIN12std_a1b2c3d43bar3BarIiEEEE should demangle to std_a1b2c3d4::foo::Foo<std_a1b2c3d4::bar::Bar<int>> (modulo the _R).

Other problems would be the different set of basic types and things like the instantiating-crate suffix. The scheme described above could probably be brought closer to pure Itanium mangling in some places but actual compatibility is not a goal, I'd say.

1 Like