Skip to content

Commit

Permalink
json
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasper-Bekkers committed Jul 9, 2024
1 parent 4ec1d33 commit d510890
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
24 changes: 24 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ generate_bindings = ["dep:bindgen"]
bytemuck = "1"
serde = { version = "1", features = ["derive", "rc"] }

[dev-dependencies]
serde_json = "1"

[build-dependencies]
bindgen = { version = "0.69", optional = true }
cc = "1.0.83"
2 changes: 1 addition & 1 deletion examples/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ use cpuinfo_rs::CpuInfo;

fn main() {
let info = CpuInfo::new();
let _ = std::fs::write("info.txt", format!("{:#?}", info.processors()));
let _ = std::fs::write("info.txt", serde_json::to_string(&info.processors()).unwrap());
}

0 comments on commit d510890

Please sign in to comment.