mirror of
https://github.com/marcoallegretti/WEFT_OS.git
synced 2026-03-26 17:03:09 +00:00
fix(shell): gate servo-embed-only modules
This commit is contained in:
parent
fedd0e8bbf
commit
84f82fbadf
2 changed files with 12 additions and 8 deletions
|
|
@ -1,4 +1,6 @@
|
|||
#[cfg(feature = "servo-embed")]
|
||||
mod protocols;
|
||||
#[cfg(feature = "servo-embed")]
|
||||
mod shell_client;
|
||||
|
||||
#[cfg(feature = "servo-embed")]
|
||||
|
|
@ -34,17 +36,17 @@ fn main() -> anyhow::Result<()> {
|
|||
fn appd_ws_port() -> u16 {
|
||||
if let Ok(runtime_dir) = std::env::var("XDG_RUNTIME_DIR") {
|
||||
let port_file = std::path::PathBuf::from(runtime_dir).join("weft/appd.wsport");
|
||||
if let Ok(s) = std::fs::read_to_string(port_file) {
|
||||
if let Ok(n) = s.trim().parse() {
|
||||
return n;
|
||||
}
|
||||
}
|
||||
}
|
||||
if let Ok(s) = std::env::var("WEFT_APPD_WS_PORT") {
|
||||
if let Ok(n) = s.parse() {
|
||||
if let Ok(s) = std::fs::read_to_string(port_file)
|
||||
&& let Ok(n) = s.trim().parse()
|
||||
{
|
||||
return n;
|
||||
}
|
||||
}
|
||||
if let Ok(s) = std::env::var("WEFT_APPD_WS_PORT")
|
||||
&& let Ok(n) = s.parse()
|
||||
{
|
||||
return n;
|
||||
}
|
||||
7410
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ use anyhow::Context;
|
|||
mod embedder;
|
||||
#[cfg(feature = "servo-embed")]
|
||||
mod keyutils;
|
||||
#[cfg(feature = "servo-embed")]
|
||||
mod protocols;
|
||||
#[cfg(feature = "servo-embed")]
|
||||
mod shell_client;
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
|
|
|
|||
Loading…
Reference in a new issue