#shim #serialization #scoop #parser #path #parser-serializer

scoop-shim

A simple parser and serializer for Scoop shims

2 releases

0.1.1 Oct 27, 2024
0.1.0 Oct 25, 2024

#1051 in Encoding

Apache-2.0

13KB
323 lines

Scoop Shims

Usage

use scoop_shim::Shim;

// Serialize a shim
let shim = Shim::new(
    std::path::PathBuf::from("sfsu.exe"),
    vec!["search".to_string()],
);

shim.to_string(); // "path = \"sfsu.exe\"\r\nargs = search"

// Deserialize a shim
let shim = scoop_shim::from_str("path = \"sfsu.exe\"\r\nargs = search").unwrap();

assert_eq!(shim.path(), std::path::PathBuf::from("sfsu.exe"));
assert_eq!(shim.args(), ["search".to_string()]);

Made with 💗 by Juliette Cordor

Dependencies

~235–690KB
~16K SLoC