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

Remove mandatory serde dependency #539

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Remove mandatory serde dependency #539

wants to merge 15 commits into from

Conversation

mitsuhiko
Copy link
Owner

@mitsuhiko mitsuhiko commented Jul 18, 2024

This PR makes serde optional in MiniJinja. The way to use this is to disable default features which also turns off serde. 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 both Into<Value> and Serialize as conversions.

This will have to go into a new major version.

Fixes #528

@mitsuhiko
Copy link
Owner Author

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.

@mitsuhiko mitsuhiko changed the title Add an optional mode without serde Remove mandatory serde dependency Jul 21, 2024
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 this pull request may close these issues.

Drop Serde Dependency
1 participant