mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 08:08:13 +08:00
Massively reorganize and clean up the whole Rust codebase (#478)
* Massively reorganize and clean up the whole Rust codebase * Additional changes during code review
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
pub mod api;
|
||||
mod helpers;
|
||||
pub mod helpers;
|
||||
pub mod logging;
|
||||
pub mod type_translators;
|
||||
|
||||
use editor::message_prelude::FrontendMessage;
|
||||
use editor::message_prelude::*;
|
||||
|
||||
use logging::WasmLog;
|
||||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
@@ -12,13 +13,12 @@ use std::sync::atomic::AtomicBool;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
// Set up the persistent editor backend state
|
||||
static LOGGER: WasmLog = WasmLog;
|
||||
pub static EDITOR_HAS_CRASHED: AtomicBool = AtomicBool::new(false);
|
||||
pub static LOGGER: WasmLog = WasmLog;
|
||||
thread_local! {
|
||||
pub static EDITOR_INSTANCES: RefCell<HashMap<u64, (editor::Editor, api::JsEditorHandle)>> = RefCell::new(HashMap::new());
|
||||
}
|
||||
|
||||
pub static EDITOR_HAS_CRASHED: AtomicBool = AtomicBool::new(false);
|
||||
|
||||
// Initialize the backend
|
||||
#[wasm_bindgen(start)]
|
||||
pub fn init() {
|
||||
|
||||
Reference in New Issue
Block a user