A collection of C3 projects demonstrating various aspects of the C3 programming language.
This project includes a complete dev container configuration for instant setup:
- Install the Dev Containers extension in VS Code
- Clone this repository
- Open the folder in VS Code
- When prompted, click "Reopen in Container" or use
Ctrl+Shift+P
→ "Dev Containers: Reopen in Container" - The container will automatically build and configure everything needed
# Pull the pre-built image
docker pull brakmic/c3dev:latest
# Run with volume mount
docker run -it --rm -v $(pwd):/host_workspace brakmic/c3dev:latest
The .devcontainer/
configuration provides:
- C3 Compiler (
c3c
) - Latest stable release with LSP support - WebAssembly Tools (
wasm2wat
,wasm-validate
,wasm-objdump
) - Node.js 22 with npm, yarn, TypeScript, and development tools
- Docker engine for containerized development
- Build Tools - GCC 14, CMake, Ninja, Make
- Development Utilities - Git, Python 3, lsd, nano with syntax highlighting
- C3 Language Extension - Syntax highlighting and LSP support
- Optimized Settings - File exclusions and workspace configuration
- Multi-folder Workspace - Organized project structure
- User:
c3dev
with sudo privileges - Networking: Custom Docker network for multi-container development
- Mounts: Host workspace accessible at
/host_workspace
- Workspace Setup: Automated folder structure creation
The setup-workspace.mjs
script automatically creates a VS Code workspace with organized folders:
- DevContainer Workspace (
/workspace
) - Host Workspace (
/host_workspace
) - Projects (
/host_workspace/projects
) - Scratchpad (
/host_workspace/scratchpad
)
See the projects directory for detailed examples including:
- Hello World program
- WebAssembly math library
- Build instructions and usage examples
/
├── .devcontainer/
│ ├── devcontainer.json # VS Code dev container configuration
│ └── setup-workspace.mjs # Automated workspace setup script
├── .gitignore # Git ignore patterns
├── README.md # This file
├── LICENSE # MIT license
├── projects/ # Example C3 projects
│ └── README.md # Project documentation
└── scratchpad/ # Local development folder (gitignored)
If not using the dev container, ensure you have:
- C3 compiler (
c3c
) available in your PATH - WebAssembly Binary Toolkit (WABT) for WASM projects
- Python 3 for serving web projects
Verify your setup:
c3c --version
wasm2wat --version
python3 --version
# Rebuild the container if extensions fail to install
# VS Code Command Palette: "Dev Containers: Rebuild Container"
# Check container logs for setup errors
docker logs <container_id>
# Check if C3 is in PATH
which c3c
# Verify compiler installation
c3c --help
- Fork the repository
- Open in VS Code with dev containers
- Make your changes in the containerized environment
- Test your projects following the project documentation
- Submit a pull request
The dev container ensures all contributors have the same development environment.
This project is licensed under the MIT License - see the LICENSE file for details.