Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of high-level FFI suffixed options structs in 2.0 #3791

Open
Tracked by #2856
Manishearth opened this issue Aug 4, 2023 · 0 comments
Open
Tracked by #2856

Get rid of high-level FFI suffixed options structs in 2.0 #3791

Manishearth opened this issue Aug 4, 2023 · 0 comments
Labels
2.0-breaking Changes that are breaking API changes C-ffi-infra Component: Diplomat, horizontal FFI

Comments

@Manishearth
Copy link
Member

Related: #3790

Part of #2856

Currently over FFI we do things like ICU4XCollatorOptionsV1 (and functions accepting it are named like create_v1() so that the options structs can be evolved in the future.

At a high level, once rust-diplomat/diplomat#247 and rust-diplomat/diplomat#271 are fixed, we should keep the Rust struct names (as they map to C struct/function names), but we can diplomat-rename ICU4XCollatorOptionsV1 to icu4x::CollatorOptions, and create_v1() to create().

When in the future we add more fields, we create a ICU4XCollatorOptionsV2 and create_v2, hook it up with defaults infrastructure so that old code constructing the old options bags will seamlessly work, and then move the diplomat-renames over to these new APIs whilst diplomat-disabling the old ones.

This maintains ABI stability (the old methods are available and unchanged), and is seamless from the perspective of higher-level API users.

I would like this to be solved for 2.0.

This was referenced Aug 4, 2023
@sffc sffc added the 2.0-breaking Changes that are breaking API changes label Oct 5, 2023
@sffc sffc added this to the ICU4X 2.0 milestone Oct 5, 2023
@sffc sffc added the C-ffi-infra Component: Diplomat, horizontal FFI label Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0-breaking Changes that are breaking API changes C-ffi-infra Component: Diplomat, horizontal FFI
Projects
Status: Small breakage (defer to end)
Development

No branches or pull requests

3 participants