{"id":20230113,"url":"https://github.com/lochbrunner/charlie","last_synced_at":"2025-04-10T17:51:13.630Z","repository":{"id":43501140,"uuid":"60152321","full_name":"lochbrunner/charlie","owner":"lochbrunner","description":"A learning project: Compiles C-Code to Byte-Code and runs it in a virtual machine.","archived":false,"fork":false,"pushed_at":"2022-12-11T19:18:19.000Z","size":8162,"stargazers_count":8,"open_issues_count":7,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T15:41:30.732Z","etag":null,"topics":["bytecode-compiler","debugger","virtual-machine"],"latest_commit_sha":null,"homepage":"","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/lochbrunner.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}},"created_at":"2016-06-01T06:45:29.000Z","updated_at":"2024-01-13T23:55:22.000Z","dependencies_parsed_at":"2023-01-27T05:15:19.570Z","dependency_job_id":null,"html_url":"https://github.com/lochbrunner/charlie","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/lochbrunner%2Fcharlie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lochbrunner%2Fcharlie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lochbrunner%2Fcharlie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lochbrunner%2Fcharlie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lochbrunner","download_url":"https://codeload.github.com/lochbrunner/charlie/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248262433,"owners_count":21074308,"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":["bytecode-compiler","debugger","virtual-machine"],"created_at":"2024-11-14T07:38:17.942Z","updated_at":"2025-04-10T17:51:13.612Z","avatar_url":"https://github.com/lochbrunner.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Charlie\r\n\r\nA learning project: Compiles C-Code to Byte-Code and runs it in a virtual machine.\r\n\r\n![](./docs/assets/vscode-adapter.gif)\r\n\r\n## Prerequisites\r\n\r\n* Boost C++ Library\r\n* CMake\r\n\r\n## Build\r\n\r\nRun `./configure` to create the build directory and the make files.\r\n\r\nRUn `cmake --build .` inside the `build-debug` directory to build the binaries into `build-debug/bin` and `build-debug/lib`.\r\n\r\n## Usage\r\n\r\n### The Console\r\n\r\nType into the console\r\n\r\ncharlie build where `\u003centry\u003e` is your entry C++ file in which a `main` function must be defined.\r\nFor now the compiler only supports source files. Note the ending `.cc` willl be append to your given filename.\r\n\r\n### The Library\r\n\r\nUsage example:\r\n``` c++\r\nusing namespace charlie;\r\n\r\n// Init the Compiler and set the output for compiler messages.\r\nCompiler compiler = Compiler([](string const\u0026 message)\r\n{\r\n    cout \u003c\u003c message \u003c\u003c endl;\r\n});\r\n\r\n// Add external function which can be called by the program\r\ncompiler.ExternalFunctionManager.AddFunction(\"print\", [](const char *message)\r\n{\r\n    cout \u003c\u003c message;\r\n});\r\n\r\n// Compile the file \"src/main.cc\"\r\ncompiler.Build(\"src/main\");\r\n\r\n// Run the program\r\ncompiler.Run();\r\n```\r\n\r\n\r\n## Supported Features\r\n\r\nThe [samples](/samples) in show the currently supported features of that tool set. Or [click here](/docs/features.md) for more informations.\r\n\r\n## Contributing Code\r\n\r\nPlease feel welcome to folk this repository.\r\nYou will need to download the [Google Test](https://github.com/google/googletest) library in order to run the tests.\r\nIf you are using Visual Studio you have to set the system variable `GTEST` to the directory `googletest\\googletest`.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flochbrunner%2Fcharlie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flochbrunner%2Fcharlie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flochbrunner%2Fcharlie/lists"}