Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ C3Dev Public

C3 Programming Language Development Container

License

brakmic/C3Dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

C3 Programming Language Development Container

A Docker development environment for the C3 programming language, built on Ubuntu 24.04.

What's Included

Core Development Tools

  • 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

Development Utilities

  • 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

VS Code Integration

  • Pre-configured C3 language extension
  • Optimized settings for C3 development
  • Dev container support with proper user permissions

Quick Start

Using Pre-built Image

# Pull the latest image
docker pull brakmic/c3dev:latest

# Run interactively
docker run -it --rm \
  -v $(pwd):/workspace \
  brakmic/c3dev:latest

Using with VS Code Dev Containers

  1. Create devcontainer.json:
{
  "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"
}
  1. Open in VS Code:
    • Install the "Dev Containers" extension
    • Open Command Palette (Ctrl+Shift+P)
    • Run: "Dev Containers: Reopen in Container"

Building from Source

Prerequisites

  • Docker Engine 20.10+
  • 4GB+ available disk space

Build Commands

# 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 .

Build Arguments

Argument Default Description
NONROOT_USER c3dev Non-root username
NODE_VERSION 22 Node.js major version

Usage Examples

Compile C3 Programs

# 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

WebAssembly Development

# Compile to WASM
c3c compile --target wasm32 -o math math.c3

# Inspect WASM binary
wasm2wat math.wasm -o math.wat
wasm-validate math.wasm

Directory Structure

/home/c3dev/
├── bin/c3/          # C3 compiler binaries
├── .bashrc          # Shell configuration
├── .bash_aliases    # Custom aliases
└── .nanorc          # Nano editor config

/workspace/          # Mounted project directory

Environment Variables

Variable Value Description
PATH Includes c3 C3 compiler in PATH
EDITOR nano Default text editor
TERM xterm-256color Terminal capabilities

Useful Aliases

The container includes helpful aliases:

ll      # ls -la
gs      # git status
ga      # git add
gp      # git push
gl      # git log

Related Projects

About

C3 Programming Language Development Container

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published