feat: Unified registry and major code cleanup by ChatGPT5
- Unified Box Registry: Replaced 600+ line match statement with clean factory pattern - Code cleanup: Removed unused imports, variables, and dead code - Import fixes: Fixed RangeBox, NullBox, MapBox imports - Transport Debug: Added Debug trait implementation for Transport interface - WASM build: Successfully tested with wasm_playground preset ready for integration - Performance: Build time stable, WASM package generated successfully (1.89MB) This commit represents a major architectural improvement with the unified registry system now fully operational, reducing code duplication and improving maintainability. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -7,6 +7,8 @@
|
||||
// 🌐 WebAssembly support
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
use wasm_bindgen::prelude::*;
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
use crate::box_factory::builtin::BuiltinGroups;
|
||||
|
||||
pub mod box_trait;
|
||||
pub mod boxes;
|
||||
@ -109,7 +111,7 @@ impl NyashWasm {
|
||||
console_error_panic_hook::set_once();
|
||||
|
||||
// Create interpreter with browser-specific setup
|
||||
let interpreter = NyashInterpreter::new();
|
||||
let interpreter = NyashInterpreter::new_with_groups(BuiltinGroups::wasm_playground());
|
||||
|
||||
// Register browser-specific boxes
|
||||
// ConsoleBox is available as a constructor: console = new ConsoleBox()
|
||||
|
||||
Reference in New Issue
Block a user