Live data from Hacker News

24 days of Rust – serde

siciarz.net

1–10 of 15 posts

Re: 24 days of Rust – serde

#2
It's been mentioned in the post, but it's a big deal, so for emphasis: serde is much nicer to use on nightly than stable, even though it will work on stable. This has been one of the biggest reasons people aren't on stable Rust. The tooling needed to get it working on stable with the same ergonomics as nightly is slated for Rust 1.15. It's not 100% for sure, but 99.99%.

This will also help crates like Diesel.

Re: 24 days of Rust – serde

#5
post #3

There's also nom ( https://github.com/Geal/nom ) which is similar to Parsec and more designed for parsing text formats but used for binary formats too.

Serde is short for "serialize/deserialize", nom is about parsing. Similar, but slightly different things.

Re: 24 days of Rust – serde

#6
post #3

There's also nom ( https://github.com/Geal/nom ) which is similar to Parsec and more designed for parsing text formats but used for binary formats too.

Serde is short for "serialize/deserialize", nom is about parsing. Similar, but slightly different things.

Serde creator here. Steve's right, serde is fundamentally a generic protocol that implements serialization. I didn't use nom for serde_json (because it didn't exist at the time) but it's definitely possible to use nom and other parser generators to implement the serde protocol.

Re: 24 days of Rust – serde

#8
post #7

And it's only for nightly (see "feature") and it means it's can be used in reliable code. Talks about stabilizing of this feature are endless.

Serde code generation can be used on stable Rust, it just requires a bit of boilerplate code to setup: https://serde.rs/codegen-stable.html. Things will be much better once macros 1.1 gets stabilized.

Re: 24 days of Rust – serde

#9
post #8
post #7

And it's only for nightly (see "feature") and it means it's can be used in reliable code. Talks about stabilizing of this feature are endless.

Serde code generation can be used on stable Rust, it just requires a bit of boilerplate code to setup: https://serde.rs/codegen-stable.html . Things will be much better once macros 1.1 gets stabilized.

codegen? lol, never. It would be enough reason to forget about Rust at all.

Re: 24 days of Rust – serde

#10
post #9
post #8

Earlier quoted context omitted.

Serde code generation can be used on stable Rust, it just requires a bit of boilerplate code to setup: https://serde.rs/codegen-stable.html . Things will be much better once macros 1.1 gets stabilized.

codegen? lol, never. It would be enough reason to forget about Rust at all.

for silent downvoter: this line "Next create a file src/serde_types.in.rs to hold all the types for which we need code generation." sounds ridiculous for web projects with hundreds of entities, needed to be transferred as json objects trough API.
Post reply on HN