mirror of
https://github.com/delibae/claude-prism.git
synced 2026-10-07 02:58:00 +00:00
- Isolate tectonic compilation in subprocess to prevent font cache assertion crash on retry (fixes #67) - Fix unreachable pattern warning in lib.rs by merging duplicate WindowEvent::Focused match arms - Add editor shortcuts: Cmd+B (bold), Cmd+I (italic), Cmd+/ (comment) - Add Tab/Shift-Tab indent support in CodeMirror editor - Fix WebKit rendering artifacts with translateZ(0) on .cm-scroller - Force recompile on button click and Cmd+Enter (skip generation check) - Add minimum 500ms compile spinner for visual feedback Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
22 lines
929 B
Rust
22 lines
929 B
Rust
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
|
|
|
fn main() {
|
|
// Hidden CLI mode: when invoked with `--tectonic-compile <work_dir> <main_file>`,
|
|
// run tectonic in this subprocess and exit. This isolates tectonic's global C state
|
|
// so that a failed compilation doesn't poison the font cache for subsequent runs.
|
|
let args: Vec<String> = std::env::args().collect();
|
|
if args.len() >= 4 && args[1] == "--tectonic-compile" {
|
|
let work_dir = std::path::Path::new(&args[2]);
|
|
let main_file = &args[3];
|
|
match claude_prism_desktop_lib::tectonic_compile_subprocess(work_dir, main_file) {
|
|
Ok(()) => std::process::exit(0),
|
|
Err(e) => {
|
|
eprintln!("{}", e);
|
|
std::process::exit(1);
|
|
}
|
|
}
|
|
}
|
|
|
|
claude_prism_desktop_lib::run()
|
|
}
|