{"id":20460695,"url":"https://github.com/spydr06/cspydr","last_synced_at":"2025-08-11T14:43:45.760Z","repository":{"id":40203516,"uuid":"344202480","full_name":"Spydr06/CSpydr","owner":"Spydr06","description":"A static typed low-level compiled programming language inspired by Rust and C","archived":false,"fork":false,"pushed_at":"2025-02-09T12:53:09.000Z","size":4901,"stargazers_count":88,"open_issues_count":7,"forks_count":4,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-19T08:12:24.190Z","etag":null,"topics":["assembly","assembly-x86-64","c","compiler","cspydr","hacktoberfest2024","proglangs-discord","programming-language","standard-library","static-typed","syntax","x86-64","x86-64-linux-gnu"],"latest_commit_sha":null,"homepage":"","language":"C","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/Spydr06.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2021-03-03T17:09:03.000Z","updated_at":"2025-05-04T07:06:12.000Z","dependencies_parsed_at":"2023-01-29T04:16:06.695Z","dependency_job_id":"a1aa1ddc-aea8-44e5-b381-dfba2fb666ba","html_url":"https://github.com/Spydr06/CSpydr","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Spydr06/CSpydr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Spydr06%2FCSpydr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Spydr06%2FCSpydr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Spydr06%2FCSpydr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Spydr06%2FCSpydr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Spydr06","download_url":"https://codeload.github.com/Spydr06/CSpydr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Spydr06%2FCSpydr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269905785,"owners_count":24494316,"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-08-11T02:00:10.019Z","response_time":75,"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":["assembly","assembly-x86-64","c","compiler","cspydr","hacktoberfest2024","proglangs-discord","programming-language","standard-library","static-typed","syntax","x86-64","x86-64-linux-gnu"],"created_at":"2024-11-15T12:21:11.923Z","updated_at":"2025-08-11T14:43:45.689Z","avatar_url":"https://github.com/Spydr06.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cp\u003e\n\u003cimg width=\"200\" src=\"./assets/csp-logo-big.svg\"\u003e\u003c/img\u003e\n\u003c/p\u003e\n\n\u003ch1\u003eThe CSpydr Programming Language\u003c/h1\u003e\n\n**[📑 Documentation](https://github.com/spydr06/cspydr/wiki) |\n[💾 Installation](./INSTALL.md) |\n[🤝 Contributing](./CONTRIBUTING.md) |\n[📜 License](./LICENSE) |\n[🔄 State](#current-state)**\n\n[![License](https://img.shields.io/github/license/spydr06/cspydr?style=flat-square)](https://github.com/Spydr06/CSpydr/blob/main/LICENSE)\n[![Issues](https://img.shields.io/github/issues/spydr06/cspydr?style=flat-square)](https://github.com/Spydr06/CSpydr/issues)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/spydr06/cspydr?style=flat-square)\n![Platform](https://img.shields.io/badge/platform-linux_x86__64-blueviolet?style=flat-square)\n[![Stars](https://img.shields.io/github/stars/spydr06/cspydr?style=flat-square)](https://github.com/Spydr06/CSpydr/stargazers)\n[![Forks](https://img.shields.io/github/forks/spydr06/cspydr?style=flat-square)](https://github.com/Spydr06/CSpydr/network/members)\n![GitHub repo size](https://img.shields.io/github/repo-size/spydr06/cspydr?style=flat-square)\n![Lines of code](https://raster.shields.io/tokei/lines/github/spydr06/CSpydr?style=flat-square)\n\n\u003c/div\u003e\n\n**CSpydr** is a low-level, static typed, free and open-source, compiled programming language inspired by Rust and C. This repository contains `cspc` (the **CSpydr Programming Language Compiler**), as well as CSpydr's **Standard Library**, a [code-linting utility](./src/linter), some code examples and unit tests. \n\n## Code Examples\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eHello World\u003c/b\u003e\u003c/summary\u003e\n\n### [helloworld.csp](examples/traditional/helloworld.csp)\n![](examples/assets/img/helloworld.png)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eFibonacci\u003c/b\u003e\u003c/summary\u003e\n\n### [fibonacci.csp](examples/traditional/fibonacci.csp)\n![](examples/assets/img/fibonacci.png)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eLambda Functions\u003c/b\u003e\u003c/summary\u003e\n\n### [lambda.csp](examples/language/lambda.csp)\n![](examples/assets/img/lambda.png)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eRead File\u003c/b\u003e\u003c/summary\u003e\n\n### [read_file.csp](examples/std/read_file.csp)\n![](examples/assets/img/read_file.png)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eRandom Number Generator\u003c/b\u003e\u003c/summary\u003e\n\n### [random.csp](examples/std/rand.csp)\n![](examples/assets/img/random.png)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eTime \u0026 Timer API\u003c/b\u003e\u003c/summary\u003e\n\n### [time.csp](examples/std/time.csp)\n![](examples/assets/img/time.png)\n\u003c/details\u003e\n\n\u003e More examples can be found in the [**examples**](./examples/) directory\n\n## Current State\n\n**A list of all the features, that are already implemented or planned.**\n\n##### cspc Compiler features:\n- [x] Assembly code generator for `x86_64 linux`\n- [ ] LLVM codegen target (maybe even WASM?)\n- [ ] move to an intermediate bytecode compiler\n- [ ] AST to JSON converter (in progress)\n- [x] C transpiler\n- [x] lexing tokens\n- [x] `macro` and `import` preprocessor\n- [x] parsing an AST, validation of syntax and semantics\n- [x] type evaluator \u0026 checking\n- [x] implicit type casts\n- [ ] \"projects\" - prebuild libraries such as the `stdlib`\n- [x] CLI and error handling\n- [x] memory management\n\n##### CSpydr Language features:\n- [x] primitive data types `i8` `i16` `i32` `i64` `u8` `u16` `u32` `u64` `f32` `f64` `f80` `bool` `char` `void`\n- [x] pointers, arrays and c-like arrays `\u0026` `[]` `'c[]`\n- [x] custom data types `struct` `union` `enum` `{}` (tuples)\n- [x] control statements `if` `match` `for` `while` `loop` `ret` `break` `continue` `noop` `with` `do-while` `do-unless` `defer`\n- [x] different loop types: `for`, `while`, `do-while` and `loop`\n- [x] expressions\n- [x] `extern` functions and globals\n- [x] type-related keywords `sizeof` `typeof` `alignof` `len`\n- [x] file imports\n- [x] macros and macro-overloading\n- [x] default macros `__version__` `__system__` `__architecture__` `__time__` `__compile_type__` `__main_file__` `__file__` `__line__` `__func__` \n- [x] namespaces, functions, globals, typedefs\n- [x] inline `asm` code blocks\n- [x] lambda expressions\n- [ ] templates in fuctions and structs\n- [x] va lists\n- [x] interfaces, vtables and dynamic-dispatch for functions\n- [ ] dynamic-dispatch for constants\n- [ ] functions as struct members\n\n##### CSpydr Standard library features\n- [x] basic `c17` `libc`-header implementation\n- [x] `glfw` and `OpenGL`/`GLU` header files \n- [x] `cURL` header implementation \n- [x] from-the-ground custom written `stdlib` based on linux syscalls (in progress)\n\n## Installation\n\nPlease refer to [INSTALL.md](./INSTALL.md) for installation instructions and information about compatability\n\n## Hello, World!\n\nA simple [hello-world](./examples/traditional/helloworld.csp) program:\n\n```rust\nimport \"io.csp\";\n\nfn main(): i32\n{\n    std::io::puts(\"Hello, World!\");\n    \u003c- 0;\n}\n```\n\nRunning this program is as easy as entering the following command:\n```console\n$ cspc run hello-world.csp\n```\n\n### Examples\n\n\u003e For more examples, please refer to the `examples/` directory in this repository.\n\n## Usage\n\nTo compile a CSpydr program use the following command:\n```console\n$ cspc build \u003cyour file\u003e\n```\nTo directly run a program use this command:\n```console\n$ cspc run \u003cyour file\u003e\n```\nTo launch a special debug shell, start your program using the `debug` action:\n\u003cbr/\u003e\n*(not finished yet!)*\n```console\n$ cspc debug \u003cyour file\u003e\n```\n\nGet help using this command:\n```console\n$ cspc --help\n```\n\n*(I will write a proper documentation in the future!)*\n\n## Editor support\n\nEditor support is found in the **[editors/](./editors)** subdirectory.\n\nSupported editors include:\n\n- [NeoVim/Vim](./editors/neovim)\n- [VSCode](./editors/vscode)\n\n\u003e **Note**\n\u003e For quick installation, use the `install.sh` script in the respective subdirectory.\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update the unit tests as appropriate.\n\n**View CONTRIBUTING.md for more information**\n\n## License\nCSpydr is licensed under the [MIT License](https://mit-license.org/).\n\n## Resources | Reference | Inspiration\n\n- chibicc C compiler: https://github.com/rui314/chibicc.git\n- vcc: https://github.com/lemoncmd/vcc.git\n- tac programming language: https://github.com/sebbekarlsson/tac.git\n- summus programming language: https://github.com/igor84/summus.git\n- porth programming language: https://gitlab.com/tsoding/porth.git\n- cURL C library for transferring data: https://github.com/curl/curl\n- tiny-regex-c as the main inspiration behind `regex.csp`: https://github.com/kokke/tiny-regex-c.git\n- logo inspiration: IntelliJ IDEs (https://www.jetbrains.com/),\n                    Haskell-Intellij Plugin (https://plugins.jetbrains.com/plugin/8258-intellij-haskell)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspydr06%2Fcspydr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspydr06%2Fcspydr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspydr06%2Fcspydr/lists"}