diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-21 11:02:26 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-21 11:02:26 +0000 |
| commit | 5a254e2ab4741bc88c373ae1673c2ad9a7e6a588 (patch) | |
| tree | c26f6fb9186ac4c8d121349909689cd045f9d11f /bundle/src-tauri/src | |
| parent | c17775323baf93e0d9bd44a6f83cd32a986b6fcb (diff) | |
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 <noreply@anthropic.com>
Diffstat (limited to 'bundle/src-tauri/src')
| -rw-r--r-- | bundle/src-tauri/src/main.rs | 19 |
1 files changed, 19 insertions, 0 deletions
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<String, String> { + 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"); +} |
