{"id":31666717,"url":"https://github.com/fernandothedev/fiber","last_synced_at":"2026-02-14T22:04:40.856Z","repository":{"id":311494459,"uuid":"1043866697","full_name":"FernandoTheDev/fiber","owner":"FernandoTheDev","description":"Minimalist VM","archived":false,"fork":false,"pushed_at":"2025-09-06T22:04:08.000Z","size":3377,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-07T00:09:38.891Z","etag":null,"topics":["compiler","dlang","intermediate-representation","vitual-machine","vm"],"latest_commit_sha":null,"homepage":"","language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FernandoTheDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-08-24T19:29:41.000Z","updated_at":"2025-09-06T22:04:12.000Z","dependencies_parsed_at":"2025-08-24T23:25:59.148Z","dependency_job_id":"e2c4de37-3d2a-43ad-a8bd-eea5100f9bbf","html_url":"https://github.com/FernandoTheDev/fiber","commit_stats":null,"previous_names":["fernandothedev/fiber"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FernandoTheDev/fiber","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FernandoTheDev%2Ffiber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FernandoTheDev%2Ffiber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FernandoTheDev%2Ffiber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FernandoTheDev%2Ffiber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FernandoTheDev","download_url":"https://codeload.github.com/FernandoTheDev/fiber/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FernandoTheDev%2Ffiber/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278866938,"owners_count":26059671,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["compiler","dlang","intermediate-representation","vitual-machine","vm"],"created_at":"2025-10-07T23:56:10.229Z","updated_at":"2025-10-07T23:56:12.391Z","avatar_url":"https://github.com/FernandoTheDev.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.png\" width=\"250\" alt=\"fiber logo\"/\u003e\n\u003c/p\u003e\n\n# Fiber\n\nFiber is a custom-built virtual machine (VM) and compiler toolchain, designed from scratch with a focus on high-speed and optimized bytecode execution.\n\n---\n\n## The Architecture\n\nFiber utilizes a custom intermediate representation (IR), which allows for seamless integration with APIs from other programming languages. These APIs can generate the Fiber-IR, and the Fiber compiler can then automatically compile and execute the code.\n\n### Key Design Principles\n\n* **Memory-to-Memory Architecture:** The VM operates directly on memory addresses, eliminating the overhead of a register-based system for a cleaner, more efficient design.\n* **High Performance:** The entire toolchain achieves ultra-low execution times, with compilation and VM execution measured in microseconds.\n* **Bytecode Compression:** Drastically reduces the size of compiled binaries for faster distribution and loading.\n\n---\n\n## Getting Started\n\n### Prerequisites\n\n* A D compiler (DMD, LDC, or GDC).\n* Dub\n\n### Building\n\n```bash\n# Clone the repository\ngit clone https://github.com/fernandothedev/fiber.git\n\n# Navigate to the project directory\ncd fiber\n\n# Build the project using dub\ndub build --build=release\n```\n\n### Usage\n\n```bash\n# Compile and run a source file\n./fiber your_program.fir\n\n# Compile a source file to bytecode\n./fiber -o your_program.bc your_program.fir\n\n# Run a pre-compiled bytecode file\n./fiber your_program.bc\n\n# Enable debug mode to see compilation steps\n./fiber -d your_program.fir\n\n# Show execution statistics\n./fiber -s your_program.fir\n```\n\n### Example\n\nThe following code is compiled and executed by Fiber.\n\n```llvm\n.main {\n    x: int = 60\n    $0: int;\n    store $0, 9\n    $1: int;\n    add $1, $0, x\n    print $1\n    halt\n}\n```\n\nWith function calls:\n\n```llvm\n.main\n{\n    $0: int;\n    main_x: int = 60\n    main_y: int = 9\n\n    call sum(int main_x, int main_y), $0\n    print $0\n    halt\n}\n\nfn sum (sum_x, sum_y) int {\n    sum_0: int;\n    add sum_0, sum_x, sum_y\n    ret sum_0\n}\n```\n\nCompile and run\n\n```bash\n❯ ./fiber examples/hard.fir\n69\n```\n\nOr view the generated bytecode\n\n```bash\n❯ ./fiber examples/hard.fir -o hard.bc\nProgram saved to: hard.bc\nCompression: 541 -\u003e 32 tokens (5.9%)\n❯ cat hard.bc\nFIBERBC 26 512 70 101 114 110 97 110 100 111 68 101 118 6 1 9 1 2 1 0 7 2 12 70 105 98 101 114 MEMORY 60 F511\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffernandothedev%2Ffiber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffernandothedev%2Ffiber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffernandothedev%2Ffiber/lists"}