Open mitsuhiko opened 1 month ago
Another option entirely is to no longer use serde
in public interfaces at all and force people to use Value::from_serialize
explicitly. Then context!
and other functions could use Into<Value>
instead. I'm not convinced that this is an amazing idea but it would make the interface potentially simpler. That however would definitely require a major.
This PR makes
serde
optional in MiniJinja. The way to use this is to disable default features which also turns offserde
. Unfortunately this is not semver compatible as it means that anyone currently using MiniJinja without serde will experience breakage.Additionally it changes the behavior of
context!
to take things by value. The benefit of this is that the macro can now support bothInto<Value>
andSerialize
as conversions.This will have to go into a new major version.
Fixes #528