Guillaume Gomez
b72622120d
Add support for "runtime" values
2025-01-23 23:43:43 +01:00
René Kijewski
8253624ad2
Merge pull request #317 from GuillaumeGomez/generics
...
Add support for generics syntax in parser
2025-01-22 22:59:36 +01:00
Guillaume Gomez
1cf81ba269
Simplify filters handling
2025-01-22 22:03:05 +01:00
Guillaume Gomez
0536b0c7c3
Merge pull request #319 from Kijewski/pr-fmt-alloc
...
Make filters `|fmt` and `|format` available with feature `"alloc"`, but without `"std"`
2025-01-21 15:43:02 +01:00
René Kijewski
6bbf0a3b01
Make filters |fmt
and |format
avail w/ "alloc"
w/o "std"
2025-01-21 03:06:50 +01:00
René Kijewski
880be8226d
parser: parse paths in generic arguments
2025-01-20 22:14:28 +01:00
René Kijewski
4b15a6e201
parser: TyGenerics
is recursive, keep track of nesting level
2025-01-20 21:43:56 +01:00
René Kijewski
89ecbb6058
derive: let filters handle generics
2025-01-20 21:17:28 +01:00
René Kijewski
16ce176d1e
parser: count number of &
in type
...
Instead of making it part of the identifier. Otherwise
`normalize_identifier` won't work.
2025-01-20 21:13:08 +01:00
Guillaume Gomez
2969a91123
Add more generics tests
2025-01-18 00:58:12 +01:00
Guillaume Gomez
73bb670df5
Allow to have generics on function calls
2025-01-18 00:55:27 +01:00
Guillaume Gomez
f2e701ee46
Allow generics on filters
2025-01-18 00:48:45 +01:00
Guillaume Gomez
960d039bbf
Support recursive generics
2025-01-18 00:48:45 +01:00
Guillaume Gomez
0bfeb018a7
Add support for ::<>
syntax
2025-01-18 00:48:45 +01:00
Guillaume Gomez
d5c65ab85a
Merge pull request #199 from Kijewski/pr-dyn-compat
...
"object safe" is now "dyn-compatible"
2025-01-16 14:53:45 +01:00
René Kijewski
206231b710
Merge pull request #316 from Kijewski/pr-features
...
book: a features section
2025-01-14 23:53:51 +01:00
René Kijewski
e3f92230cf
Update book/src/introduction.md
...
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2025-01-14 23:34:28 +01:00
René Kijewski
05f483f11f
book: a features section
2025-01-14 20:10:44 +01:00
René Kijewski
651224dc38
book: update a bit
...
* include "Getting stated" in the introduction
* disable run example button because it does not work anyway
* update debug output
* add missing `#[handler]` to actix-web example
* replace `::rinja` with `rinja`
2025-01-14 20:10:27 +01:00
René Kijewski
5c6f61eaf0
Merge pull request #315 from m4tx/patch-1
...
docs: fix recursive example in template_syntax.md
2025-01-14 15:52:28 +01:00
Mateusz Maćkowski
a6548e1186
docs: fix recursive example in template_syntax.md
...
The original description mentions askama issues which is confusing, since they don't exist in rinja repo and, most importantly, the example doesn't compile at all. This fixes both issues.
2025-01-14 15:31:26 +01:00
René Kijewski
32b976216c
Merge pull request #313 from Kijewski/pr-salvo
...
Add salvo example by translating the axum example
2025-01-13 20:35:46 +01:00
René Kijewski
a4527b8424
Make simple forwarding methods #[inline]
2025-01-13 20:30:54 +01:00
René Kijewski
64ad2424ce
"object safe" is now "dyn-compatible"
...
The phrase was changed in
<https://github.com/rust-lang/rust/issues/130852 >.
2025-01-13 20:30:53 +01:00
René Kijewski
78734c1e4d
Add salvo example by translating the axum example
2025-01-13 19:53:50 +01:00
Guillaume Gomez
f6cf374683
Merge pull request #308 from Kijewski/pr-axum-example
...
examples: add {axum,poem,rocket,warp} by translating the actix-web example; book: add frameworks section
2025-01-13 14:40:54 +01:00
René Kijewski
da8d6454d2
book: add frameworks section
2025-01-13 13:54:46 +01:00
René Kijewski
bcf59ed305
Add poem example by translating the actix-web example
2025-01-13 13:54:45 +01:00
René Kijewski
861c59032d
Add rocket example by translating the warp example
2025-01-13 13:08:02 +01:00
René Kijewski
42a82c4785
Add warp example by translating the axum example
2025-01-13 13:08:02 +01:00
René Kijewski
5bf465eb3c
Add axum example by translating the actix-web example
2025-01-13 13:08:02 +01:00
René Kijewski
3421168948
Update actix-web example
2025-01-13 13:08:01 +01:00
Guillaume Gomez
be9069f86f
Merge pull request #312 from Kijewski/pr-rust-and-winnow
...
Update ui tests for rust 1.84, and deprecations in winnow 0.6.24
2025-01-12 22:58:27 +01:00
René Kijewski
35a77e3c25
Fix winnow deprecation warning
2025-01-12 19:43:52 +01:00
Guillaume Gomez
7947cdcafb
Fix ui test
2025-01-12 19:43:39 +01:00
René Kijewski
c01e3dce04
Merge pull request #310 from GuillaumeGomez/book-update
...
Remove "Using integrations" part in book
2025-01-12 17:45:51 +01:00
Guillaume Gomez
f78cb94216
Remove "Using integrations" part in book
2025-01-09 16:19:35 +01:00
Guillaume Gomez
395a1d8dfe
Merge pull request #305 from Kijewski/pr-update-fuzzing
...
ci: group checks in fast, average and slow
2025-01-04 21:17:29 +01:00
René Kijewski
5b4df98ff6
ci: group checks in fast, avg and slow
2025-01-04 19:08:16 +01:00
René Kijewski
d3a1afd99d
fuzzing: update corpus
2025-01-04 18:25:38 +01:00
René Kijewski
fff55f2a1d
Merge pull request #304 from Kijewski/pr-excessive-filter-block
...
parser: fix excessive filter blocks
2025-01-04 11:53:26 +01:00
René Kijewski
053366821b
Merge pull request #303 from Kijewski/pr-upgrade
...
book: add `upgrading.md`
2025-01-04 11:52:52 +01:00
René Kijewski
ff25aaab2a
parser: fix excessive filter blocks
...
A `{% filter %}` block could have an unbound number of filters chained
one after another. This chain would wind up as a nested structure on the
heap. When dropped, this would cause a stackoverflow.
Resolves <https://issues.oss-fuzz.com/issues/386547457 >.
2025-01-04 11:23:54 +01:00
René Kijewski
d1287adf80
fuzzing: add option to write out fuzzed scenarios
2025-01-04 11:03:16 +01:00
René Kijewski
6be9f7104b
book: add upgrading.md
2025-01-04 00:13:21 +01:00
René Kijewski
0373645eb9
Merge pull request #301 from Kijewski/pr-digits
...
Speed-up HTML escaping a bit
2025-01-01 18:09:37 +01:00
René Kijewski
39647e57a6
Speed-up HTML escaping a bit
...
This PR adds an `enum Digits` that contains all possible values for
two-digit decimal numbers: `b"00" ..= b"99"`. This seems to enable rust
and/or llvm to make better use of niches. Previously there were no
niches, and we compared against `0` manually. Now most of the u16-space
are niches.
```text
Escaping time: [3.3437 µs 3.3497 µs 3.3578 µs]
change: [-18.807% -18.620% -18.452%] (p = 0.00 < 0.05)
Performance has improved.
```
2025-01-01 17:55:34 +01:00
Guillaume Gomez
8d6279d9c8
Merge pull request #279 from GuillaumeGomez/block_in_include
...
Fix `block_in_include` and add explanations on what is going on
2025-01-01 12:15:33 +01:00
René Kijewski
d254942dbc
Add jinja2 tests to verify that jinja2 renders the same
2025-01-01 09:31:52 +01:00
René Kijewski
97ecbe6dba
Merge pull request #299 from Kijewski/pr-issue-283
...
derive: keep track of called macros
2024-12-29 19:38:03 +01:00