cci
cci wraps tools in the LLVM toolchain to allow you to compile and run C programs on-the-fly using a JIT compiler, instead of requiring a dedicated compilation phase.
Requirements:
- Python 3.6+
clangandlliexecutables.
Installation
pipx install cci
To test it, see the examples in the next section.
Usage
To use cci, you point the shebang line of a C file at it.
That is sufficient to use it, but you can also specify more arguments to e.g. enforce stricter error checking by Clang.
Due to limitations in how shebang lines work, when you use cci, you have to put arguments to Clang on the line immediately after the shebang line.
To avoid ambiguity, that line must start with "// cci:".
For example, save the following to "hello-world.c":
#!/usr/bin/env cci
// cci: -std=c11 -Wall -pedantic-errors
#include <stdio.h>
int main() {
printf("Hello, world!\n")
return 0;
}
Now, mark it as executable (on *nix, chmod +x hello-world.c),
then run ./hello-world.c.
Debugging
If you include the argument "-###" in the arguments, it will be passed through to Clang for debugging purposes.
Metadata
Release files for cci 5.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cci-5.1.0.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cci-5.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.6 kB
Release files / cci-5.1.0.tar.gz
| Download URL | cci-5.1.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd619bf349fb771054db043aa1159f6fb30b9f52c4613942cdf963e4cf89fca7
|
|
BLAKE2b-256 checksum How to use checksums |
a8f0dafc7ca738e8396c401fc44fd1e61e6fc7bfc4ebb9375c03cc7535d0d0a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.12.4
|
Release files / cci-5.1.0-py3-none-any.whl
| Download URL | cci-5.1.0-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
60909da0b1fa274bff26758c36fc30710e2f2b8ec3881c3358e6ec0537ab5426
|
|
BLAKE2b-256 checksum How to use checksums |
901dff679127adde8dac792447f01cc2ddde72b2e9da2decb7e5af1ddd7574f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.12.4
|