{"id":31578386,"url":"https://github.com/rachitdhar/vanta","last_synced_at":"2025-10-05T19:57:35.688Z","repository":{"id":317984363,"uuid":"1050937994","full_name":"rachitdhar/vanta","owner":"rachitdhar","description":"Compiler for the Vanta programming language","archived":false,"fork":false,"pushed_at":"2025-10-04T09:01:58.000Z","size":273,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-04T10:26:28.337Z","etag":null,"topics":["compilers","languages","llvm","parsing","syntax-analysis"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rachitdhar.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-05T07:20:40.000Z","updated_at":"2025-10-04T09:02:01.000Z","dependencies_parsed_at":"2025-10-04T10:36:49.223Z","dependency_job_id":null,"html_url":"https://github.com/rachitdhar/vanta","commit_stats":null,"previous_names":["rachitdhar/vanta"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rachitdhar/vanta","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rachitdhar%2Fvanta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rachitdhar%2Fvanta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rachitdhar%2Fvanta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rachitdhar%2Fvanta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rachitdhar","download_url":"https://codeload.github.com/rachitdhar/vanta/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rachitdhar%2Fvanta/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278510917,"owners_count":25998997,"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-05T02:00:06.059Z","response_time":54,"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":["compilers","languages","llvm","parsing","syntax-analysis"],"created_at":"2025-10-05T19:57:31.500Z","updated_at":"2025-10-05T19:57:35.679Z","avatar_url":"https://github.com/rachitdhar.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vanta (Programming Language)\nCompiler for the Vanta programming language, a systems programming language with a C-style syntax that emphasizes clean, simple and minimal features with high performance.\n\nThis project was largely undertaken by me for fun and educational purposes, but it is semi-serious in the sense that it is a full-fledged compiler that can be used for real purposes.\n\n\u003e **Note:** This project is still in early development.\n\n## Usage\n\nCompile a file at a given path using:\n\n```\nvanta \u003cFILE_PATH\u003e\n```\n\nThe file must have a .van extension.\n\n## Flags\n\nWe can add some compilation flags when compiling, as:\n\n```\nvanta \u003cFILE_PATH\u003e ...\n                   ^ flags (optional)\n```\n\nHere are the flags that can be added, along with their purposes:\n\n- **-pout** : Prints the Parser Output (structure of the AST)\n- **-llout** : Prints the LLVM IR generated\n- **-ll** : Generates a .ll file (LLVM IR) instead of an executable\n- **-asm** : Generates a .s file (Assembly) instead of an executable\n- **-benchmark** : Prints the performance metrics for the compilation process\n\n## Compiling the Compiler + LLVM Linking\n\nIt turns out that one of the most difficult and irritating parts of developing this compiler was to figure out how LLVM libraries can actually be included and compiled. After doing almost every possible thing - from installing the LLVM binaries and manually linking; using Visual Studio configurations; using CMAKE to handle builds; to building LLVM myself from the llvm-project source and trying to fix the compatibility issues between it and my own mingw compiler - I finally found that MSYS2 comes with the ability to install everything I need: C/C++ compilers, GDB, LLC,... and most importantly all the LLVM headers and libraries. From within the MSYS MINGW64 shell, all the compilation problems get handled very smoothly.\n\nAt the location msys64/mingw64/bin, running the command:\n\n```\nllvm-config --cxxflags --ldflags --libs all --system-libs\n```\n\ngives me the output:\n\n```\n-ID:/softwares/msys64/mingw64/include -std=c++17 -fno-exceptions -funwind-tables -DEXPERIMENTAL_KEY_INSTRUCTIONS -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -LD:/softwares/msys64/mingw64/lib -lLLVM-21\n```\n\nwhich contains the information needed regarding the include paths, compiler flags and library paths that are needed for linking LLVM during the compilation of my compiler.\n\nI am using nob to write the C script to compile my compiler. It uses the nob.h single header library (from Tsoding, inspired by his \"No-Build\" concept).\n\nOf course, this means before using nob, we must compile it too!\n\n```\ngcc nob.c -o nob\n```\n\nThen, to compile the compiler, just do:\n\n```\n./nob\n```\n\nTo compile with debugging symbols, use the -debug flag:\n\n```\n./nob -debug\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frachitdhar%2Fvanta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frachitdhar%2Fvanta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frachitdhar%2Fvanta/lists"}