8 Commits

Author SHA1 Message Date
Guillaume Gomez
79d8f8886b Update to rust edition 2024 and to MSRV 1.88 2025-07-07 22:23:29 +02:00
René Kijewski
6ce85f318c Make code generator re-usable for other projects
This PR
* removes the crate `askama_derive_standalone`,
* makes `askama_derive` a normal library, and
* adds the proc-macro crate `askama_macros`,

Before, it was not possible for another crate to re-export
`askama::Template` in a useful way, because the generated code assumes
that it has access to an `extern crate askama`.

`askama_derive` will export the function `derive_template()` like
`askama_derive_standalone` did, but it has an additional argument to
accept a `TokenStream` that should contain (an) statement(s) to define
the identifier `askama`, e.g. `quote! { extern crate askama; }`.

The new proc-macro crate `askama_macros` now defines the derive-macro
`Template` by calling `askama_derive::derive_template()`.

Prior art: [`encase`] → [`encase_derive`] → [`encase_derive_impl`];
[2298a3e].

[`encase`]: <https://crates.io/crates/encase/0.11.0>
[`encase_derive`]: <https://crates.io/crates/encase_derive/0.11.0>
[`encase_derive_impl`]: <https://crates.io/crates/encase_derive_impl/0.11.0>
[2298a3e]: <2298a3efd5>
2025-05-17 13:20:21 +02:00
René Kijewski
72bbe3ede1 Bump version number to v0.14.0 2025-04-22 23:37:23 +02:00
Guillaume Gomez
04a4d5b020 Update MSRV to 1.83 2025-04-22 11:34:55 +02:00
René Kijewski
697862a76c Bump version number to 0.13.0 2025-03-27 17:22:37 +01:00
René Kijewski
19f6582308 Bump version number to v0.13.0-pre.0 2025-03-17 21:32:27 +01:00
Guillaume Gomez
3b52c907c3 Rename rinja into askama 2025-03-11 19:31:06 +01:00
René Kijewski
98cb4233e2 Make derive optional
This is the same as in e.g. `serde` with the feature of the same name.
If you manually depend on `rinja_derive`, then you can make better use
of your multi-core setup.
2025-02-09 17:47:17 +01:00