From c1cf1bfeb3deb15724f970894b692db784ca610f Mon Sep 17 00:00:00 2001 From: Mingwei Zhang Date: Sun, 24 Nov 2024 08:37:52 -0800 Subject: [PATCH] add `local` flag for local-only parsing --- Cargo.toml | 4 ++++ examples/local_only/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 3fcf108..6f72f7b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,6 +51,10 @@ clap = { version = "4.5", features = ["derive"], optional = true } [features] default = ["parser", "rustls"] + +# parsing local files only, removing dependencies for handling remote files +local = ["parser", "oneio"] + parser = [ "bytes", "chrono", diff --git a/examples/local_only/Cargo.toml b/examples/local_only/Cargo.toml index 4f4556a..78539bf 100644 --- a/examples/local_only/Cargo.toml +++ b/examples/local_only/Cargo.toml @@ -4,4 +4,4 @@ version = "0.1.0" edition = "2021" [dependencies] -bgpkit-parser = { path = "../..", default-features = false, features = ["parser"] } \ No newline at end of file +bgpkit-parser = { path = "../..", default-features = false, features = ["local"] } \ No newline at end of file