Closed lyndalopez544 closed 4 years ago
I think we can close this. fluent-rs
is available and can be used from C/C++ via bindgen
.
I think we can close this.
fluent-rs
is available and can be used from C/C++ viabindgen
.
First off, bindgen
doesn't make C++ headers from Rust, it makes Rust headers from C++. It looks like there's another project cbindgen
that does the latter.
Secondly, this is not a solution. C++ developers do not want to have to deal with another language if they want to use Fluent. I really want to use Fluent as my i18n solution. I wanted to use it three years ago when I first found this issue at the top of the google search results, and I want to use it now as I'm starting a new project. And it's baffling to me that this remains the top result for "Project Fluent C++": basically an admission that you're not gonna support C++.
If you guys want Fluent to take off, as I do because it looks really cool, you need to at least provide a tutorial on how to use it in C/C++. C/C++ combined are still 4 times as popular as Rust.
For incoming Googlers, I found this abandoned project on GitLab which the maintainer said in a pull request isn't fully implemented. That seems to be all we have in terms of third-party implementations.
The way to do this will be by exposing https://github.com/projectfluent/fluent-rs. I read last night on irc that @zbraniecki might need to dig into that.
To be convenient to use from C++, it should probably get a healthy dose of template magic for things like variable references.