#serde — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #serde, aggregated by home.social.
-
Wait what, #serde doesn't contain any slop commits, while not excplicitly forbidding it..?? Is this just a coincidence, that sloppers just...forgot about that critical piece of rust ecosystem even exist?????
-
Wait what, #serde doesn't contain any slop commits, while not excplicitly forbidding it..?? Is this just a coincidence, that sloppers just...forgot about that critical piece of rust ecosystem even exist?????
-
Как я писал генератор TypeScript-биндингов для Tauri
В Tauri фронтенд дёргает Rust-команды через invoke("get_user", { userId: 42 }) — строка, объект, никакой проверки типов. После очередного вечера, убитого на расхождение snake_case и camelCase, я написал генератор, который превращает Rust-команды и serde-типы в готовые TypeScript-файлы — без аннотаций и правок в коде приложения. Под катом — почему генерировать надо не то, что написано в коде, а то, что serde реально шлёт по проводу; как я выпустил три релиза за один день, воюя с макросами; и при чём тут юникод-эскейпы в TOML на Windows.
https://habr.com/ru/articles/1048060/
#tauri #rust #typescript #кодогенерация #биндинги #serde #ipc #cli
-
via @dotnet : VSTest is Removing its Newtonsoft.Json Dependency
https://ift.tt/PYIZ0Ny
#VSTest #NewtonsoftJson #SystemTextJson #JSONite #dotnet11 #VisualStudio #VS2024 #dotnetTest #TestExplorer #NuGet #SecurityUpdate #SerDe #JsonDependency #BreakingChange #DotNe… -
via @dotnet : VSTest is Removing its Newtonsoft.Json Dependency
https://ift.tt/PYIZ0Ny
#VSTest #NewtonsoftJson #SystemTextJson #JSONite #dotnet11 #VisualStudio #VS2024 #dotnetTest #TestExplorer #NuGet #SecurityUpdate #SerDe #JsonDependency #BreakingChange #DotNe… -
@simontatham greatness averted, we could have had #derive #async_trait #strum #tokio #command #cfg #serde
-
@simontatham greatness averted, we could have had #derive #async_trait #strum #tokio #command #cfg #serde
-
Today, I once again wake up worrying about #Rust 's future.
Why is a shitbag such as #dtolnay still allowed to single-handedly maintain fundamental libraries for the ecosystem? Why is he part of Library API team? How is he not permabanned for single-handedly permanently damaging Rust by killing off comptime reflection over his racism? How is he not permabanned for the power play he attempted to pull with his "RFC" after pushing pre-compiled binary to serde without notice? Why are MIC companies routinely tolerated at Rust conventions? Why does no one talk about it, despite the problems not being solved? Has #Ruby takeover taught people nothing? Will Rust survive another year without turning into #fashtech?
So many questions. I think about them every time I use Rust, which is often.
Apropos of nothing.
-
Today, I once again wake up worrying about #Rust 's future.
Why is a shitbag such as #dtolnay still allowed to single-handedly maintain fundamental libraries for the ecosystem? Why is he part of Library API team? How is he not permabanned for single-handedly permanently damaging Rust by killing off comptime reflection over his racism? How is he not permabanned for the power play he attempted to pull with his "RFC" after pushing pre-compiled binary to serde without notice? Why are MIC companies routinely tolerated at Rust conventions? Why does no one talk about it, despite the problems not being solved? Has #Ruby takeover taught people nothing? Will Rust survive another year without turning into #fashtech?
So many questions. I think about them every time I use Rust, which is often.
Apropos of nothing.
-
@asonix But that sounds right like what @KingmaYpe suggested:
enum FieldString { Quoted(String), Bare(String) }
The hard part is probably to send those through serde's interface, right? You could probably recognize the names in your serializer in serialize_newtype_variant and then emit possibly-quotes and the inner value.
Whether that is good use of #Serde, I do not know. -
@asonix But that sounds right like what @KingmaYpe suggested:
enum FieldString { Quoted(String), Bare(String) }
The hard part is probably to send those through serde's interface, right? You could probably recognize the names in your serializer in serialize_newtype_variant and then emit possibly-quotes and the inner value.
Whether that is good use of #Serde, I do not know. -
RE: https://masto.asonix.dog/@asonix/115487539746688367
quooting to improve hashtag visibility
serde-knower-abouters please help
-
Can anyone point me to a serde data format that uses multiple distinct string representations?
Or a serde data format that isn't self-describing?
Or a serde data format that has distinct "top level" types that are different from inner types
Unfortunately I'm implementing a data format that has all of these things and it's making serde hard
-
I feel like I'm always using serde incorrectly:
it's far too easy to conflate the abstract model representation and the serialized representation for some data. (ie: just stick #[derive(Deserialize)] everywhere and call it a day). But if I make the serialization structs separate, the model instantly becomes full of lifetimes and references and ugh.... messy.
Is there a good writeup somewhere for like... good design while using serde?
-
I feel like I'm always using serde incorrectly:
it's far too easy to conflate the abstract model representation and the serialized representation for some data. (ie: just stick #[derive(Deserialize)] everywhere and call it a day). But if I make the serialization structs separate, the model instantly becomes full of lifetimes and references and ugh.... messy.
Is there a good writeup somewhere for like... good design while using serde?
-
🤦♂️ Someone thought it was a good idea to mix Rust's crusty rigor with Python's whimsical magic, using #Serde as the glue. Because nothing screams 'user-friendly' like making #Rust dance to Python's tune through a #serialization library! 🎻✨
https://ohadravid.github.io/posts/2025-05-serde-reflect/ #Python #programming #userfriendly #HackerNews #ngated -
🤦♂️ Someone thought it was a good idea to mix Rust's crusty rigor with Python's whimsical magic, using #Serde as the glue. Because nothing screams 'user-friendly' like making #Rust dance to Python's tune through a #serialization library! 🎻✨
https://ohadravid.github.io/posts/2025-05-serde-reflect/ #Python #programming #userfriendly #HackerNews #ngated -
A Rust API Inspired by Python, Powered by Serde
https://ohadravid.github.io/posts/2025-05-serde-reflect/
#HackerNews #Rust #Python #API #Serde #Programming #Languages
-
A Rust API Inspired by Python, Powered by Serde
https://ohadravid.github.io/posts/2025-05-serde-reflect/
#HackerNews #Rust #Python #API #Serde #Programming #Languages
-
I always wondered why I always found the #serde deserialization API (from a deserializer implementer's perspective) so hard to keep straight in my head. It dawned on me today: it's because it's a 3-body problem. You have 3 types to think about: Deserialize, Deserializer and Visitor.
-
I always wondered why I always found the #serde deserialization API (from a deserializer implementer's perspective) so hard to keep straight in my head. It dawned on me today: it's because it's a 3-body problem. You have 3 types to think about: Deserialize, Deserializer and Visitor.
-
@davedelong, they mention @rust #Serde framework, so they are not too far from your idea.
“The Serde ecosystem consists of data structures that know how to serialize and deserialize themselves along with data formats that know how to serialize and deserialize other things.”
-
If you're in King's Hall at #RustNationUK, I found the crate Adam Harvey told us not to post on the social media about!
-
If you're in King's Hall at #RustNationUK, I found the crate Adam Harvey told us not to post on the social media about!
-
Ok, a (half a) day of satisfaction was enough.
Everything works well still, but there is room for optimization. Not the optimization of #rust code, but of the RMI structure itself. There needs to be a family of RMI request structs, and I'm thankful to #rust for not providing me with #oop stuff, because I really don't need going down that rabbithole.
Containment will suffice, I'm just eager to see what #serde will have to say about it... -
Ok, a (half a) day of satisfaction was enough.
Everything works well still, but there is room for optimization. Not the optimization of #rust code, but of the RMI structure itself. There needs to be a family of RMI request structs, and I'm thankful to #rust for not providing me with #oop stuff, because I really don't need going down that rabbithole.
Containment will suffice, I'm just eager to see what #serde will have to say about it... -
-
https://github.com/kdl-org/kdl-rs/pull/83
the work has begun to add #serde support to #kdl rs!
It'll take me a bit, but the parser refactor that'll let me do this is going well.
anyway this is all very exciting because I think not being able to use serde has tbh been a huge blocker for folks adopting kdl in Rust
-
https://github.com/kdl-org/kdl-rs/pull/83
the work has begun to add #serde support to #kdl rs!
It'll take me a bit, but the parser refactor that'll let me do this is going well.
anyway this is all very exciting because I think not being able to use serde has tbh been a huge blocker for folks adopting kdl in Rust
-
Rust's serde should really support default literals! 🦀
➡️ Read more: https://serde.rs/attr-default.html
✨ Tracking issue: https://github.com/serde-rs/serde/issues/368
-
Rust's serde should really support default literals! 🦀
➡️ Read more: https://serde.rs/attr-default.html
✨ Tracking issue: https://github.com/serde-rs/serde/issues/368
-
Написать X-docker-isolation-provider сложно — но не невозможно
Вы когда-нибудь чувствовали себя пионерами? Вот именно так я себя и ощущал, когда писал docker-isolation-provider для платформы ассоциативного программирования Deep . Все было так: в один прекрасный день у нас на платформе связей решили - было бы славно портировать нашего бота в Deep . А для этого нужно было написать так называемые провайдеры . Провайдеры нужны лишь для одной цели - дать возможность пользователю выполнять пользовательские хэндлеры на любом языке. Тогда я просто подумал, что было бы неплохо помочь парням, которые вероятно Rust никогда в жизни не видели . Ох, как же я тогда ошибался…
https://habr.com/ru/articles/822093/
#deepfoundation #программирование #история_разработки #rust #actixweb #serde #wasm
-
Form data (x-www-form-urlencoded) support in #Axum is a bit disappointing. It uses #serde’s serde_urlencoded underneath, which in principle is fine. But the problem is that HTML forms don’t let you *not send* a value, which makes the whole thing useless with optional fields. You can set a field in a form to not be required and send an empty value (`?foo&bar=3&…` or `?foo=&bar=3&…` for empty `foo`) but then serde treats it as a present empty string and fails deserialization.
-
I've just tagged a new release of Crell/Serde, version 1.2.
This release includes support for Unix timestamps, makes TypeFields more flexible and customizable, and fixes an issue with handling null values. Note that the latter fix has a very small BC break that only impacts a select number of custom Importers, so odds are you won't notice.
Get it while it's hot!
-
And I’ve thrown out that solution again. Instead of messing with
serde::Deserializewhich never quite works as it should, I’ve decided to extend the API and support flattened structs properly. I’ve added my solution to this already much too long thread where lots of people spent lots of time trying to make things somehow work with Serde’s APIs. -
Any #rustlang #serde experts out there willing to help me out with a "Deserializer adapter" for skipping duplicate JSON keys when deserializing using serde_json? https://users.rust-lang.org/t/serde-how-to-create-a-deserializer-adapter-to-ignore-duplicate-fields-in-json-data/112252
-
I finally managed to create a
serde::Deserializeimplementation that would supportflattenanddeny_unknown_fieldsat the same time. The issue was mostly how the Serde API makes this task difficult for no good reason from what I can tell.I sort of see why it has to be static strings everywhere, but why static slices as well? That’s an implementation detail of the default implementation and IMHO not actually required anywhere. And why is it so hard to get to the list of fields supported by an implementation?
I guess this use case was never a priority, but configuration files where a typo in a field name won’t be recognized are a major PITA…
-
Question for #RustLang programmers out there: Now that `serde-yaml` is no longer maintained, what package should I be using to parse #yaml?
https://github.com/dtolnay/serde-yaml/commit/3ba8462f7d3b603d832e0daeb6cfc7168a673d7a
(NOTE: This post is neither a complaint nor an invitation to complain about an individual's decision to stop providing volunteer labor in the form of maintaining his package.)