Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A trivial example based on `serde`'s `example-format' [1]. It contains both a in-`kernel` data format later used by the kernel module, as well as a local data format in the module. The kernel module gives an output such as: [ 0.801425] rust_serde: Rust serde sample (init) [ 0.801634] rust_serde: original = S { a: (), b: false, c: true, d: () } [ 0.802079] rust_serde: serialized = [2, 0, 1, 0, 1, 1, 0, 3] [ 0.802506] rust_serde: deserialized = S { a: (), b: false, c: true, d: () } [ 0.802718] rust_serde: serialized (local) = [2, 0, 1, 42, 1, 43, 0, 3] [ 0.802895] rust_serde: deserialized (local) = S { a: (), b: false, c: true, d: () } [ 0.808954] rust_serde: Rust serde sample (exit) Note that this is just a quick draft/hack to check the previous commits work. It is not intended to be merged at all. Link: https://github.com/serde-rs/example-format [1] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
- Loading branch information