{"id":20286673,"url":"https://github.com/yezzfusl/ethervm","last_synced_at":"2026-01-23T03:52:39.089Z","repository":{"id":251836766,"uuid":"838576681","full_name":"yezzfusl/EtherVM","owner":"yezzfusl","description":"Rust virtual machine.","archived":false,"fork":false,"pushed_at":"2024-08-06T01:12:06.000Z","size":2051,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T06:34:06.049Z","etag":null,"topics":["cpu-emulation","custom-instruction-set","efficient-vm-design","embedded-systems","low-level-programming","memory-management","open-source-vm","rust-programming","system-emulation","systems-programming","virtual-machine"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yezzfusl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-05T23:53:09.000Z","updated_at":"2024-08-12T12:15:22.000Z","dependencies_parsed_at":"2024-08-06T03:27:47.954Z","dependency_job_id":"ce76d488-8e24-4ce7-a2bf-e6768f62f9d3","html_url":"https://github.com/yezzfusl/EtherVM","commit_stats":null,"previous_names":["yezzfusl/ethervm"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yezzfusl%2FEtherVM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yezzfusl%2FEtherVM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yezzfusl%2FEtherVM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yezzfusl%2FEtherVM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yezzfusl","download_url":"https://codeload.github.com/yezzfusl/EtherVM/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248367079,"owners_count":21092099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpu-emulation","custom-instruction-set","efficient-vm-design","embedded-systems","low-level-programming","memory-management","open-source-vm","rust-programming","system-emulation","systems-programming","virtual-machine"],"created_at":"2024-11-14T14:36:06.022Z","updated_at":"2026-01-23T03:52:34.068Z","avatar_url":"https://github.com/yezzfusl.png","language":"Rust","readme":"# EtherVM\nA lightweight, efficient virtual machine implementation in Rust, designed for educational purposes and as a foundation for more complex emulation projects.\n\n## Features\n\n### 1. CPU Emulation\n- Basic CPU structure with registers and program counter\n- Instruction fetch-decode-execute cycle\n- Initial instruction set with basic arithmetic operations (ADD, SUB, MUL, DIV)\n- Error handling for unknown opcodes and division by zero\n- Unit tests for arithmetic operations\n\n### 2. Memory Management Unit \n- Implementation of a Memory Management Unit (MMU)\n- 64KB of emulated memory\n- Byte and word (32-bit) read/write operations\n- Integration of MMU with CPU for instruction fetching and data operations\n- LOAD and STORE instructions for memory access\n- Extended unit tests for memory operations\n\n### 3. I/O Operations \n- IOController and IODevice trait for managing input/output operations\n- ConsoleDevice implementation for basic console I/O\n- INPUT and OUTPUT instructions added to the CPU\n- MockIOController for testing I/O operations without actual console interaction\n- Flexible architecture allowing easy addition of new I/O devices\n\n### 4. Expanded Instruction Set \n- Logical operations: AND, OR, XOR, NOT\n- Shift operations: SHL (shift left), SHR (shift right)\n- Comparison operation (CMP) with flags register\n- Control flow instructions:\n  - JMP (unconditional jump)\n  - JE (jump if equal)\n  - JNE (jump if not equal)\n  - JG (jump if greater)\n  - JL (jump if less)\n- Modified instruction decoding to accommodate the expanded set\n- Comprehensive unit tests for new instructions and operations\n\n## Project Structure\n- src/\n- ├── main.rs       # Entry point of the application\n- ├── cpu.rs        # CPU implementation with instruction set\n- ├── memory.rs     # Memory Management Unit implementation\n- └── io.rs         # I/O Controller and devices\n\n## Usage\n\n- To build and run the virtual machine:\n    - `cargo build`\n    - `cargo run`\n\n- To run the tests:\n    - `cargo test` \n\n## Future Improvements\n\n- Implement a simple assembler for easier program input\n- Add more complex I/O devices (e.g., virtual disk, network interface)\n- Implement interrupt handling and system calls\n- Create a debugger interface for step-by-step execution and memory inspection\n\n## Contributing\nContributions are welcome! Please feel free to submit a Pull Request.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyezzfusl%2Fethervm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyezzfusl%2Fethervm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyezzfusl%2Fethervm/lists"}