From 5a254e2ab4741bc88c373ae1673c2ad9a7e6a588 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Wed, 21 Oct 2026 11:02:26 +0000 Subject: feat(bundle): add the Tauri editor with shared Dark+ language support Add a single-document Monaco editor, native file dialogs, save handling and prefilled input/output panels. Reuse the plugin's grammar and editor core. Verify frontend behavior and compile the desktop app on Linux. Co-Authored-By: Claude Opus 5.5 --- bundle/src-tauri/src/main.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 bundle/src-tauri/src/main.rs (limited to 'bundle/src-tauri/src') diff --git a/bundle/src-tauri/src/main.rs b/bundle/src-tauri/src/main.rs new file mode 100644 index 0000000..34b1b70 --- /dev/null +++ b/bundle/src-tauri/src/main.rs @@ -0,0 +1,19 @@ +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] + +#[tauri::command] +fn read_file(path: String) -> Result { + std::fs::read_to_string(path).map_err(|error| error.to_string()) +} + +#[tauri::command] +fn write_file(path: String, text: String) -> Result<(), String> { + std::fs::write(path, text).map_err(|error| error.to_string()) +} + +fn main() { + tauri::Builder::default() + .plugin(tauri_plugin_dialog::init()) + .invoke_handler(tauri::generate_handler![read_file, write_file]) + .run(tauri::generate_context!()) + .expect("Could not start CPSC Bundle"); +} -- cgit v1.3.1-4-g156e