preserves-path 4.990.0

Implementation of preserves-path, a query language for Preserves documents.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use preserves_schema::compiler::*;

use std::io::Error;
use std::path::PathBuf;

fn main() -> Result<(), Error> {
    let buildroot = PathBuf::from(std::env::var_os("OUT_DIR").unwrap());

    let mut gen_dir = buildroot.clone();
    gen_dir.push("src/schemas");

    let mut c = CompilerConfig::new(gen_dir, "crate::schemas".to_owned());

    let inputs = expand_inputs(&vec!["path.bin".to_owned()])?;
    c.load_schemas_and_bundles(&inputs, &vec![])?;

    compile(&c)
}