From 35b2b10ec151dc77640f6bbe5b4e87a35d2dd613 Mon Sep 17 00:00:00 2001 From: webbeef Date: Fri, 6 Mar 2026 17:13:32 -0800 Subject: [PATCH] build: move the shell under crates/beaver_shell Signed-off-by: webbeef --- Cargo.lock | 2 +- Cargo.toml | 2 +- build-arm64.sh | 8 ++++---- {beavershell => crates/beaver_shell}/Cargo.toml | 12 ++++++++---- .../beaver_shell}/src/browser_window.rs | 0 {beavershell => crates/beaver_shell}/src/hotkeys.rs | 0 {beavershell => crates/beaver_shell}/src/keyutils.rs | 0 {beavershell => crates/beaver_shell}/src/main.rs | 0 {beavershell => crates/beaver_shell}/src/prefs.rs | 0 .../beaver_shell}/src/protocols/mod.rs | 0 .../beaver_shell}/src/protocols/resource.rs | 0 .../beaver_shell}/src/resources.rs | 0 .../beaver_shell}/src/touch_event_simulator.rs | 0 {beavershell => crates/beaver_shell}/src/tray.rs | 0 {beavershell => crates/beaver_shell}/src/vhost.rs | 0 readme.md | 4 ++-- 16 files changed, 16 insertions(+), 12 deletions(-) rename {beavershell => crates/beaver_shell}/Cargo.toml (86%) rename {beavershell => crates/beaver_shell}/src/browser_window.rs (100%) rename {beavershell => crates/beaver_shell}/src/hotkeys.rs (100%) rename {beavershell => crates/beaver_shell}/src/keyutils.rs (100%) rename {beavershell => crates/beaver_shell}/src/main.rs (100%) rename {beavershell => crates/beaver_shell}/src/prefs.rs (100%) rename {beavershell => crates/beaver_shell}/src/protocols/mod.rs (100%) rename {beavershell => crates/beaver_shell}/src/protocols/resource.rs (100%) rename {beavershell => crates/beaver_shell}/src/resources.rs (100%) rename {beavershell => crates/beaver_shell}/src/touch_event_simulator.rs (100%) rename {beavershell => crates/beaver_shell}/src/tray.rs (100%) rename {beavershell => crates/beaver_shell}/src/vhost.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 80db1e2..41c2640 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -604,7 +604,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" [[package]] -name = "beaver" +name = "beaver-shell" version = "0.1.0" dependencies = [ "axum", diff --git a/Cargo.toml b/Cargo.toml index fe24ab0..d67017d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] resolver = "2" -members = ["beavershell"] +members = ["crates/beaver_shell"] # Copied from the main Cargo.toml to allow # workspace inheritance from component/ crates. diff --git a/build-arm64.sh b/build-arm64.sh index e6307d0..7afb154 100755 --- a/build-arm64.sh +++ b/build-arm64.sh @@ -28,11 +28,11 @@ export BINDGEN_EXTRA_CLANG_ARGS="--sysroot=${SYSROOT} $CXX_INCLUDES" export LDFLAGS="-L${SYSROOT}/lib/aarch64-linux-gnu -fuse-ld=lld" # Build without tray icon or global key support -cargo build --target aarch64-unknown-linux-gnu --profile ${PROFILE} -p beaver \ +cargo build --target aarch64-unknown-linux-gnu --profile ${PROFILE} -p beaver-shell \ --no-default-features \ --features="libservo/clipboard,js_jit,max_log_level,webgpu" -llvm-strip target/aarch64-unknown-linux-gnu/${PROFILE}/beaver +llvm-strip target/aarch64-unknown-linux-gnu/${PROFILE}/beavershell REMOTE_DIR=/home/mobian/beaver @@ -42,8 +42,8 @@ echo "Pushing update..." ssh mobian@mobian 'mkdir -p /home/mobian/beaver' # rsync the binary -rsync -vz --progress target/aarch64-unknown-linux-gnu/${PROFILE}/beaver \ - mobian@mobian:${REMOTE_DIR}/beaver +rsync -vz --progress target/aarch64-unknown-linux-gnu/${PROFILE}/beavershell \ + mobian@mobian:${REMOTE_DIR}/beavershell # rsync the resources rsync -avz --progress resources mobian@mobian:${REMOTE_DIR}/ diff --git a/beavershell/Cargo.toml b/crates/beaver_shell/Cargo.toml similarity index 86% rename from beavershell/Cargo.toml rename to crates/beaver_shell/Cargo.toml index d965459..d0cb8b0 100644 --- a/beavershell/Cargo.toml +++ b/crates/beaver_shell/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "beaver" +name = "beaver-shell" license = "AGPL-3.0-or-later" version.workspace = true rust-version.workspace = true @@ -36,15 +36,15 @@ embedder_traits = { workspace = true } headers = { workspace = true } image = { workspace = true } keyboard-types = { workspace = true } -libservo = { path = "../source/components/servo", features = ["background_hang_monitor", "bluetooth"], default-features = false } +libservo = { path = "../../source/components/servo", features = ["background_hang_monitor", "bluetooth"], default-features = false } log = { workspace = true } mime_guess = { workspace = true } parking_lot = { workspace = true } rustls = { workspace = true, features = ["aws-lc-rs"] } serde = { workspace = true } serde_json = { workspace = true } -servo-config = { path = "../source/components/config" } -servo-config-macro = { path = "../source/components/config/macro" } +servo-config = { path = "../../source/components/config" } +servo-config-macro = { path = "../../source/components/config/macro" } tokio = { workspace = true } tower = "0.5" tower-http = { version = "0.6", features = ["async-compression", "compression-zstd", "cors", "fs"] } @@ -60,3 +60,7 @@ global-hotkey = { version = "0.7", optional = true } [target.'cfg(target_os = "linux")'.dependencies] gtk = { version = "0.18", optional = true } + +[[bin]] +name = "beavershell" +path = "src/main.rs" diff --git a/beavershell/src/browser_window.rs b/crates/beaver_shell/src/browser_window.rs similarity index 100% rename from beavershell/src/browser_window.rs rename to crates/beaver_shell/src/browser_window.rs diff --git a/beavershell/src/hotkeys.rs b/crates/beaver_shell/src/hotkeys.rs similarity index 100% rename from beavershell/src/hotkeys.rs rename to crates/beaver_shell/src/hotkeys.rs diff --git a/beavershell/src/keyutils.rs b/crates/beaver_shell/src/keyutils.rs similarity index 100% rename from beavershell/src/keyutils.rs rename to crates/beaver_shell/src/keyutils.rs diff --git a/beavershell/src/main.rs b/crates/beaver_shell/src/main.rs similarity index 100% rename from beavershell/src/main.rs rename to crates/beaver_shell/src/main.rs diff --git a/beavershell/src/prefs.rs b/crates/beaver_shell/src/prefs.rs similarity index 100% rename from beavershell/src/prefs.rs rename to crates/beaver_shell/src/prefs.rs diff --git a/beavershell/src/protocols/mod.rs b/crates/beaver_shell/src/protocols/mod.rs similarity index 100% rename from beavershell/src/protocols/mod.rs rename to crates/beaver_shell/src/protocols/mod.rs diff --git a/beavershell/src/protocols/resource.rs b/crates/beaver_shell/src/protocols/resource.rs similarity index 100% rename from beavershell/src/protocols/resource.rs rename to crates/beaver_shell/src/protocols/resource.rs diff --git a/beavershell/src/resources.rs b/crates/beaver_shell/src/resources.rs similarity index 100% rename from beavershell/src/resources.rs rename to crates/beaver_shell/src/resources.rs diff --git a/beavershell/src/touch_event_simulator.rs b/crates/beaver_shell/src/touch_event_simulator.rs similarity index 100% rename from beavershell/src/touch_event_simulator.rs rename to crates/beaver_shell/src/touch_event_simulator.rs diff --git a/beavershell/src/tray.rs b/crates/beaver_shell/src/tray.rs similarity index 100% rename from beavershell/src/tray.rs rename to crates/beaver_shell/src/tray.rs diff --git a/beavershell/src/vhost.rs b/crates/beaver_shell/src/vhost.rs similarity index 100% rename from beavershell/src/vhost.rs rename to crates/beaver_shell/src/vhost.rs diff --git a/readme.md b/readme.md index f5e3af2..ddf6cac 100644 --- a/readme.md +++ b/readme.md @@ -23,8 +23,8 @@ We hang out on [Servo's zulip](https://servo.zulipchat.com) if you want to chat ## Desktop builds - Update with `forkme apply` -- Build with `cargo build -r -p beaver` -- Run with `cargo run -r -p beaver` or directly from the `target` directory as usual for Rust projects. +- Build with `cargo build -r -p beaver-shell` +- Run with `cargo run -r -p beaver-shell` or directly from the `target` directory as usual for Rust projects. The current UI allows multiple windows, and each one is a simple tiling window manager. There is also a floating search window. -- 2.54.0