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

Using without String/alloc #427

Open
transbitch opened this issue Mar 19, 2024 · 2 comments
Open

Using without String/alloc #427

transbitch opened this issue Mar 19, 2024 · 2 comments

Comments

@transbitch
Copy link

transbitch commented Mar 19, 2024

Is there any support without using String? As I see it you don't need String for anything, you can just use core::fmt::Write. Would eliminate the need for an allocator

@lambda-fairy
Copy link
Owner

I remember experimenting with this in the past, but the extra Result param made codegen slightly worse. Might be worth checking if that factor still applies now.

@lambda-fairy
Copy link
Owner

Another consideration. With context-aware escaping, we might want to censor values after they're built – see the #ZgotmplZ example in html/template. It would be difficult to implement this without an intermediate buffer.

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

No branches or pull requests

2 participants