Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ documentation = "https://mbr.github.io/device_tree-rs/device_tree/"

[features]
string-dedup = [] # Requires std

[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ extern crate core;
pub mod util;

use core::str;
use serde::{Deserialize, Serialize};
use util::{align, SliceRead, SliceReadError, VecWrite, VecWriteError};

const MAGIC_NUMBER: u32 = 0xd00dfeed;
Expand Down Expand Up @@ -74,7 +75,7 @@ pub enum DeviceTreeError {
}

/// Device tree structure.
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct DeviceTree {
/// Version, as indicated by version header
pub version: u32,
Expand All @@ -91,7 +92,7 @@ pub struct DeviceTree {
}

/// A single node in the device tree.
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct Node {
/// The name of the node, as it appears in the node path.
pub name: String,
Expand Down