icu4x icon indicating copy to clipboard operation
icu4x copied to clipboard

FFI `ICU4X` prefix

Open robertbastian opened this issue 1 year ago • 7 comments

All our diplomat types are prefixed with ICU4X. This is probably due to C not having namespacing. However, in other languages, this is not idiomatic. Could a prefix be added as part of Diplomat's C generation instead?

robertbastian avatar Aug 25 '22 08:08 robertbastian

Duplicate of https://github.com/unicode-org/icu4x/issues/2182

sffc avatar Aug 25 '22 15:08 sffc

Isn't https://github.com/unicode-org/icu4x/issues/2182 much wider in scope, i.e. proper C++ namespacing? I'm thinking of removing the prefix from all names, and just slapping it on every name that is generated for C and C++ (but not for say Dart).

robertbastian avatar Aug 25 '22 15:08 robertbastian

I think we had discussed that in the context of #2182 but there was some reason it was hard to do. @Manishearth ?

sffc avatar Aug 25 '22 15:08 sffc

Action: @Manishearth to open or track a Diplomat issue.

sffc avatar Aug 25 '22 18:08 sffc

https://github.com/rust-diplomat/diplomat/issues/103

Manishearth avatar Aug 25 '22 18:08 Manishearth

https://github.com/rust-diplomat/diplomat/pull/416 adds HIR support for custom ABI renames.

robertbastian avatar Feb 05 '24 16:02 robertbastian

https://github.com/rust-diplomat/diplomat/issues/422 is the issue that would let us make this change today . It is a bit more annoying to implement.

Manishearth avatar Feb 05 '24 18:02 Manishearth

Fixed by #5228

robertbastian avatar Jul 11 '24 17:07 robertbastian