A Docker development environment for the C3 programming language, built on Ubuntu 24.04.
- C3 Compiler - Latest stable release with LSP support
- GCC 14 - Modern C/C++ compiler (set as default)
- Node.js 22 - JavaScript runtime with npm, yarn, and TypeScript
- Git & Git LFS - Version control with large file support
- Docker - Container runtime
- WebAssembly Tools (WABT) -
wasm2wat,wat2wasm,wasm-validate - Build Tools - CMake, Ninja, Make
- Debugging - GDB, Valgrind, Strace
- Network Tools - curl, wget, netcat, ping, dig
- File Management - lsd (modern ls), nano with syntax highlighting
- Pre-configured C3 language extension
- Optimized settings for C3 development
- Dev container support with proper user permissions
# Pull the latest image
docker pull brakmic/c3dev:latest
# Run interactively
docker run -it --rm \
-v $(pwd):/workspace \
brakmic/c3dev:latest- Create devcontainer.json:
- Open in VS Code:
- Install the "Dev Containers" extension
- Open Command Palette (
Ctrl+Shift+P) - Run: "Dev Containers: Reopen in Container"
- Docker Engine 20.10+
- 4GB+ available disk space
# Clone this repository
git clone https://github.com/brakmic/c3dev.git
cd c3dev
# Build the image
docker build -t c3dev-local .
# Or build with custom user
docker build --build-arg NONROOT_USER=myuser -t c3dev-local .| Argument | Default | Description |
|---|---|---|
NONROOT_USER |
c3dev |
Non-root username |
NODE_VERSION |
22 |
Node.js major version |
# Check C3 compiler version
c3c --version
# Compile a simple program
echo 'import std::io; fn void main() { io::printn("Hello, C3!"); }' > hello.c3
c3c compile hello.c3
./hello# Compile to WASM
c3c compile --target wasm32 -o math math.c3
# Inspect WASM binary
wasm2wat math.wasm -o math.wat
wasm-validate math.wasm/home/c3dev/
├── bin/c3/ # C3 compiler binaries
├── .bashrc # Shell configuration
├── .bash_aliases # Custom aliases
└── .nanorc # Nano editor config
/workspace/ # Mounted project directory
| Variable | Value | Description |
|---|---|---|
PATH |
Includes c3 | C3 compiler in PATH |
EDITOR |
nano |
Default text editor |
TERM |
xterm-256color |
Terminal capabilities |
The container includes helpful aliases:
ll # ls -la
gs # git status
ga # git add
gp # git push
gl # git log- C3 Language - The C3 programming language
- C3 Compiler - Official C3 compiler
- VS Code C3 Extension - C3 language support for VS Code
{ "name": "C3 Development Environment", "image": "brakmic/c3dev:latest", "workspaceFolder": "/workspace", "workspaceMount": "source=${localWorkspaceFolder},target=/host_workspace,type=bind,consistency=cached", "customizations": { "vscode": { "extensions": [ "c3.vscode-c3" ] } }, "remoteUser": "c3dev" }