Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/vendor/serde/crates-io.md # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / vendor / serde / crates-io.md` 65 lines ยท 2538 bytes Raw Blame History Rendered 1 2 3 **Serde is a framework for *ser*ializing and *de*serializing Rust data structures efficiently and generically.** 4 5 --- 6 7 You may be looking for: 8 9 - [An overview of Serde](https://serde.rs) 10 - [Data formats supported by Serde](https://serde.rs/#data-formats) 11 - [Setting up `#[derive(Serialize, Deserialize)]`](https://serde.rs/derive.html) 12 - [Examples](https://serde.rs/examples.html) 13 - [API documentation](https://docs.rs/serde) 14 - [Release notes](https://github.com/serde-rs/serde/releases) 15 16 ## Serde in action 17 18 ```rust 19 use serde::{Deserialize, Serialize}; 20 21 #[derive(Serialize, Deserialize, Debug)] 22 struct Point { 23 x: i32, 24 y: i32, 25 } 26 27 fn main() { 28 let point = Point { x: 1, y: 2 }; 29 30 // Convert the Point to a JSON string. 31 let serialized = serde_json::to_string(&point).unwrap(); 32 33 // Prints serialized = {"x":1,"y":2} 34 println!("serialized = {}", serialized); 35 36 // Convert the JSON string back to a Point. 37 let deserialized: Point = serde_json::from_str(&serialized).unwrap(); 38 39 // Prints deserialized = Point { x: 1, y: 2 } 40 println!("deserialized = {:?}", deserialized); 41 } 42 ``` 43 44 ## Getting help 45 46 Serde is one of the most widely used Rust libraries so any place that Rustaceans 47 congregate will be able to help you out. For chat, consider trying the 48 [#rust-questions] or [#rust-beginners] channels of the unofficial community 49 Discord (invite: ), the [#rust-usage] 50 or [#beginners] channels of the official Rust Project Discord (invite: 51 ), or the [#general][zulip] stream in Zulip. For 52 asynchronous, consider the [\[rust\] tag on StackOverflow][stackoverflow], the 53 [/r/rust] subreddit which has a pinned weekly easy questions post, or the Rust 54 [Discourse forum][discourse]. It's acceptable to file a support issue in this 55 repo but they tend not to get as many eyes as any of the above and may get 56 closed without a response after some time. 57 58 [#rust-questions]: https://discord.com/channels/`273534239310479360`/`274215136414400513` 59 [#rust-beginners]: https://discord.com/channels/`273534239310479360`/`273541522815713281` 60 [#rust-usage]: https://discord.com/channels/`442252698964721669`/`443150878111694848` 61 [#beginners]: https://discord.com/channels/`442252698964721669`/`448238009733742612` 62 [zulip]: https://rust-lang.zulipchat.com/#narrow/stream/122651-general 63 [stackoverflow]: https://stackoverflow.com/questions/tagged/rust 64 [/r/rust]: https://www.reddit.com/r/rust 65 [discourse]: https://users.rust-lang.org