-
Notifications
You must be signed in to change notification settings - Fork 98
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
Add C interface #211
Comments
I've dug into that thread a bit, and can't say that I'm fully understanding all the context yet. To the question, I think this is an ask for localization-level API, and I guess Zibi's still finding out more stuff about that as he's working on converting the full Fluent stack in Firefox to Rust. We should probably wait for that to succeed before thinking about C APIs. Firefox talks to Fluent through FFI, and the code we currently ship has parts in JavaScript still. Whether that implementation would be good for the FSF is also a question about licensing. Fluent-rs is APL/MIT, and while APL is usable from GPLv3 code. I haven't found indications on whether that's a problem for adoption or not. I'd also add that the folks that are or used to be involved in Fluent are no C folks, and couldn't advice on how to map concepts to C (and in particular GNU) best practices. This would likely require a collaborative effort between folks knowing fluent-rs and potential consumers of the API on the C level. |
Hi! Thanks for reaching out! We do use It's not yet super trivial to package it and, as Axel said, I'm currently working on a "higher level" API for Fluent that wraps around Since e use Fluent via C FFI in Gecko, I believe our experience may be of help here, and I'd be happy to work with you on extracting the bits of Would that help? |
Thanks! I think I can model an POC demo after Zibi's code to help people in emacs-devel see the power of Fluent. I'm also waiting for your good news about fluent-bundle ;) |
The higher level ( |
I'd like to file an issue for hooking into ICU4X for the examples here, and then from there it would be possible to put together a C API I think. ICU4X is using Diplomat for its FFI, but there is also uniffi which seems to have some nice ergonomics. It could be possible to put together the C APIs this way. |
This does seem in scope, but is probably a large undertaking for a contributor to take on. Mozilla doesn't have a specific need for this feature at this time. |
Fluent is a wonderful project for localization.
Somebody is talking about use fluent to power the localization of Emacs. Emacs is written in C and Elisp, a C interface of Fluent can help us to reuse fluent-rs and we don't need to reinvent wheels like fluent-c.
As Stallman says(https://lists.gnu.org/archive/html/emacs-devel/2020-12/msg01875.html), a C interface can also help a lot of GNU project to use fluent(instead of gettext) to power their localization. Would you like to provide a set of C interfaces?
The text was updated successfully, but these errors were encountered: