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

Add no_std feature? #15

Closed
Kijewski opened this issue Jun 18, 2024 · 5 comments · Fixed by #286
Closed

Add no_std feature? #15

Kijewski opened this issue Jun 18, 2024 · 5 comments · Fixed by #286

Comments

@Kijewski
Copy link
Collaborator

Kijewski commented Jun 18, 2024

I think the generated code can easily be #![no_std]. We only need std to impl std::error::Error for rinja::Error. We need alloc for a few filters. Both use cases can be feature-gated. Then I think, we can add the features ↓ and be useful to a marginally wider audience.

default = […, "std"]
std = ["alloc"]
alloc = []

What do you think?

@GuillaumeGomez
Copy link
Contributor

Hum... Do you know any project where it could be useful? Because unless there is one, I'm not sure if it's worth it (even though it'd likely be a very small amount of code). I'm not against it, just not convinced.

@Kijewski
Copy link
Collaborator Author

No, spontaneously I cannot come up with a use cases. Probably there isn't one. I guess there won't be many IoT device developers who need a template engine. :)

@GuillaumeGomez
Copy link
Contributor

Who knows? World is a surprising place.

@dodomorandi
Copy link

We only need std to impl std::error::Error for rinja::Error.

Just in case you decide to have a MSRV 1.81: rust-lang/rust#103765

@GuillaumeGomez
Copy link
Contributor

Oh nice, thanks for the information!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants