tvl-depot/tvix/cli
Vincent Ambo 3045645df0 feat(tvix/cli): implement initial refscan module
This module implements a ReferenceScanner struct which uses the
aho_corasick crate to scan string inputs for known, non-overlapping
candidates (store paths, in our case).

I experimented with several different APIs, and landed on this version
with an initial accumulator in the scanner. The scanner is
instantiated from the candidates and "fed" all the strings, then
consumed by the caller to retrieve the result.

Right now only things that look vaguely like bytestrings can be fed to
the scanner, there is no streaming support in the API yet.

Change-Id: I7782f0f0df5fc64bccd813aa14712f5525b0168c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7808
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2023-01-11 16:03:51 +00:00
..
src feat(tvix/cli): implement initial refscan module 2023-01-11 16:03:51 +00:00
Cargo.toml feat(tvix/cli): implement initial refscan module 2023-01-11 16:03:51 +00:00
default.nix refactor(tvix): split binary (REPL etc.) out from evaluator library 2022-12-21 13:09:29 +00:00