bearcove / loona

HTTP 1+2 in Rust, with io_uring & ktls
https://docs.rs/loona
Apache License 2.0
341 stars 12 forks source link

Migrate to `merde_json` #196

Open fasterthanlime opened 2 months ago

fasterthanlime commented 2 months ago

(disclaimer: I wrote it)

https://github.com/bearcove/merde_json is lighter than serde_json, and could easily replace it for the two places fluke deals with json:

This is low-priority but it'd also help with compile times overall so.

tmunongo commented 2 months ago

Hi Amos! Big fan of your blog, by the way. Actually just stumbled upon merde_json yesterday on one of your Mastodon posts and added it to a project I'm working on. I'd love to work on this!

fasterthanlime commented 2 months ago

That’d be great! I’m not actively working on this yet, I’ll happily review a PR migrating one or both of the use cases to it!

tmunongo commented 2 months ago

Awesome! I'll do both :)

tmunongo commented 6 days ago

Hey Amos! Full disclosure, trying to do this migration made me rage-quit writing Rust for a bit and I've been slowly working my way back. Anyways, I'm not quite sure how to convert the empty structs in the ast.rs file in the httpwg-gen crate to declarative macros. I'm still a bit of a Rust noob so I understand if this is a dumb question. I just need to know if they can be converted them before spending more time on this. I'm willing to go figure it out of the conversion is possible

fasterthanlime commented 3 days ago

Hey Amos! Full disclosure, trying to do this migration made me rage-quit writing Rust for a bit and I've been slowly working my way back.

Oh no! That's the opposite of what I'm trying to do overall!

It's entirely possible that merde doesn't quite support the features needed by loona right now! I've also been making big changes to merde in parallel, which is fine if I'm the one migrating loona to merde but not if you are x)

Apologies for the frustration — feel free to open a draft PR so your in-progress work is visible somewhere, and let me know if it's fine to use it when I pick that back up!

tmunongo commented 2 days ago

Oh no! That's the opposite of what I'm trying to do overall!

Haha no worries! It just showed me how much I still need to learn which is a positive outcome.

Anyways, I've made a draft PR which I hope will serve as a good starting point when you do eventually migrate.