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

Consider adding const fn support #192

Open
mainrs opened this issue Sep 3, 2020 · 2 comments
Open

Consider adding const fn support #192

mainrs opened this issue Sep 3, 2020 · 2 comments
Labels
crate:fluent-bundle Issues related to fluent-bundle crate enhancement help wanted We need help making decisions or writing PRs for this.

Comments

@mainrs
Copy link

mainrs commented Sep 3, 2020

This would be useful in cases where an explicit language should be chosen during compilation. That way, static values that do not take arguments or depend on pluralization could be directly embedded into the application and improving performance.

With the landing of Rust 1.46 and their const-fn improvements, it would be possible to declare a lot of function as const.

I know that this is a pretty niche use-case but there are scenarios where this might be useful (mostly on size-restrained devices like embedded systems). The Linux world would probably like this too, as they often enough want to optimize for file size (and not want to include all languages by default for example).

Off-topic
P.S.: The project looks very promising and I'd like to contribute. Although some issues are marked as `help-wanted`, none are marked as `good-first-issue`. And it's hard to judge what issues might be easy to implement for a new contributor! So if you have suggestions, let me know!
@zbraniecki
Copy link
Collaborator

I'm happy to explore that! Feel free to look at the current code and suggest how to approach it :)

@zbraniecki zbraniecki added enhancement crate:fluent-bundle Issues related to fluent-bundle crate help wanted We need help making decisions or writing PRs for this. labels Sep 18, 2020
@alerque
Copy link
Collaborator

alerque commented May 7, 2024

There seems to be a little bit of overlap in needs between this and other use cases for pre-compiled (e.g. #253) or infallible messages (#107); c.f. #36.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate:fluent-bundle Issues related to fluent-bundle crate enhancement help wanted We need help making decisions or writing PRs for this.
Projects
None yet
Development

No branches or pull requests

3 participants