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

scoop-shim

A simple parser and serializer for Scoop shims

2 releases

new 0.1.1 Oct 27, 2024
0.1.0 Oct 25, 2024

#1192 in Encoding

Download history 242/week @ 2024-10-24

242 downloads per month

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

~240–690KB
~16K SLoC