Skip to main content

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+
  • clang and lli executables.

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)

Source distribution for cci 5.1.0
File Size Uploaded Provenance Actions
cci-5.1.0.tar.gz 3.6 kB Without provenance Details for cci-5.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cci 5.1.0
File Interpreter ABI Platform Actions
cci-5.1.0-py3-none-any.whl Python 3 none any Details for cci-5.1.0-py3-none-any.whl

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

Security for cci 5.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page