Skip to content

bitceil/ccluau

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ccluau

a Luau to CC:Tweaked Lua (Cobalt) transpiler that can bundle itself. it lets you run raw Luau code on CC:Tweaked computers and turtles without worrying about version compatibility.

it preserves line positions for function calls, so when your code crashes in CraftOS, the line numbers actually match your Luau source.

features

  • Luau support: transpile Luau code to Lua 5.1 (Cobalt) compatible code.
  • self-bundling: the transpiler is written in Luau and can transpile itself into a single Lua file that runs directly on a CC:Tweaked computer.
  • standalone executable: can be compiled into a single binary for Linux (and other platforms) using Lune.
  • error alignment: preserves line numbers for function calls so debugging doesn't suck.
  • type definitions: includes full type definitions for the CC:Tweaked API.
  • polyfills: automatically includes polyfills for Luau features that aren't in standard Lua.

installation

cli (linux)

if you're on linux, you can use the setup script to install Lune and get everything ready:

chmod +x setup
./setup

building a standalone binary

to build a single executable that you can use anywhere:

lune run standalone-bundler/main.luau
lune build dist/standalone.luau -o ccluau

CC:Tweaked

you can generate a setup script for CraftOS by running the CC bundler:

lune run cc-bundler/main.luau

this will upload a setup script to x0.at and give you a command to run in your CC:Tweaked computer.

usage

transpiling a file

to transpile a .luau file to .lua:

lune run transpiler/main.luau <input.luau> [output.lua]

or if you built the binary:

./ccluau <input.luau> [output.lua]

vscode setup

to get autocompletion and type checking for the CC:Tweaked API, add this to your .vscode/settings.json:

{
    "luau-lsp.types.definitionFiles": {
        "cctweaked": "typedefs/cctweaked.d.luau"
    }
}

license

MIT - copyright (c) 2026 bitceil

About

a Luau to CC:Tweaked Lua (Cobalt) transpiler that can bundle itself. it lets you run raw Luau code on CC:Tweaked computers and turtles without worrying about version compatibility.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors