About this project
cx is a C-family hybrid low-level/high-level programming language focused on runtime performance and developer productivity, in that order of priority. It is described as simple and unopinionated, supporting imperative, generic, data-oriented, functional, and object-oriented programming styles. It compiles to native code through LLVM or a C backend, with no garbage collection or hidden runtime.
The project is nearing its 0.1 release. The README notes that some planned features are not yet implemented, implemented features may change, and bugs exist. Documentation is available on the project website and in Markdown form under docs, with code samples in the examples directory. Questions and discussions are directed to GitHub issues or the project's Discord server.
Building from source requires a C++20 compiler, CMake 3.16 or newer, and LLVM/Clang 23. The README provides platform-specific instructions for Linux (apt-based installs and pre-built LLVM tarballs), macOS (Homebrew), and Windows (pre-built LLVM binaries). The build produces cx and cx-lsp binaries. The language server supports diagnostics, hover, go to definition, completions, find references, and semantic highlighting in LSP-capable editors.
Contributions are welcome via GitHub issues and a Trello board. Testing uses lit and psutil installed through pip, then a CMake check target runs the full suite via CTest, covering lit/compiler tests, example programs on both LLVM and C backends, documentation snippets, and language server end-to-end tests. Subsets can be run with ctest filters. C++ code style is enforced by ClangFormat through format and lint CMake targets. A WebAssembly frontend and in-browser C toolchain support a browser playground and website, with a build script for local development. The project is licensed under the MIT license.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.