Lots more updates
Also begin adding rust building capabilities to be able to write rust binaries for some commands.
This commit is contained in:
parent
624508dd14
commit
dd1cfa79e7
52 changed files with 2509 additions and 150 deletions
10
rust/lib/common/src/yaml.rs
Normal file
10
rust/lib/common/src/yaml.rs
Normal file
|
@ -0,0 +1,10 @@
|
|||
use anyhow::Context;
|
||||
use serde::Serialize;
|
||||
|
||||
pub fn string(str: &str) -> String {
|
||||
serde_yml::to_string(str).expect("Should be able to encode string")
|
||||
}
|
||||
|
||||
pub fn to_string<T: ?Sized + Serialize>(value: &T) -> anyhow::Result<String> {
|
||||
serde_yml::to_string(value).context("Could not serialize to yaml")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue