{"id":13679044,"url":"https://github.com/ConsoleTVs/VirtualMachine","last_synced_at":"2025-04-29T16:30:40.958Z","repository":{"id":66335664,"uuid":"157266141","full_name":"ConsoleTVs/VirtualMachine","owner":"ConsoleTVs","description":"A simple virtual machine built with c++ that supports multiple types and operations :)","archived":false,"fork":false,"pushed_at":"2018-11-13T12:12:10.000Z","size":555,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T00:59:38.615Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/ConsoleTVs.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}},"created_at":"2018-11-12T19:38:11.000Z","updated_at":"2025-03-08T14:49:54.000Z","dependencies_parsed_at":"2024-01-14T15:21:35.610Z","dependency_job_id":"2f7fbeff-6cd1-4016-b060-3cfb82b16465","html_url":"https://github.com/ConsoleTVs/VirtualMachine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConsoleTVs%2FVirtualMachine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConsoleTVs%2FVirtualMachine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConsoleTVs%2FVirtualMachine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConsoleTVs%2FVirtualMachine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ConsoleTVs","download_url":"https://codeload.github.com/ConsoleTVs/VirtualMachine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251540031,"owners_count":21605833,"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":[],"created_at":"2024-08-02T13:01:01.317Z","updated_at":"2025-04-29T16:30:40.610Z","avatar_url":"https://github.com/ConsoleTVs.png","language":"C++","readme":"# Erik Virtual Machine\nThis is a stack based virtual machine under development. It is able\nto perform diferent operation on diferent kind of operands.\n\n- No dependencies required\n- Quite fast\n- Built as a library. (automatically builds itself as a static library)\n- Easy API with examples on sample/main.cpp\n- Youtube video stream of how I built it ([Click here](https://www.youtube.com/watch?v=hWkkY2M3lHQ))\n- Pure C++\n\n# How to build\n\n## Using the Makefile\n\n```\nmake library\n```\n\nThis will compile the library, creating a `vm.a` at `build/`. You may then statically link it to your project as you wish.\nFor the example provided (windows. Remove the .exe to build on linux):\n\n```\ng++ -std=c++11 -O3 sample/main.cpp -o bin/sample.exe build/vm.a\n```\n\nYou can also use the following command to build the library and the sample at the same time :)\n\n```\nmake\n```\n\nThis will compile the library, creating the .a at the same directory as mentioned above and will create the executable\nfile at `bin/` for the example provided.\n\n## Using manual compilation\n\n- To build the library\n\n```\ng++ -std=c++11 -O3 -c src/vm.cpp -o src/vm.o\ng++ -std=c++11 -O3 -c src/program.cpp -o src/program.o\ng++ -std=c++11 -O3 -c src/values.cpp -o src/values.o\nar rcs build/vm.a src/vm.o src/program.o src/values.o\nrm src/vm.o src/program.o src/values.o\n```\n\n- To build the library + the sample\n\n```\ng++ -std=c++11 -O3 -c src/vm.cpp -o src/vm.o\ng++ -std=c++11 -O3 -c src/program.cpp -o src/program.o\ng++ -std=c++11 -O3 -c src/values.cpp -o src/values.o\nar rcs build/vm.a src/vm.o src/program.o src/values.o\nrm src/vm.o src/program.o src/values.o\ng++ -std=c++11 -O3 sample/main.cpp -o bin/sample.exe build/vm.a\n```\n\n# Valid values supported\n\n- VALUE_INTEGER\n- VALUE_FLOAT\n- VALUE_BOOLEAN\n- VALUE_STRING\n- VALUE_LIST\n\n# Valid operations:\n\n- OP_CONSTANT\n- OP_ADD\n- OP_SUB\n- OP_MUL\n- OP_DIV\n- OP_PRINT\n- OP_EXIT\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FConsoleTVs%2FVirtualMachine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FConsoleTVs%2FVirtualMachine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FConsoleTVs%2FVirtualMachine/lists"}