whatisgithub

What is tc-lang?

alonsovm44/tc-lang — explained in plain English

Analysis updated 2026-05-18

18CAudience · developerComplexity · 4/5LicenseSetup · moderate

In one sentence

A minimal systems programming language with only 10 keywords that transpiles to readable C11, aimed at embedded, firmware, and CLI projects needing manual memory control.

Mindmap

mindmap
  root((Tight-C))
    What it does
      Transpiles to readable C11
      Manual memory management
      Bounds-aware fat pointers
    Tech stack
      C
      Custom compiler
    Use cases
      Write embedded firmware
      Build CLI tools
      Learn how compilers work
    Audience
      Systems programmers
      Embedded developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Write embedded or bare-metal firmware without needing a runtime

USE CASE 2

Build CLI tools with manual memory management and no garbage collector

USE CASE 3

Read the roughly 1500-line compiler source to learn how a simple compiler works

USE CASE 4

Call existing C libraries directly through the extern C interop block

What is it built with?

C

How does it compare?

alonsovm44/tc-langjayhutajulu1/cve-2026-43494-pintheft-pocknogle/libsamp
Stars181818
LanguageCCC
Setup difficultymoderatehardhard
Complexity4/55/55/5
Audiencedeveloperresearcherresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a C11 compiler to build the output, the language itself has no runtime dependency.

Released under the MIT license, free to use, modify, and redistribute, including for commercial projects.

So what is it?

Tight-C is a minimal systems programming language that transpiles to C. The design goal is to give you something as powerful as C but with a cleaner surface: only 10 keywords, no garbage collector, no type inference, no object-oriented features, and no hidden behavior. You write Tight-C code in .tc files, run the compiler, and get readable C11 as output that you can inspect, modify, or hand off to any C compiler. The language has two pointer types. A raw pointer (->) works like a C pointer. A fat pointer (=>) is a small struct containing both a pointer and a length, which lets you do bounds-aware slicing without a runtime library. Manual memory management uses alloc() and free(), and a defer keyword ensures cleanup code runs when the current scope exits, similar to how Go's defer works. A pin keyword marks a variable as immutable within its scope, the compiler catches reassignment at parse time. Structs are packed by default with no padding, which makes memory layout predictable for embedded and systems work. C interop is handled with an extern "C" block that lets you call any C library directly. Imports either link to pre-compiled headers (use) or inline another .tc file at compile time (@use). The compiler itself is about 1500 lines of C. It runs in a single pass: a lexer tokenizes the source, a parser builds an abstract syntax tree, and an emitter walks the tree and writes C11 text. There is no intermediate representation, no optimizer, and no code generation beyond string output. The resulting C is always readable. If you want to see exactly what your code becomes, you can stop at the C output step. The README lists good use cases as CLI tools, embedded or bare-metal firmware (no runtime required), game engine internals needing manual memory control, and learning how compilers work. The entire compiler is small enough to read in a few hours. Tight-C is released under the MIT license and builds on Windows, Linux, and macOS.

Copy-paste prompts

Prompt 1
Explain the difference between Tight-C's raw pointer and fat pointer types
Prompt 2
Help me write a Tight-C function that uses alloc, free, and defer for cleanup
Prompt 3
Walk me through how Tight-C's single-pass compiler turns source into C11 output
Prompt 4
Show me how to call an existing C library from Tight-C using extern C

Frequently asked questions

What is tc-lang?

A minimal systems programming language with only 10 keywords that transpiles to readable C11, aimed at embedded, firmware, and CLI projects needing manual memory control.

What language is tc-lang written in?

Mainly C. The stack also includes C.

What license does tc-lang use?

Released under the MIT license, free to use, modify, and redistribute, including for commercial projects.

How hard is tc-lang to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is tc-lang for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.