rust-diplomat / diplomat

Experimental Rust tool for generating FFI definitions allowing many other languages to call Rust code
https://rust-diplomat.github.io/book/
Other
480 stars 45 forks source link

Namespace c-in-c++ #512

Closed Manishearth closed 1 week ago

Manishearth commented 3 weeks ago

Fixes https://github.com/rust-diplomat/diplomat/issues/427, fixes #432

Now all C code is hidden behind the relevant C++ namespaces. Diplomat-generated C++ code no longer pollutes the global namespace if configured not to.

Manishearth commented 1 week ago

The only new commits are "rm dead code" and "js2 fix"

Manishearth commented 1 week ago

yep. The top level capi namespace will absolutely be renamed, it's a placeholder. Also I want to rename diplomat_runtime.hpp's namespaces to something more specific. (For ICU4X release the top level capi namespace doesn't matter too much though, it should be empty)