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
ParseJson
forMyFunction
andparse_json
formy_function
- add relevant feature flags to
Cargo.toml
- add relevant
mod
anduse
statements tosrc/lib.rs
- update tests to define the expected outcome
- update the relevant
Function
andExpression
trait implementations to match the test expectations - create a PR, linking to the original issue
- ...
- profit!