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

IDL approach #2

Closed
filmil opened this issue Feb 27, 2020 · 6 comments · Fixed by #28
Closed

IDL approach #2

filmil opened this issue Feb 27, 2020 · 6 comments · Fixed by #28
Assignees
Labels
A-design Area: Architecture or design A-ffi Area: FFI, WebAssembly, Transpilation C-meta Component: Relating to ICU4X as a whole T-docs-tests Type: Code change outside core library
Milestone

Comments

@filmil
Copy link
Contributor

filmil commented Feb 27, 2020

Complementary to #1.

In case it is useful, we could consider using an IDL to auto-generate libraries from a common core implementation.

Pros:

  • No need to transpile.

Cons:

  • Won't work for languages that don't use FFI.
@sffc
Copy link
Member

sffc commented Feb 27, 2020

Related: http://bit.ly/omnicu-cross-lang-design

My experience is that IDL-like abstractions create more confusion than they're worth. The API surface in each of our target languages is going to look a little bit different. Trying to make an IDL do what we want is likely to be more engineering effort than just writing the API surface directly.

That being said, the advantage of an automated way of generating the "glue code" between clients and the FFI is that we can add new APIs in one place and automatically generate bindings in our target languages.

@sffc
Copy link
Member

sffc commented Apr 16, 2020

@filmil, can you submit some documentation about this to the repo for longevity, such that we can close this issue? Thanks.

@sffc sffc added the T-docs-tests Type: Code change outside core library label Apr 16, 2020
@filmil
Copy link
Contributor Author

filmil commented Apr 16, 2020

The goal here was to explore if indeed the glue code could be autogenerated, in a similar way how language-specific code is generated from protobufs for example. FFI bindings are tedious to maintain manually, so a way to get most of that tedium autogenerated looked like it could be a good thing.

@filmil filmil closed this as completed Apr 16, 2020
@sffc
Copy link
Member

sffc commented Apr 17, 2020

Can you add an FAQ to charter.md, or a section to wrapper-layer.md, describing this approach?

@sffc sffc reopened this Apr 17, 2020
@sffc
Copy link
Member

sffc commented Apr 18, 2020

I added a mention of this to wrapper-layer.md in #28.

@filmil
Copy link
Contributor Author

filmil commented Apr 22, 2020

Unassigned myself since you already have #28

@sffc sffc self-assigned this Apr 22, 2020
@sffc sffc closed this as completed in #28 Apr 30, 2020
@sffc sffc added A-ffi Area: FFI, WebAssembly, Transpilation C-meta Component: Relating to ICU4X as a whole A-design Area: Architecture or design labels May 7, 2020
@sffc sffc added this to the 2020 Q2 milestone Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-design Area: Architecture or design A-ffi Area: FFI, WebAssembly, Transpilation C-meta Component: Relating to ICU4X as a whole T-docs-tests Type: Code change outside core library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants