{"id":26679609,"url":"https://github.com/maxrt101/xcc","last_synced_at":"2026-05-02T14:39:36.121Z","repository":{"id":271427075,"uuid":"874805123","full_name":"maxrt101/xcc","owner":"maxrt101","description":"XCC Programming language compiler based on LLVM","archived":false,"fork":false,"pushed_at":"2025-03-25T00:07:07.000Z","size":92,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T00:19:58.142Z","etag":null,"topics":["compiler","cpp17","llvm","programming-language"],"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/maxrt101.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-10-18T13:47:37.000Z","updated_at":"2025-03-25T00:09:14.000Z","dependencies_parsed_at":"2025-01-07T18:02:52.874Z","dependency_job_id":"00fc617a-d874-414b-b325-5370ab69088e","html_url":"https://github.com/maxrt101/xcc","commit_stats":null,"previous_names":["maxrt101/xcc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrt101%2Fxcc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrt101%2Fxcc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrt101%2Fxcc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrt101%2Fxcc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxrt101","download_url":"https://codeload.github.com/maxrt101/xcc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245598314,"owners_count":20641884,"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":["compiler","cpp17","llvm","programming-language"],"created_at":"2025-03-26T06:16:44.135Z","updated_at":"2026-05-02T14:39:36.091Z","avatar_url":"https://github.com/maxrt101.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XCC - Programming Language\n\n[![Build XCC](https://github.com/maxrt101/xcc/actions/workflows/build.yml/badge.svg)](https://github.com/maxrt101/xcc/actions/workflows/build.yml)\n\nA strongly-typed compiled programming language with Rust/C inspired syntax.  \nUses LLVM as a backend because of its vast support of platforms, JIT, and other features.  \nXCC is a working name, it may be changed later.  \nCC - is taken from GCC (GNU Compiler Collection), while XCC is not a compiler collection,  \nit most certainly is a compiler. X - is just a cool letter that I like :)  \n\n### How to run  \n#### Prerequisites:  \n - GCC/clang  \n - CMake  \n - LLVM installed (and findable through CMake)\n\n#### Build:  \n - `cmake -B build -S .`  \n - `cmake --build build -j $(nproc)`  \n\n#### Run:  \n - `./build/xcc` - for a REPL (JIT powered interpreter)  \n - `./build/xcc -r FILE` - to run a file  \n - `./build/xcc -c FILE -o OUT` - to compile a file  \n - `XCC_LD=/path/to/ld ./build/xcc FILE1 FILE2 FILEN -o OUT` - to link or build files into an executable  \n\n#### Arguments:\n```\nUsage: xcc [-h] [-v] [--verbose] [-c] [-r] [-l LIB] [-L PATH] [-I PATH] [-t TARGET] [-m MACHINE] [-o OUT_FILE] IN_FILE...\nArguments:\n  -h, --help              - Print this message\n  -v, --version           - Print version\n  -c, --compile           - Compile into object file\n  -r, --run               - Run file using JIT\n  -l, --lib LIB           - Link LIB\n  -L, --lib-path LIB_PATH - Add library search path\n  -I, --mod-path MOD_PATH - Add module search path\n  -t, --target TARGET     - Specify target triple (use 'list' to see all)\n  -m, --machine MACHINE   - Specify target machine (cpu) (use 'list' to see all)\n  -o, --output OUT_FILE   - Set output file name\n  IN_FILE...              - Input (source/object) files\nEnvironment:\n  XCC_LD                  - Path to linker executable\n  XCC_LDFLAGS             - Flags to pass directly to linker\n```\n\n### Syntax  \nHere's a hello world program:  \n```\nuse stdc;\n\nfn main() -\u003e i32 {\n  stdc::io::printf(\"Hello, World!\\n\");\n  return 0;\n}\n```\n\n### Features  \n - [X] Functions (user-defined, extern, forward-declarations)  \n - [X] Variables (local \u0026 global)  \n - [X] Number literals (in 8, 10, 16 bases + float point)  \n - [X] String literals (ascii only, null-terminator automatically appended + escape sequences)  \n - [X] Character literals (ascii only)\n - [X] Basic data types (`i8`, `i16`, `i32`, `i64`, `u8`, `u16`, `u32`, `u64`, `void`)  \n - [X] Arithmetic operations (`+`, `-`, `*`, `/`)  \n - [X] Comparison operations (`==`, `!=`, `\u003c`, `\u003c=`, `\u003e`, `\u003e=`)  \n - [X] Pointers (dereferencing `*`, taking address of a variable `\u0026`)  \n - [X] Subscripting (`[]`, no array type, so only usable on pointers)  \n - [X] Variadic functions (only declarations, no API to actually use it by the user)  \n - [X] Strings (null-terminated, as `i8*`)  \n - [X] String interning  \n - [X] Conditional execution (`if` statement, works just like in C)  \n - [X] Loops (only `for` is supported (syntax like in C), `while` is in the works)  \n - [X] Type casts (to some extent, represented by `as` expression)  \n - [X] User-defined types (`struct` \u0026 member access operator `.` + pointer member access `-\u003e`)  \n - [X] JIT (which allows for REPL to exist)  \n - [X] Runtime function resolution in the scope of running process using extern  \n - [X] Compiling into object files\n - [X] Scoped file modules (`use`, `use mod`, `::`)\n - [X] Nested modules (`mod name { ... }`)\n - [X] Attributes (`[]`)\n - [X] Function aliases (`[alias(...)]`)\n - [X] Environment variable resolution at compile-time\n - [X] Function pointers (`fn() -\u003e void`)\n - [X] Target/Machine selection via command line (which enables cross-compiling)  \n - [X] Macros  \n - [ ] Procedural macros  \n - [ ] Port of libc (stdc)  \n - [ ] Standard library  \n - [ ] Built-ins (sizeof, offsetof, typeof)  \n - [ ] Procedural attributes  \n - [ ] Conditional imports  \n - [ ] Compound struct initialization  \n - [ ] Destructors (or something like `defer`)  \n - [ ] Lambdas (closures)\n - [ ] The rest of gcc/clang attributes (alias, section \u0026 packed are done)  \n - [ ] Full variadic support  \n - [ ] Stable ABI/FFI  \n - [ ] String interpolation  \n - [ ] Better type inference  \n - [ ] Generics?  \n - [ ] Multithreading  \n - [ ] Inheritance?  \n - [ ] Dynamic dispatch?  \n - [ ] Build system?  \n - [ ] Dependency management system?  \n\n### REPL  \nWhen running XCC executable without argument - you will be dropped into the REPL.  \nREPL is a Read Eval Print Loop. You can type in statements and they will be executed.  \nREPL has some special commands, such as `/help`, `/quit` \u0026 `list`.  \n`/help` or `/h` - shows help message.  \n`/quit` or `/q` - exists the REPL.  \n`/list` or `/l` - lists declared global functions.  \nIn REPL compiler behaves a bit differently, for example `;` is not required at the end  \nof the statement, otherwise everything else should work normally.  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxrt101%2Fxcc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxrt101%2Fxcc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxrt101%2Fxcc/lists"}