vynil-core 0.7.4

A Rust toolbox for bootstrapping projects combining a Rhai scripting engine and a Handlebars templating engine, with optional Kubernetes / OCI / S3 handlers.
Documentation
1
2
3
4
5
6
7
8
9
10
use rhai::{Engine, ImmutableString};
use wildmatch::WildMatch;

fn glob_fn(text: ImmutableString, pattern: ImmutableString) -> bool {
    WildMatch::new(pattern.as_ref()).matches(text.as_ref())
}

pub fn glob_rhai_register(engine: &mut Engine) {
    engine.register_fn("glob", glob_fn);
}