diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 2c9e264..60d3b8c 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -1,7 +1,7 @@ name: codecov on: push: - branches: [main] + branches: [ main ] paths: - '**.rs' pull_request: @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install Rust - run: rustup update stable + run: rustup update stable && rustup install nightly - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov - name: Generate code coverage diff --git a/Cargo.toml b/Cargo.toml index 6160638..eacb84d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,14 +36,14 @@ hex = { version = "0.4.3", optional = true } # bmp/openbmp parsing log = { version = "0.4", optional = true } oneio = { version = "0.16.7", default-features = false, features = ["remote", "gz", "bz"], optional = true } regex = { version = "1", optional = true } # used in parser filter -chrono = { version = "0.4.24", optional = true } # parser filter +chrono = { version = "0.4.38", optional = true } # parser filter serde_json = { version = "1.0", optional = true } # RIS Live parsing #################### # CLI dependencies # #################### env_logger = { version = "0.11", optional = true } -clap = { version = "4.0", features = ["derive"], optional = true } +clap = { version = "4.5", features = ["derive"], optional = true } [features] default = ["parser", "rustls"] @@ -106,12 +106,11 @@ harness = false anyhow = "1" bgpkit-broker = "0.7.0-beta.5" kafka = "0.10.0" -tungstenite = "0.21.0" -url = "2.1.0" +tungstenite = "0.23.0" criterion = { version = "0.5.1", features = ["html_reports"] } -rayon = "1.5.1" +rayon = "1.10" bzip2 = "0.4" -flate2 = "1.0.25" +flate2 = "1.0" md5 = "0.7.0" which = "6" serde_json = "1.0" diff --git a/README.md b/README.md index cc4147f..1aa1c8b 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,6 @@ from on collector (`rrc21`). We can then loop and read messages from the websock use bgpkit_parser::parse_ris_live_message; use serde_json::json; use tungstenite::{connect, Message}; -use url::Url; const RIS_LIVE_URL: &str = "ws://ris-live.ripe.net/v1/ws/?client=rust-bgpkit-parser"; @@ -152,7 +151,7 @@ const RIS_LIVE_URL: &str = "ws://ris-live.ripe.net/v1/ws/?client=rust-bgpkit-par fn main() { // connect to RIPE RIS Live websocket server let (mut socket, _response) = - connect(Url::parse(RIS_LIVE_URL).unwrap()) + connect(RIS_LIVE_URL) .expect("Can't connect to RIS Live websocket server"); // subscribe to messages from one collector diff --git a/examples/real-time-ris-live-websocket.rs b/examples/real-time-ris-live-websocket.rs index e8a7718..6bff997 100644 --- a/examples/real-time-ris-live-websocket.rs +++ b/examples/real-time-ris-live-websocket.rs @@ -1,7 +1,6 @@ use bgpkit_parser::parse_ris_live_message; use serde_json::json; use tungstenite::{connect, Message}; -use url::Url; const RIS_LIVE_URL: &str = "ws://ris-live.ripe.net/v1/ws/?client=rust-bgpkit-parser"; @@ -10,8 +9,8 @@ const RIS_LIVE_URL: &str = "ws://ris-live.ripe.net/v1/ws/?client=rust-bgpkit-par /// For more RIS-Live details, check out their documentation at https://ris-live.ripe.net/manual/ fn main() { // connect to RIPE RIS Live websocket server - let (mut socket, _response) = connect(Url::parse(RIS_LIVE_URL).unwrap()) - .expect("Can't connect to RIS Live websocket server"); + let (mut socket, _response) = + connect(RIS_LIVE_URL).expect("Can't connect to RIS Live websocket server"); // subscribe to messages from one collector // let msg = json!({"type": "ris_subscribe", "data": {"host": "rrc21"}}).to_string(); diff --git a/src/lib.rs b/src/lib.rs index 37c0ca3..aed9223 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -133,7 +133,6 @@ from on collector (`rrc21`). We can then loop and read messages from the websock use bgpkit_parser::parse_ris_live_message; use serde_json::json; use tungstenite::{connect, Message}; -use url::Url; const RIS_LIVE_URL: &str = "ws://ris-live.ripe.net/v1/ws/?client=rust-bgpkit-parser"; @@ -143,7 +142,7 @@ const RIS_LIVE_URL: &str = "ws://ris-live.ripe.net/v1/ws/?client=rust-bgpkit-par fn main() { // connect to RIPE RIS Live websocket server let (mut socket, _response) = - connect(Url::parse(RIS_LIVE_URL).unwrap()) + connect(RIS_LIVE_URL) .expect("Can't connect to RIS Live websocket server"); // subscribe to messages from one collector diff --git a/src/parser/rislive/mod.rs b/src/parser/rislive/mod.rs index 917048f..9b654f4 100644 --- a/src/parser/rislive/mod.rs +++ b/src/parser/rislive/mod.rs @@ -10,7 +10,6 @@ Here is an example parsing stream data from one collector: use bgpkit_parser::parse_ris_live_message; use serde_json::json; use tungstenite::{connect, Message}; -use url::Url; const RIS_LIVE_URL: &str = "ws://ris-live.ripe.net/v1/ws/?client=rust-bgpkit-parser"; @@ -20,7 +19,7 @@ const RIS_LIVE_URL: &str = "ws://ris-live.ripe.net/v1/ws/?client=rust-bgpkit-par fn main() { // connect to RIPE RIS Live websocket server let (mut socket, _response) = - connect(Url::parse(RIS_LIVE_URL).unwrap()) + connect(RIS_LIVE_URL) .expect("Can't connect to RIS Live websocket server"); // subscribe to messages from one collector