This crate contains all VRL functions written for Vector and its supporting libraries.
If your project needs access to all provided functions, use:
vrl-stdlib = "0.1"If instead, you need a subset of functions, use:
[dependencies.vrl-stdlib]
version = "0.1"
default-features = false
features = [
"assert",
"parse_json",
# ...
]To add a new function, do the following:
- make sure an issue exists to add the relevant function and the issue is approved
cp src/parse_json.rs src/my_function.rs- search and replace
ParseJsonforMyFunctionandparse_jsonformy_function - add relevant feature flags to
Cargo.toml - add relevant
modandusestatements tosrc/lib.rs - update tests to define the expected outcome
- update the relevant
FunctionandExpressiontrait implementations to match the test expectations - create a PR, linking to the original issue
- ...
- profit!