-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Splitting value/python away from jiter's parser/decoders/iterators? #139
Comments
The python stuff is already behind a feature flag, so that's fine. Out of interest, what do you use instead of I'd be happy to accept a PR to make |
You can see my take on Value here: https://docs.rs/merde/latest/merde/enum.Value.html (with CowStr’s owned type being compact_str if the feature is enabled) I think for python it probably makes more sense to have everything reference counted, since those are more or less the semantics of any garbage collected language. i’m only thinking about rust API consumers in my case. |
I did end up getting rid of the lazy index map because it’s a clever trick if you unconditionally deserialize to that, but in the case of merde the common case is to target a rust struct so there’s no hashing done at all |
Are you dead-set on keeping it all one single crate? I know inter-crate optimization can be touchy (nothing thin-LTO + more aggressive |
Opposite question, What's the advantage of splitting? |
Testing for combination of feature flags is famously hard to get right, the number of combinations explode, it's so easy to forget about a combination that doesn't work, and the whole editing experience is just awkward (e.g. code editor settings to have cargo check/clippy run with some feature flag combinations). Dealing with optional dependencies is aggravating too, a lot of things are possible but eventually you're doing a lot of work just to avoid doing Working on different component in isolation is also much nicer when they're split: say you're running The "global" dependency tree will also be clearer: on crates.io / lib.rs, if you go on CVEs are reported against entire packages — imagine there's a vuln in Sometimes splitting up packages is touchy due to the lack of a clear interface between them. Here it's so clear I was honestly kinda surprised you asked for additional reasoning x) But I'm fairly happy with the reasons I gave, I can rack my brain for more if you'd like. |
Would you consider splitting those into separate crates?
I'm asking because my crate now has its own
Value
type (it's not specifically tied to Python, it doesn'tArc
all the things for example, it doesn't depend on ahash directly, etc.) and so it only uses the iterator API.It would be neat to be able to share the parser/iterator between jiter & merde, so that if one adds x86_64 SIMD for example, the other would get it too, etc.
The text was updated successfully, but these errors were encountered: