feat: add rust browser terminal prototype

This commit is contained in:
zhangheng
2026-06-08 16:34:13 +08:00
commit fd056ce502
43 changed files with 10312 additions and 0 deletions

6
app_config/Cargo.toml Normal file
View File

@@ -0,0 +1,6 @@
[package]
name = "app_config"
version = "0.1.0"
edition = "2024"
[dependencies]

18
app_config/src/lib.rs Normal file
View File

@@ -0,0 +1,18 @@
pub struct SiteConfig;
impl SiteConfig {
pub const TITLE: &str = "BASE_PATH Demo";
pub const DESCRIPTION: &str = "A small Leptos SSR app for validating sub-path deployment.";
pub const BASE_URL: &str = "http://127.0.0.1:3100";
pub const BASE_PATH: &str = "/rustui";
pub fn with_base_path(path: &str) -> String {
if Self::BASE_PATH.is_empty() {
path.to_owned()
} else if path == "/" {
Self::BASE_PATH.to_owned()
} else {
format!("{}{}", Self::BASE_PATH, path)
}
}
}