Bun C Compiler
Compile and run C from JavaScript with low overhead
Install
npx skills add jarle/bun-skills --skill Bun C Compilergit clone --depth 1 https://github.com/jarle/bun-skills.git /tmp/bun-skills
mkdir -p ~/.claude/skills
cp -r /tmp/bun-skills/skills/bun-runtime-c-compiler ~/.claude/skills/Bun-C-CompilerPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# C Compiler
> Compile and run C from JavaScript with low overhead
`bun:ffi` has experimental support for compiling and running C from JavaScript with low overhead.
***
## Usage (cc in `bun:ffi`)
See the [introduction blog post](https://bun.com/blog/compile-and-run-c-in-js) for more information.
JavaScript:
```ts hello.ts icon="file-code" theme={"theme":{"light":"github-light","dark":"dracula"}}
import { cc } from "bun:ffi";
import source from "./hello.c" with { type: "file" };
const {
symbols: { hello },
} = cc({
source,
symbols: {
hello: {
args: [],
returns: "int",
},
},
});
console.log("What is the answer to the universe?", hello());
```
C source:
```c hello.c theme={"theme":{"light":"github-light","dark":"dracula"}}
int hello() {
return 42;
}
```
When you run `hello.js`, it will print:
```sh terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
bun hello.js
What is the answer to the universe? 42
```
Under the hood, `cc` uses [TinyCC](https://bellard.org/tcc/) to compile the C code and then link it with the JavaScript runtime, efficiently converting types in-place.
### Primitive types
The same `FFIType` values in [`dlopen`](/runtime/ffi) are supported in `cc`.
| `FFIType` | C Type | Aliases |
| ----------- | -------------- | --------------------------- |
| cstring | `char*` | |Details
- Skill name
Bun C Compiler- Repository
- jarle/bun-skills
- Path
skills/bun-runtime-c-compiler/SKILL.md- License
- MIT
- Repo updated
- 24 February 2026
FAQ
What does the Bun C Compiler skill do?
Compile and run C from JavaScript with low overhead
How do I install the Bun C Compiler skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add jarle/bun-skills --skill Bun C Compiler. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Bun C Compiler popular?
It lives in jarle/bun-skills, which has 9 GitHub stars and 1 forks.
Related skills
Bun Archive
9jarle/bun-skills
Create and extract tar archives with Bun's fast native implementation
Bun Auto Install
9jarle/bun-skills
Bun's automatic package installation feature for standalone script execution
Bun Bun Add
9jarle/bun-skills
Add packages to your project with Bun's fast package manager
Bun Code Coverage
9jarle/bun-skills
Learn how to use Bun's built-in code coverage reporting to track test coverage and find untested areas in your codebase
Bun Bytecode Caching
9jarle/bun-skills
Speed up JavaScript execution with bytecode caching in Bun's bundler
Bun Codesign a Single File JavaScript Executable on macOS
9jarle/bun-skills
Fix the "can't be opened because it is from an unidentified developer" Gatekeeper warning when running your JavaScript executable.
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.