From e5a943ae81246dfc5bf24ec94b8e0f71a48f92bb Mon Sep 17 00:00:00 2001 From: Drew Galbraith Date: Sun, 18 May 2025 19:11:52 -0700 Subject: [PATCH] Rust XHCI scaffolding --- rust/Cargo.lock | 10 ++++++-- rust/Cargo.toml | 25 +++++++++++-------- rust/lib/client/voyageurs_client/Cargo.toml | 12 +++++++++ .../voyageurs_client}/build.rs | 2 +- .../voyageurs_client}/src/lib.rs | 0 .../voyageurs_client}/src/listener.rs | 0 rust/lib/voyageurs/Cargo.toml | 13 ---------- rust/sys/teton/Cargo.toml | 2 +- rust/sys/teton/src/main.rs | 2 +- rust/sys/teton/src/terminal.rs | 2 +- rust/sys/voyageurs/Cargo.toml | 7 ++++++ rust/sys/voyageurs/src/main.rs | 14 +++++++++++ rust/sys/yellowstone/Cargo.toml | 1 - 13 files changed, 59 insertions(+), 31 deletions(-) create mode 100644 rust/lib/client/voyageurs_client/Cargo.toml rename rust/lib/{voyageurs => client/voyageurs_client}/build.rs (82%) rename rust/lib/{voyageurs => client/voyageurs_client}/src/lib.rs (100%) rename rust/lib/{voyageurs => client/voyageurs_client}/src/listener.rs (100%) delete mode 100644 rust/lib/voyageurs/Cargo.toml create mode 100644 rust/sys/voyageurs/Cargo.toml create mode 100644 rust/sys/voyageurs/src/main.rs diff --git a/rust/Cargo.lock b/rust/Cargo.lock index f20f302..432d9ba 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -161,7 +161,7 @@ version = "0.1.0" dependencies = [ "mammoth", "victoriafalls", - "voyageurs", + "voyageurs_client", "yellowstone-yunq", ] @@ -192,6 +192,13 @@ dependencies = [ [[package]] name = "voyageurs" version = "0.1.0" +dependencies = [ + "mammoth", +] + +[[package]] +name = "voyageurs_client" +version = "0.1.0" dependencies = [ "mammoth", "yellowstone-yunq", @@ -206,7 +213,6 @@ dependencies = [ "denali_client", "mammoth", "victoriafalls", - "voyageurs", "yellowstone-yunq", "yunq", ] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index f1886f6..b31a682 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,16 +1,19 @@ [workspace] members = [ - "lib/client/denali_client", "lib/fs/ext2", - "lib/mammoth", "lib/pci", - "lib/voyageurs", - "lib/yellowstone", - "lib/yunq", - "lib/yunq-test", - "sys/denali", - "sys/teton", - "sys/victoriafalls", - "sys/yellowstone", - "usr/testbed", + "lib/client/denali_client", + "lib/client/voyageurs_client", + "lib/fs/ext2", + "lib/mammoth", + "lib/pci", + "lib/yellowstone", + "lib/yunq", + "lib/yunq-test", + "sys/denali", + "sys/teton", + "sys/victoriafalls", + "sys/voyageurs", + "sys/yellowstone", + "usr/testbed", ] resolver = "2" diff --git a/rust/lib/client/voyageurs_client/Cargo.toml b/rust/lib/client/voyageurs_client/Cargo.toml new file mode 100644 index 0000000..e3e432c --- /dev/null +++ b/rust/lib/client/voyageurs_client/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "voyageurs_client" +version = "0.1.0" +edition = "2021" + +[dependencies] +mammoth = { path = "../../mammoth" } +yellowstone-yunq = { path = "../../yellowstone" } +yunq = { path = "../../yunq" } + +[build-dependencies] +yunqc = { path = "../../../../yunq/rust" } diff --git a/rust/lib/voyageurs/build.rs b/rust/lib/client/voyageurs_client/build.rs similarity index 82% rename from rust/lib/voyageurs/build.rs rename to rust/lib/client/voyageurs_client/build.rs index 52b5dfc..f6f76ad 100644 --- a/rust/lib/voyageurs/build.rs +++ b/rust/lib/client/voyageurs_client/build.rs @@ -1,7 +1,7 @@ use std::fs; fn main() { - let input_file = "../../../sys/voyageurs/lib/voyageurs/voyageurs.yunq"; + let input_file = "../../../../sys/voyageurs/lib/voyageurs/voyageurs.yunq"; println!("cargo::rerun-if-changed={input_file}"); diff --git a/rust/lib/voyageurs/src/lib.rs b/rust/lib/client/voyageurs_client/src/lib.rs similarity index 100% rename from rust/lib/voyageurs/src/lib.rs rename to rust/lib/client/voyageurs_client/src/lib.rs diff --git a/rust/lib/voyageurs/src/listener.rs b/rust/lib/client/voyageurs_client/src/listener.rs similarity index 100% rename from rust/lib/voyageurs/src/listener.rs rename to rust/lib/client/voyageurs_client/src/listener.rs diff --git a/rust/lib/voyageurs/Cargo.toml b/rust/lib/voyageurs/Cargo.toml deleted file mode 100644 index e011e0c..0000000 --- a/rust/lib/voyageurs/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "voyageurs" -version = "0.1.0" -edition = "2021" - -[dependencies] -mammoth = { path = "../mammoth" } -yellowstone-yunq = { path = "../yellowstone" } -yunq = {path = "../yunq"} - -[build-dependencies] -yunqc = {path = "../../../yunq/rust"} - diff --git a/rust/sys/teton/Cargo.toml b/rust/sys/teton/Cargo.toml index baa787a..3df98f4 100644 --- a/rust/sys/teton/Cargo.toml +++ b/rust/sys/teton/Cargo.toml @@ -6,5 +6,5 @@ edition = "2021" [dependencies] mammoth = { path = "../../lib/mammoth" } victoriafalls = { path = "../victoriafalls" } -voyageurs = { path = "../../lib/voyageurs" } +voyageurs_client = { path = "../../lib/client/voyageurs_client/" } yellowstone-yunq = { path = "../../lib/yellowstone" } diff --git a/rust/sys/teton/src/main.rs b/rust/sys/teton/src/main.rs index 982beb7..b44dff6 100644 --- a/rust/sys/teton/src/main.rs +++ b/rust/sys/teton/src/main.rs @@ -9,7 +9,7 @@ mod psf; mod terminal; use mammoth::{debug, define_entry, zion::z_err_t}; -use voyageurs::listener; +use voyageurs_client::listener; define_entry!(); diff --git a/rust/sys/teton/src/terminal.rs b/rust/sys/teton/src/terminal.rs index 5c7d314..2cd46ce 100644 --- a/rust/sys/teton/src/terminal.rs +++ b/rust/sys/teton/src/terminal.rs @@ -6,7 +6,7 @@ use alloc::{ string::{String, ToString}, }; use victoriafalls::dir; -use voyageurs::listener::KeyboardHandler; +use voyageurs_client::listener::KeyboardHandler; pub struct Terminal { console: Console, diff --git a/rust/sys/voyageurs/Cargo.toml b/rust/sys/voyageurs/Cargo.toml new file mode 100644 index 0000000..e44085b --- /dev/null +++ b/rust/sys/voyageurs/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "voyageurs" +version = "0.1.0" +edition = "2024" + +[dependencies] +mammoth = { path = "../../lib/mammoth/" } diff --git a/rust/sys/voyageurs/src/main.rs b/rust/sys/voyageurs/src/main.rs new file mode 100644 index 0000000..bcbd530 --- /dev/null +++ b/rust/sys/voyageurs/src/main.rs @@ -0,0 +1,14 @@ +#![no_std] +#![no_main] + +extern crate alloc; + +use mammoth::{debug, define_entry, zion::z_err_t}; + +define_entry!(); + +#[unsafe(no_mangle)] +extern "C" fn main() -> z_err_t { + debug!("In Voyageurs"); + 0 +} diff --git a/rust/sys/yellowstone/Cargo.toml b/rust/sys/yellowstone/Cargo.toml index 6a89d4d..70e9995 100644 --- a/rust/sys/yellowstone/Cargo.toml +++ b/rust/sys/yellowstone/Cargo.toml @@ -7,6 +7,5 @@ edition = "2021" mammoth = { path = "../../lib/mammoth" } denali_client = { path = "../../lib/client/denali_client" } victoriafalls = { path = "../victoriafalls" } -voyageurs = { path = "../../lib/voyageurs" } yellowstone-yunq = { path = "../../lib/yellowstone" } yunq = { path = "../../lib/yunq" }