How guillex7/wasm2010 works
• User Interface: Represent the front end, built primarily using Vue.js components. In the file tree you have a clear separation with components located under src/components (with dedicated subdirectories for the assembler and emulator interfaces).
• State Management: Emphasize the roles of the Vue “stores” (e.g., assembler.ts, emulator.ts, global.ts) which manage the application state.
• Core WebAssembly Engine: Highlight the WASM module development contained in src/core/wasm. Note that this part is implemented in C (with its own CMakeLists.txt and Makefile), making it independent from the UI, and is responsible for the low-level execution and simulation.
• Utility and Core Logic: Include a component for TypeScript business logic in src/core/ts (handling core computation, I/O abstraction, and system logic) which interacts directly with the UI and WebAssembly modules.
• Assets and Styling: Although less critical in terms of architecture, you may show a subsidiary branch to indicate dedicated directories for assets like fonts and styles, ensuring that the UI is well-supported.
• Documentation & Build/Deployment Setup: Optionally mark the presence of Docker, webpack configuration, and other build tools (e.g., Dockerfile, webpack.config.js) as well as the official documentation found in the docs folder.
Relationships and interactions
• User actions in the web interface (input via the assembler or emulator panels) trigger state changes managed by the Vue stores.
• The state management layer communicates with the core logic layer (TypeScript modules under src/core/ts), which then delegates tasks to the WASM engine (compiled from the C code in src/core/wasm).
• The WASM engine encapsulates the computational core (assembler and emulator functionality) and sends back execution results, debugging information, or visual signal data to the UI.
Architectural patterns and principles
• Frontend MVC/MVVM Pattern: The separation of components (Vue view components, stores for state, and central logic) demonstrates a modular design.
• Layered Architecture: Distinct layers (Presentation/UI, Application Logic, and WASM Engine) should be visible, showcasing a clear separation of responsibilities.
• Integration via WebAssembly: Emphasize the separation of the high-level UI written in JavaScript/TypeScript and the low-level performance-critical WASM module written in C. This integration is a key design principle ensuring portability and reusability.
Technologies, frameworks, and libraries
• Frontend Framework: Vue.js (embedding components like App.vue, WasmAssembler.vue, and WasmEmulator.vue).
• State Management: Vue stores, as coded in several files in the src/stores directory.
• WebAssembly: WASM modules built through C (using CMake and Makefile) found in src/core/wasm.
• Tooling: Webpack for bundling (webpack.config.js) and Docker for containerized builds (Dockerfile).