Discover a texrra-web sibling checkout

The repository is checked out as texrra-engine next to texrra-web, but
find_web_root only looked for ../web and ./web, so a plain
`cargo run --release -- serve examples/hello.tex 4174` served the "frontend not
found" page. The search now also accepts ../texrra-web and ./texrra-web, and the
startup warning names the sibling checkout. README and STATUS document the
accepted layouts.

Verified without TEXRRA_WEB_DIR: the server printed "Serving the web frontend
from ../texrra-web" and GET / returned the editor index.
This commit is contained in:
gloamxun committed 2026-10-27 12:56:13 +08:00
1 parent 254fd4a9a1
commit fab26234fc
3 files changed
+12 -6

No files matched your search

+7 -2
View File
@@ -66,7 +66,7 @@ fn run() -> Result<(), String> {
match &web_root {
Some(path) => println!("Serving the web frontend from {}", path.display()),
None => println!(
"warning: no web frontend found; clone texrra-web and set TEXRRA_WEB_DIR to its directory"
"warning: no web frontend found; clone texrra-web next to this checkout, or set TEXRRA_WEB_DIR to its directory"
),
}
@@ -273,7 +273,12 @@ fn find_web_root() -> Result<Option<PathBuf>, String> {
}
return Ok(Some(path));
}
for candidate in [Path::new("../web"), Path::new("web")] {
for candidate in [
Path::new("../web"),
Path::new("web"),
Path::new("../texrra-web"),
Path::new("texrra-web"),
] {
if candidate.join("index.html").is_file() {
return Ok(Some(candidate.to_path_buf()));
}