···11[workspace]
22resolver = "2"
33-members = ["htmlshell"]
33+members = ["beavershell"]
4455# Copied from the main Cargo.toml to allow
66# workspace inheritance from component/ crates.
+7-7
build-arm64.sh
···2828export LDFLAGS="-L${SYSROOT}/lib/aarch64-linux-gnu -fuse-ld=lld"
29293030# Build without tray icon or global key support
3131-cargo build --target aarch64-unknown-linux-gnu --profile ${PROFILE} -p browserhtml \
3131+cargo build --target aarch64-unknown-linux-gnu --profile ${PROFILE} -p beaver \
3232 --no-default-features \
3333 --features="libservo/clipboard,js_jit,max_log_level,webgpu"
34343535-llvm-strip target/aarch64-unknown-linux-gnu/${PROFILE}/browserhtml
3535+llvm-strip target/aarch64-unknown-linux-gnu/${PROFILE}/beaver
36363737-REMOTE_DIR=/home/mobian/browserhtml
3737+REMOTE_DIR=/home/mobian/beaver
38383939echo "Pushing update..."
40404141-# Create the browserhtml directory if needed.
4242-ssh mobian@mobian 'mkdir -p /home/mobian/browserhtml'
4141+# Create the beaver directory if needed.
4242+ssh mobian@mobian 'mkdir -p /home/mobian/beaver'
43434444# rsync the binary
4545-rsync -vz --progress target/aarch64-unknown-linux-gnu/${PROFILE}/browserhtml \
4646- mobian@mobian:${REMOTE_DIR}/browserhtml
4545+rsync -vz --progress target/aarch64-unknown-linux-gnu/${PROFILE}/beaver \
4646+ mobian@mobian:${REMOTE_DIR}/beaver
47474848# rsync the resources
4949rsync -avz --progress resources mobian@mobian:${REMOTE_DIR}/
···109109 webviews.values().next().cloned()
110110 }
111111112112- /// Get the system webview (browserhtml shell UI).
112112+ /// Get the system webview (beaverhtml shell UI).
113113 pub(crate) fn system_webview(&self) -> Option<WebView> {
114114 let system_id = self.system_webview_id.get()?;
115115 self.webviews.borrow().get(&system_id).cloned()
···257257 }
258258 },
259259 WindowEvent::MouseInput { state, button, .. } => {
260260- // Send mouse events to the system webview (browserhtml shell) first.
260260+ // Send mouse events to the system webview (beaverhtml shell) first.
261261 // The shell's DOM hit testing will determine if events should be
262262 // forwarded to embedded webviews.
263263 if let Some(webview) = self.system_webview().or_else(|| self.first_webview()) {
···265265 }
266266 },
267267 WindowEvent::CursorMoved { position, .. } => {
268268- // Send mouse events to the system webview (browserhtml shell) first.
268268+ // Send mouse events to the system webview (beaverhtml shell) first.
269269 // The shell's DOM hit testing will determine if events should be
270270 // forwarded to embedded webviews.
271271 if let Some(webview) = self.system_webview().or_else(|| self.first_webview()) {
···283283 }
284284 },
285285 WindowEvent::MouseWheel { delta, .. } => {
286286- // Send wheel events to the system webview (browserhtml shell) first.
286286+ // Send wheel events to the system webview (beaverhtml shell) first.
287287 // The shell's DOM hit testing will determine if events should be
288288 // forwarded to embedded webviews.
289289 if let Some(webview) = self.system_webview().or_else(|| self.first_webview()) {
···311311 }
312312 },
313313 WindowEvent::Touch(touch) => {
314314- // Send touch events to the system webview (browserhtml shell) first.
314314+ // Send touch events to the system webview (beaverhtml shell) first.
315315 // The shell's DOM hit testing will determine if events should be
316316 // forwarded to embedded webviews.
317317 if let Some(webview) = self.system_webview().or_else(|| self.first_webview()) {
···5353 std::env::var("BROWSERHTML_PROFILE").unwrap_or_else(|_| "default".into())
5454}
55555656-/// Get the configuration directory for browserhtml.
5656+/// Get the configuration directory for beaver.
5757/// Returns None if the directory cannot be determined.
5858fn config_dir() -> Option<PathBuf> {
5959 #[cfg(target_os = "macos")]
6060 {
6161- dirs::data_dir().map(|d| d.join("BrowserHTML").join(profile_name()))
6161+ dirs::data_dir().map(|d| d.join("Beaver").join(profile_name()))
6262 }
6363 #[cfg(not(target_os = "macos"))]
6464 {
6565- dirs::config_dir().map(|d| d.join("browserhtml").join(profile_name()))
6565+ dirs::config_dir().map(|d| d.join("beaver").join(profile_name()))
6666 }
6767}
6868···7272 .expect("Failed to install crypto provider");
7373 crate::resources::init();
74747575- // Load browserhtml preferences from config directory
7575+ // Load beaver preferences from config directory
7676 if let Some(prefs_path) = config_dir().map(|d| d.join("prefs.json")) {
7777 if let Err(e) = prefs::load(&prefs_path) {
7878- log::warn!("Failed to load browserhtml preferences: {}", e);
7878+ log::warn!("Failed to load beaver preferences: {}", e);
7979 }
8080 }
8181···183183184184 // In Mobile simulation mode, start with a smaller window size
185185 let simulate_touch = matches!(
186186- get_embedder_pref("browserhtml.mobile_simulation"),
186186+ get_embedder_pref("beaver.mobile_simulation"),
187187 Some(PrefValue::Bool(true))
188188 );
189189···208208209209 // Check if mobile simulation is enabled
210210 let simulate_touch = matches!(
211211- get_embedder_pref("browserhtml.mobile_simulation"),
211211+ get_embedder_pref("beaver.mobile_simulation"),
212212 Some(PrefValue::Bool(true))
213213 );
214214···234234 .borrow_mut()
235235 .insert(webview_id, webview);
236236237237- // Set this as the system webview (the browserhtml shell UI)
237237+ // Set this as the system webview (the beaver shell UI)
238238 browser_window.system_webview_id.set(Some(webview_id));
239239240240 browser_window
···471471 new_pipeline_id: PipelineId,
472472 url: Url,
473473 ) {
474474- // Call JavaScript API on the parent (browserhtml shell) to create a new tab
474474+ // Call JavaScript API on the parent (beaver shell) to create a new tab
475475 // that adopts the pre-created webview using the provided IDs.
476476 // The IDs are serialized as strings since their internal structure is opaque.
477477 let script = format!(
···521521 }
522522523523 fn show_notification(&self, webview: WebView, notification: Notification) {
524524- // For browserhtml, notifications from embedded webviews are routed through
524524+ // For beaver, notifications from embedded webviews are routed through
525525 // the constellation and arrive as iframe events (embednotificationshow).
526526 // This delegate method is only called for non-embedded webviews, which
527527- // don't exist in browserhtml's architecture.
527527+ // don't exist in beaver's architecture.
528528 log::debug!(
529529 "Notification from non-embedded webview {:?}: {:?}",
530530 webview.id(),
···647647648648// Computes the index url depending on preferences and screen size.
649649fn index_url(event_loop: &ActiveEventLoop) -> String {
650650- let pref_override = match get_embedder_pref("browserhtml.mobile_simulation") {
650650+ let pref_override = match get_embedder_pref("beaver.mobile_simulation") {
651651 Some(PrefValue::Bool(value)) => value,
652652 _ => false,
653653 };
···4848 let tray_icon = match TrayIconBuilder::new()
4949 .with_menu(Box::new(menu))
5050 .with_icon(icon)
5151- .with_tooltip("Browser.HTML")
5151+ .with_tooltip("Beaver")
5252 .build()
5353 {
5454 Ok(icon) => icon,
···9797 let tray_icon = match TrayIconBuilder::new()
9898 .with_menu(Box::new(menu))
9999 .with_icon(icon)
100100- .with_tooltip("Browser.HTML")
100100+ .with_tooltip("Beaver")
101101 .build()
102102 {
103103 Ok(icon) => icon,
···204204205205/// Load the tray icon from embedded bytes.
206206fn load_icon() -> Option<Icon> {
207207- let file_path = crate::resources::resources_dir_path()
208208- .join("browserhtml")
207207+ let file_path = crate::resources::ancestor_dir_path("ui")
209208 .join("system")
210209 .join("logo.png");
211210
+3-3
htmlshell/src/vhost.rs
beavershell/src/vhost.rs
···9696impl PreferencesObserver for ServerState {
9797 fn prefs_changed(&self, changes: &[(&'static str, PrefValue)]) {
9898 for (name, value) in changes {
9999- if *name == "browserhtml.theme" {
9999+ if *name == "beaver.theme" {
100100 let PrefValue::Str(theme) = value else {
101101- error!("Unexpected value for browserhtml.theme: {value:?}");
101101+ error!("Unexpected value for beaver.theme: {value:?}");
102102 return;
103103 };
104104 *self.theme.lock() = theme.to_string();
···122122123123pub(crate) fn start_vhost(port: u16) {
124124 // Get the initial value from the embedder preferences.
125125- let theme = match get_embedder_pref("browserhtml.theme") {
125125+ let theme = match get_embedder_pref("beaver.theme") {
126126 Some(PrefValue::Str(value)) => value,
127127 _ => "default".to_owned(),
128128 };
···2323## Desktop builds
24242525- Update with `forkme apply`
2626-- Build with `cargo build -r -p browserhtml`
2727-- Run with `cargo run -r -p browserhtml` or directly from the `target` directory as usual for Rust projects.
2626+- Build with `cargo build -r -p beaver`
2727+- Run with `cargo run -r -p beaver` or directly from the `target` directory as usual for Rust projects.
28282929The current UI allows multiple windows, and each one is a simple tiling window manager. There is also a floating search window.
3030···4949Then build with `./build-arm64.sh` or `./build-arm64.sh production`
50505151The build script expects to be able to ssh with key authentication to `mobian@mobian`. You can then run on device with this command:
5252-`mobian@mobian:~$ ./browserhtml/browserhtml`
5252+`mobian@mobian:~$ ./beaver/beaver`
53535454Note that you will have to set these 2 environment variables:
5555