From 8bd823d3e667fe8a2147599714d6b9c3af785a78 Mon Sep 17 00:00:00 2001 From: Eric Mikulin Date: Wed, 31 Jan 2024 10:15:30 -0800 Subject: [PATCH] Rust rpi5 support (#1215) --- .github/workflows/rust-demos.yml | 2 +- .github/workflows/rust.yml | 2 +- binding/rust/Cargo.toml | 2 +- binding/rust/src/util.rs | 3 ++- demo/rust/filedemo/Cargo.lock | 6 +++--- demo/rust/filedemo/Cargo.toml | 4 ++-- demo/rust/micdemo/Cargo.lock | 10 +++++----- demo/rust/micdemo/Cargo.toml | 6 +++--- 8 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/rust-demos.yml b/.github/workflows/rust-demos.yml index 53b903de13..43e4f8fd46 100644 --- a/.github/workflows/rust-demos.yml +++ b/.github/workflows/rust-demos.yml @@ -61,7 +61,7 @@ jobs: strategy: matrix: - machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson] + machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6d022b3e75..0d08b287c1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -91,7 +91,7 @@ jobs: strategy: matrix: - machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson] + machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, jetson] steps: - uses: actions/checkout@v3 diff --git a/binding/rust/Cargo.toml b/binding/rust/Cargo.toml index 02b1e4257a..00f45ac717 100644 --- a/binding/rust/Cargo.toml +++ b/binding/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pv_porcupine" -version = "3.0.1" +version = "3.0.2" edition = "2018" description = "The Rust bindings for Picovoice's Porcupine library" license = "Apache-2.0" diff --git a/binding/rust/src/util.rs b/binding/rust/src/util.rs index 604548307e..82f730a8f5 100644 --- a/binding/rust/src/util.rs +++ b/binding/rust/src/util.rs @@ -19,7 +19,7 @@ const DEFAULT_RELATIVE_LIBRARY_DIR: &str = "lib/"; const DEFAULT_RELATIVE_MODEL_PATH: &str = "lib/common/porcupine_params.pv"; #[allow(dead_code)] -const RPI_MACHINES: [&str; 4] = ["arm11", "cortex-a7", "cortex-a53", "cortex-a72"]; +const RPI_MACHINES: [&str; 5] = ["arm11", "cortex-a7", "cortex-a53", "cortex-a72", "cortex-a76"]; #[allow(dead_code)] const JETSON_MACHINES: [&str; 1] = ["cortex-a57"]; @@ -54,6 +54,7 @@ fn find_machine_type() -> String { "0xd03" => "cortex-a53", "0xd07" => "cortex-a57", "0xd08" => "cortex-a72", + "0xd0b" => "cortex-a76", "0xc08" => "beaglebone", _ => "unsupported", }; diff --git a/demo/rust/filedemo/Cargo.lock b/demo/rust/filedemo/Cargo.lock index 97e2272ab7..7241aa9dad 100644 --- a/demo/rust/filedemo/Cargo.lock +++ b/demo/rust/filedemo/Cargo.lock @@ -135,9 +135,9 @@ dependencies = [ [[package]] name = "pv_porcupine" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d53e53572c96150545da9c23aca8ad76550f7117e6bbb0ab16ae6a4e914946" +checksum = "6e6218ff1a325195f04a009398566e9eb343ccbfccce203b31ba3b82eb3cac63" dependencies = [ "libc", "libloading", @@ -145,7 +145,7 @@ dependencies = [ [[package]] name = "pv_porcupine_filedemo" -version = "3.0.0" +version = "3.0.2" dependencies = [ "chrono", "clap", diff --git a/demo/rust/filedemo/Cargo.toml b/demo/rust/filedemo/Cargo.toml index a416204e49..8b69976714 100644 --- a/demo/rust/filedemo/Cargo.toml +++ b/demo/rust/filedemo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pv_porcupine_filedemo" -version = "3.0.0" +version = "3.0.2" edition = "2018" [dependencies] @@ -8,4 +8,4 @@ chrono = "0.4.19" clap = "2.33.3" hound = "3.4.0" itertools = "0.10.1" -pv_porcupine = "=3.0.1" \ No newline at end of file +pv_porcupine = "=3.0.2" diff --git a/demo/rust/micdemo/Cargo.lock b/demo/rust/micdemo/Cargo.lock index 923dca7170..978a6eebac 100644 --- a/demo/rust/micdemo/Cargo.lock +++ b/demo/rust/micdemo/Cargo.lock @@ -235,9 +235,9 @@ dependencies = [ [[package]] name = "pv_porcupine" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d53e53572c96150545da9c23aca8ad76550f7117e6bbb0ab16ae6a4e914946" +checksum = "6e6218ff1a325195f04a009398566e9eb343ccbfccce203b31ba3b82eb3cac63" dependencies = [ "libc", "libloading", @@ -245,7 +245,7 @@ dependencies = [ [[package]] name = "pv_porcupine_micdemo" -version = "3.0.0" +version = "3.0.2" dependencies = [ "chrono", "clap", @@ -258,9 +258,9 @@ dependencies = [ [[package]] name = "pv_recorder" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40be1d15bef993d0b923720589479d4d2e93e9fb6286328e2551f0fdbf45de31" +checksum = "28cb1418c740637db95cb7aea6052d655f5affc8e89a86ab999d1318e3b79a4e" dependencies = [ "libc", "libloading", diff --git a/demo/rust/micdemo/Cargo.toml b/demo/rust/micdemo/Cargo.toml index f38ad7fa2e..df0cc3bee0 100644 --- a/demo/rust/micdemo/Cargo.toml +++ b/demo/rust/micdemo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pv_porcupine_micdemo" -version = "3.0.0" +version = "3.0.2" edition = "2018" [dependencies] @@ -9,5 +9,5 @@ clap = "2.33.3" ctrlc = "3.1.9" hound = "3.4.0" itertools = "0.10.1" -pv_porcupine = "=3.0.1" -pv_recorder = "=1.2.1" +pv_porcupine = "=3.0.2" +pv_recorder = "=1.2.2"