The EASIEST way to organize your C projects using Lua! ✨
A Lua wrapper for SilverChain - Now with the power and simplicity of Lua scripting! 🚀
Think of your C project as a messy toolbox with screws, nails, and tools scattered everywhere. 🧰
LuaSilverChain is like having a super-smart assistant that:
- Sorts everything by type (screws with screws, nails with nails) 📦
- Puts them in labeled drawers (dependencies, types, functions) 🗂️
- Does it all with simple Lua commands ✨
| 🔧 Regular SilverChain | 🌙 LuaSilverChain |
|---|---|
| Command-line only | Lua scripting power! |
| Static configuration | Dynamic configuration |
| One-time execution | Integrate into Lua workflows |
| External tool | Native Lua module |
- 🎓 Students: Script your project builds with Lua
- 🏢 Professional Development: Integrate into existing Lua build systems
- 📚 Library Creators: Automate organization in your Lua tools
- 🚀 DevOps: Add to your Lua automation scripts
🚨 Total Beginner? Start with the "🎮 Super Easy Installation" section below!
Just want to use it RIGHT NOW? Copy and paste this magic command:
# 🪄 One-line installation magic!
curl -L https://github.com/OUIsolutions/LuaSilverChain/releases/download/0.1.1/LuaSilverChain.zip -o LuaSilverChain.zip && unzip LuaSilverChain.zip && rm LuaSilverChain.zip🎉 That's it! You now have a LuaSilverChain folder with everything you need!
| 📁 File | 🎯 Best For | 📝 Description |
|---|---|---|
| 📦 LuaSilverChain.zip | Most Users | Complete module ready to use |
| 🔧 silverchain_darwin_import.c | Darwin builders | For building with Darwin build system |
| 📚 silverchain_full.c | C developers | Full implementation in one file |
| ⚡ silverchain_no_dependecie_included.c | Minimal setups | Lightweight version |
🐧 Linux/Mac Users:
# Download and install in one go
wget https://github.com/OUIsolutions/LuaSilverChain/releases/download/0.1.1/LuaSilverChain.zip
unzip LuaSilverChain.zip
rm LuaSilverChain.zip🪟 Windows Users (PowerShell):
# Download using PowerShellInvoke-WebRequest-Uri "https://github.com/OUIsolutions/LuaSilverChain/releases/download/0.1.1/LuaSilverChain.zip"-OutFile "LuaSilverChain.zip"Expand-Archive-Path "LuaSilverChain.zip"-DestinationPath "."Remove-Item"LuaSilverChain.zip"Don't panic! This is easier than making instant coffee! ☕
Let's start with the simplest possible example:
Create a file called organize.lua:
-- 🌟 Your first LuaSilverChain script!localsilverchain=require("LuaSilverChain")
-- 🎯 Organize your project in one simple command!silverchain.generate({
src="my_project", -- 📁 Your source foldertags= {"dependencies", "functions"} -- 🏷️ Organization tags
})
print("🎉 Project organized successfully!")Run it:
lua organize.lua🤔 What just happened?
require("LuaSilverChain")→ Load the magic! ✨src = "my_project"→ "Hey, look at this folder!"tags = {...}→ "Organize by dependencies first, then functions!"
Imagine you have these files in your project:
awesome_calculator/
├── src/
│ ├── dependencies.headers.h ← All your #includes
│ ├── types.calculator.h ← Data types │ ├── functions.math.h ← Function declarations
│ ├── functions.math.c ← Function implementations
│ ├── functions.display.h ← Display function declarations
│ ├── functions.display.c ← Display implementations
│ └── main.c ← Your main program
🧑💻 What's in each file:
dependencies.headers.h:
#include<stdio.h>#include<stdlib.h>#include<math.h>types.calculator.h:
#ifndefCALCULATOR_TYPES_H#defineCALCULATOR_TYPES_Htypedefstruct {
doubleresult;
charoperation;
} Calculator;
#endiffunctions.math.h:
#ifndefMATH_FUNCTIONS_H#defineMATH_FUNCTIONS_Hdoubleadd(doublea, doubleb);
doublesubtract(doublea, doubleb);
#endiffunctions.math.c:
doubleadd(doublea, doubleb) { returna+b; }
doublesubtract(doublea, doubleb) { returna-b; }🚀 Now, let's organize everything with LuaSilverChain:
Create build_calculator.lua:
-- 🧮 Calculator Project Organizerlocalsilverchain=require("LuaSilverChain")
print("🚀 Organizing your awesome calculator...")
silverchain.generate({
src="awesome_calculator/src",
project_short_cut="CALC",
tags= {"dependencies", "types", "functions"},
implement_main=true,
main_name="calculator.c"
})
print("✅ Calculator organized!")
print("📁 Check the 'imports' folder for organized files.")
print("🎯 Main file created: calculator.c")Run it:
lua build_calculator.lua🎉 BOOM! Now you have an organized imports folder:
imports/
├── imports.dependencies.h ← All dependencies in one place
├── imports.types.h ← All types organized ├── imports.functions.h ← All function declarations
├── imports.functions.c ← All function implementations
└── calculator.c ← Your main file ready to go!
Let's create a complete example from scratch:
1. Create the folder structure:
mkdir test_lua_silverchain
mkdir test_lua_silverchain/src
cd test_lua_silverchain2. Create your C files:
src/dependencies.system.h:
#include<stdio.h>#include<string.h>src/types.person.h:
#ifndefPERSON_TYPES_H#definePERSON_TYPES_Htypedefstruct {
charname[50];
intage;
} Person;
#endifsrc/functions.person.h:
#ifndefPERSON_FUNCTIONS_H#definePERSON_FUNCTIONS_Hvoidprint_person(Personp);
Personcreate_person(constchar*name, intage);
#endifsrc/functions.person.c:
voidprint_person(Personp) {
printf("Name: %s, Age: %d\n", p.name, p.age);
}
Personcreate_person(constchar*name, intage) {
Personp;
strcpy(p.name, name);
p.age=age;
returnp;
}3. Create your Lua organizer script:
organize_person.lua:
-- 👤 Person Project Organizerlocalsilverchain=require("LuaSilverChain")
print("🚀 Organizing Person project...")
-- 🎯 Main organizationsilverchain.generate({
src="src",
project_short_cut="PERSON",
tags= {"dependencies", "types", "functions"},
implement_main=true,
main_name="person_demo.c"
})
print("✅ Person project organized!")
print("📁 Files created in 'imports' folder")
print("🎯 Main file: person_demo.c")
print("💻 Compile with: gcc person_demo.c imports/imports.functions.c -o person_demo")4. Run your Lua script:
lua organize_person.lua5. Compile and test:
gcc person_demo.c imports/imports.functions.c -o person_demo
./person_demo🎉 Congratulations! You just used LuaSilverChain successfully!
🎯 Beginner Tip: Start with
generate()function. Learn other features later!
This is your go-to function for organizing projects:
localsilverchain=require("LuaSilverChain")
silverchain.generate({
-- ✅ REQUIRED OPTIONSsrc="src", -- 📁 Source folder to organizetags= {"dependencies", "types", "functions"}, -- 🏷️ Organization tags (in order!)-- 🎛️ OPTIONAL OPTIONS (with defaults)project_short_cut="MYPROJECT", -- 📛 Project name for #ifndef guardsimplement_main=false, -- 🎯 Create main.c file?main_name="main.c", -- 📄 Name of main filemain_path=nil, -- 📍 Custom path to main fileimport_dir="imports" -- 📁 Where to save organized files
})Remove the organized imports folder:
localsilverchain=require("LuaSilverChain")
-- 🗑️ Clean up the imports foldersilverchain.remove("src") -- This removes src/imports folderprint("🧹 Imports folder cleaned up!")| 🏷️ Option | 📝 Description | 🚨 Required? | 🔧 Default | 💡 Example |
|---|---|---|---|---|
src | Source folder to organize | ✅ YES | - | "src" |
tags | Organization tags in order | ✅ YES | - | {"deps", "types", "funcs"} |
project_short_cut | Project prefix for guards | ❌ No | "silverchain" | "MYCALC" |
implement_main | Create main.c file | ❌ No | false | true |
main_name | Name of main file | ❌ No | "main.c" | "calculator.c" |
main_path | Custom main file path | ❌ No | nil | "src/cli/main.c" |
import_dir | Output directory | ❌ No | "imports" | "organized" |
localsilverchain=require("LuaSilverChain")
-- 🎯 Simple organization - perfect for learning!silverchain.generate({
src="src",
tags= {"dependencies", "types", "functions"}
})localsilverchain=require("LuaSilverChain")
-- 🎛️ Custom configuration with main file creationsilverchain.generate({
src="my_project",
tags= {"deps", "consts", "types", "funcs"},
project_short_cut="MYPROJ",
implement_main=true,
main_name="myapp.c",
import_dir="organized_code"
})localsilverchain=require("LuaSilverChain")
-- 🚀 Complex project with multiple modulessilverchain.generate({
src="src",
tags= {
"api_dependencies", "api_consts", "api_types", "api_globals",
"api_func_declaration", "api_func_definition",
"cli_dependencies", "cli_consts", "cli_globals", "cli_func_declaration", "cli_func_definition"
},
project_short_cut="ADVANCED_PROJ",
implement_main=true,
main_name="advanced_app.c",
main_path="src/cli/main.c"
})
print("🎉 Advanced project organized!")🎯 Simple Version: LuaSilverChain takes your messy C files, sorts them by tags using Lua power, and creates organized imports! ✨
Tags work like organizing your digital photos:
dependencies→ All your external libraries go in one album 📚types→ All your data structures go in another album 📊functions→ All your functions go in the final album 🔧
localsilverchain=require("LuaSilverChain")
silverchain.generate({
src="src",
tags= {"dependencies", "consts", "types", "globals", "func_declaration", "func_definition"}
})Processing happens in this exact order:
dependencies→ Files likedependencies.system.hget processed firstconsts→ Then files likeconsts.math.htypes→ Then files liketypes.calculator.hglobals→ Then files likeglobals.config.hfunc_declaration→ Then files likefunc_declaration.math.hfunc_definition→ Finally files likefunc_definition.math.c
LuaSilverChain looks for files that start with your tag name:
| 🏷️ Tag | 📁 Files It Will Find | 💡 Examples |
|---|---|---|
dependencies | dependencies.* | dependencies.system.h, dependencies.libs.h |
types | types.* | types.person.h, types.calculator.h |
functions | functions.* | functions.math.c, functions.io.h |
This is the COOLEST part! Each tag can "see" all the previous tags:
tags= {"dependencies", "types", "functions"}dependenciescan see: Nothing (it's first)typescan see:dependencies✅functionscan see:dependencies+types✅
🌟 This means: Your function files can automatically use types and dependencies!
Project Structure:
math_library/
├── src/
│ ├── dependencies.standard.h
│ ├── types.math.h
│ ├── functions.basic.h
│ ├── functions.basic.c
│ └── functions.advanced.h
└── build.lua
build.lua:
localsilverchain=require("LuaSilverChain")
print("📊 Building Math Library...")
silverchain.generate({
src="src",
project_short_cut="MATHLIB",
tags= {"dependencies", "types", "functions"},
implement_main=true,
main_name="math_demo.c"
})
print("✅ Math library organized!")
print("🎯 Demo file: math_demo.c")Advanced organization for game development:
localsilverchain=require("LuaSilverChain")
print("🎮 Organizing Game Engine...")
-- 🚀 Complex game engine organizationsilverchain.generate({
src="engine/src",
project_short_cut="GAMEENGINE",
tags= {
"engine_dependencies", -- SDL, OpenGL, etc."engine_types", -- GameObject, Vector3, etc."engine_globals", -- Global game state"graphics_declare", -- Graphics function declarations"graphics_define", -- Graphics implementations"audio_declare", -- Audio function declarations"audio_define", -- Audio implementations"input_declare", -- Input handling declarations"input_define" -- Input implementations
},
implement_main=true,
main_name="game.c",
import_dir="engine/organized"
})
print("🎉 Game engine organized!")
print("📁 Check 'engine/organized' folder")Professional project with automated build:
localsilverchain=require("LuaSilverChain")
-- 📋 Configurationlocalconfig= {
project_name="MyEnterpriseApp",
version="1.0.0",
src_dir="src",
output_dir="dist/organized"
}
print("🏢 Building " ..config.project_name.." v" ..config.version)
-- 🧹 Clean previous buildsilverchain.remove(config.src_dir)
-- 🏗️ Organize projectsilverchain.generate({
src=config.src_dir,
project_short_cut=string.upper(config.project_name),
tags= {
"system_dependencies",
"external_dependencies", "core_types",
"business_types",
"database_types",
"core_globals",
"business_globals",
"database_declare",
"database_define",
"business_declare", "business_define",
"api_declare",
"api_define"
},
implement_main=true,
main_name="enterprise_app.c",
import_dir=config.output_dir
})
print("✅ Enterprise application organized!")
print("📊 Project: " ..config.project_name)
print("📁 Output: " ..config.output_dir)Create auto_build.lua for continuous integration:
localsilverchain=require("LuaSilverChain")
-- 🤖 Automated build pipelinefunctionbuild_project()
print("🚀 Starting automated build...")
-- 🧹 Step 1: Cleanprint("🧹 Cleaning previous build...")
silverchain.remove("src")
-- 🏗️ Step 2: Organizeprint("🏗️ Organizing source code...")
silverchain.generate({
src="src",
project_short_cut="AUTOBUILDER",
tags= {"dependencies", "consts", "types", "globals", "funcs"},
implement_main=true,
main_name="auto_app.c"
})
-- ✅ Step 3: Compile (if gcc available)print("⚙️ Attempting compilation...")
localcompile_result=os.execute("gcc auto_app.c imports/imports.funcs.c -o auto_app 2>/dev/null")
ifcompile_result==0thenprint("✅ Build successful! Executable: auto_app")
elseprint("⚠️ Organization complete, but compilation failed.")
print("💡 Please compile manually: gcc auto_app.c imports/imports.funcs.c -o auto_app")
endprint("🎉 Automated build complete!")
end-- 🏃♂️ Run the buildbuild_project()Create watch_build.lua for development mode:
localsilverchain=require("LuaSilverChain")
-- 📁 Configurationlocalwatch_config= {
src_dir="src",
check_interval=2, -- secondslast_modified=0
}
functionget_directory_modified_time(dir)
-- Simple modification detection (works on Unix-like systems)localhandle=io.popen("find " ..dir.." -type f -exec stat -c %Y {} \\; 2>/dev/null | sort -n | tail -1")
localresult=handle:read("*a")
handle:close()
returntonumber(result) or0endfunctionrebuild_project()
print("🔄 Changes detected! Rebuilding...")
silverchain.generate({
src=watch_config.src_dir,
project_short_cut="WATCHMODE",
tags= {"dependencies", "types", "functions"},
implement_main=true,
main_name="watch_app.c"
})
print("✅ Rebuild complete! " ..os.date("%H:%M:%S"))
endprint("👀 Watch mode started for '" ..watch_config.src_dir.."'")
print("🔄 Checking for changes every " ..watch_config.check_interval.." seconds...")
print("🛑 Press Ctrl+C to stop")
-- 🏃♂️ Initial buildrebuild_project()
watch_config.last_modified=get_directory_modified_time(watch_config.src_dir)
-- 👀 Watch loopwhiletruedolocalcurrent_modified=get_directory_modified_time(watch_config.src_dir)
ifcurrent_modified>watch_config.last_modifiedthenrebuild_project()
watch_config.last_modified=current_modifiedend-- 😴 Sleepos.execute("sleep " ..watch_config.check_interval)
endDon't do this:
-- ❌ This will fail!localsilverchain=require("silverchain") -- Wrong name!Do this instead:
-- ✅ Correct waylocalsilverchain=require("LuaSilverChain") -- Exact name!Don't do this:
-- ❌ This will fail - missing src and tags!silverchain.generate({
project_short_cut="MYPROJ"
})Do this instead:
-- ✅ Always include src and tagssilverchain.generate({
src="src",
tags= {"dependencies", "functions"},
project_short_cut="MYPROJ"
})Don't do this:
-- ❌ Functions before dependencies - this can cause issues!silverchain.generate({
src="src",
tags= {"functions", "dependencies"} -- Wrong order!
})Do this instead:
-- ✅ Dependencies first, then other tagssilverchain.generate({
src="src",
tags= {"dependencies", "types", "functions"} -- Logical order!
})Don't do this:
src/
├── my_dependencies.h ❌ Wrong prefix!
├── some_types.h ❌ Wrong prefix!
└── math_functions.c ❌ Wrong prefix!
Do this instead:
src/
├── dependencies.system.h ✅ Starts with tag name!
├── types.math.h ✅ Starts with tag name!
└── functions.math.c ✅ Starts with tag name!
Don't do this:
-- ❌ No error handling - script might crash silently!silverchain.generate({
src="nonexistent_folder",
tags= {"dependencies", "functions"}
})Do this instead:
-- ✅ Handle potential errors gracefullylocalsuccess, error_msg=pcall(function()
silverchain.generate({
src="src",
tags= {"dependencies", "functions"}
})
end)
ifsuccessthenprint("✅ Project organized successfully!")
elseprint("❌ Error: " ..tostring(error_msg))
print("💡 Check if your src folder exists and has properly named files.")
endMakefile:
# 🏗️ Makefile with LuaSilverChain integration.PHONY: organize build clean
organize:
@echo "🚀 Organizing project..."
lua build_script.lua
build: organize
@echo "⚙️ Compiling..."
gcc main.c imports/imports.functions.c -o myapp
clean:
@echo "🧹 Cleaning..."
lua -e "require('LuaSilverChain').remove('src')"
rm -f myapp
all: buildbuild_script.lua:
localsilverchain=require("LuaSilverChain")
silverchain.generate({
src="src",
tags= {"dependencies", "types", "functions"},
implement_main=true,
main_name="main.c"
})CMakeLists.txt:
cmake_minimum_required(VERSION3.10)
project(MyProject)
# 🚀 Custom target to organize codeadd_custom_target(organizeCOMMANDlua${CMAKE_CURRENT_SOURCE_DIR}/organize.luaWORKING_DIRECTORY${CMAKE_CURRENT_SOURCE_DIR}COMMENT"Organizing source code with LuaSilverChain"
)
# 📁 Add organized sourcesfile(GLOBORGANIZED_SOURCES"imports/*.c")
add_executable(myappmain.c${ORGANIZED_SOURCES})
# 🔗 Make sure organization happens before buildadd_dependencies(myapporganize).github/workflows/build.yml:
name: Build with LuaSilverChainon: [push, pull_request]jobs:
build:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v2
- name: Install Luarun: sudo apt-get install lua5.3
- name: Download LuaSilverChainrun: | curl -L https://github.com/OUIsolutions/LuaSilverChain/releases/download/0.1.1/LuaSilverChain.zip -o LuaSilverChain.zip unzip LuaSilverChain.zip - name: Organize Coderun: lua ci_build.lua
- name: Compilerun: gcc main.c imports/imports.functions.c -o myapp
- name: Testrun: ./myappci_build.lua:
localsilverchain=require("LuaSilverChain")
print("🤖 CI Build - Organizing project...")
silverchain.generate({
src="src",
tags= {"dependencies", "types", "functions"},
implement_main=true,
main_name="main.c"
})
print("✅ CI Build - Organization complete!")myproject-1.0-1.rockspec:
package="myproject"version="1.0-1"source= {
url="git://github.com/myuser/myproject.git"
}
dependencies= {
"lua >= 5.1"
}
build= {
type="make",
makefile="Makefile.luarocks",
build_variables= {
LUA_INCDIR="$(LUA_INCDIR)",
}
}Makefile.luarocks:
# 📦 LuaRocks compatible Makefilebuild:
lua organize.lua
gcc main.c imports/imports.functions.c -o myproject
install:
cp myproject $(DESTDIR)$(BINDIR)/myproject
clean:
lua -e "require('LuaSilverChain').remove('src')"
rm -f myproject❌ Problem:
lua: errorloadingmodule'LuaSilverChain' fromfile'./LuaSilverChain.so':✅ Solutions:
Check installation:
# Re-download the module curl -L https://github.com/OUIsolutions/LuaSilverChain/releases/download/0.1.1/LuaSilverChain.zip -o LuaSilverChain.zip && unzip LuaSilverChain.zip && rm LuaSilverChain.zip
Check Lua path:
# Make sure you're in the right directory ls -la LuaSilverChain/ cd LuaSilverChain/ # Run lua from here lua your_script.lua
Update package path in Lua:
-- Add this at the top of your scriptpackage.path=package.path..";./LuaSilverChain/?.lua"package.cpath=package.cpath..";./LuaSilverChain/?.so"localsilverchain=require("LuaSilverChain")
❌ Problem: Your files aren't being found by LuaSilverChain.
✅ Solution: Check your file naming:
# ❌ Wrong naming
src/
├── includes.h # Should be: dependencies.includes.h
├── my_types.h # Should be: types.my_types.h
└── functions.c # Should be: functions.something.c# ✅ Correct naming
src/
├── dependencies.includes.h
├── types.my_types.h
└── functions.math.c❌ Problem:
gcc: error: undefined reference to 'my_function'✅ Solutions:
Include implementation files:
# ❌ Missing .c files gcc main.c -o myapp # ✅ Include organized .c files gcc main.c imports/imports.functions.c -o myapp
Check include order in main.c:
// ✅ Correct order#include"imports/imports.dependencies.h"#include"imports/imports.types.h"#include"imports/imports.functions.h"intmain() { // Your code herereturn0; }
Q: Can I use custom tag names?
A: Yes! You can use any tag names you want:
silverchain.generate({
src="src",
tags= {"libs", "structs", "apis", "utils"} -- Custom names!
})Q: What's the best tag order for beginners?
A: Start simple:
tags= {"dependencies", "types", "functions"} -- Perfect for learning!Q: Can I organize the same project multiple times?
A: Yes, but clean up first:
-- 🧹 Clean previous organizationsilverchain.remove("src")
-- 🚀 Organize againsilverchain.generate({
src="src",
tags= {"dependencies", "functions"}
})Q: Does this work with C++?
A: LuaSilverChain is designed for C, but simple C++ might work. Try it:
silverchain.generate({
src="src",
tags= {"dependencies", "classes", "functions"} -- C++ style
})Q: Can I have multiple source directories?
A: Process them separately:
-- Organize multiple directoriessilverchain.generate({src="core", tags= {"dependencies", "types"}})
silverchain.generate({src="plugins", tags= {"dependencies", "types"}})
silverchain.generate({src="tests", tags= {"dependencies", "tests"}})Q: How do I integrate with my IDE?
A: Create a build task:
VS Code (tasks.json):
{
"version": "2.0.0",
"tasks": [
{
"label": "Organize with LuaSilverChain",
"type": "shell",
"command": "lua",
"args": ["organize.lua"],
"group": "build"
}
]
}🎯 Beginner Note: You don't need this section if you downloaded the ready-made module! This is only for people who want to compile LuaSilverChain themselves.
You'll need these tools installed:
- 🦄 Darwin Build System (Version 0.020+)
- 🐧 Linux Environment (recommended)
- ⚙️ GCC Compiler
- 🌙 Lua Development Headers
# Install Darwin build system
curl -L https://github.com/OUIsolutions/Darwin/releases/download/0.7.0/darwin.out -o darwin.out && sudo chmod +x darwin.out && sudo mv darwin.out /usr/bin/darwin# 1. Clone the repository
git clone https://github.com/OUIsolutions/LuaSilverChain.git
cd LuaSilverChain
# 2. Build the module
darwin run_blueprint build/ --mode folder
# 3. Test your build
lua -e "print(require('LuaSilverChain'))"# 🔨 Development build
darwin run_blueprint build/ --mode folder
# 🧹 Clean build
rm -rf LuaSilverChain/ && darwin run_blueprint build/ --mode folder
# 🚀 Release build
darwin run_blueprint build/ --mode folder amalgamation_build
# 🐞 Debug build
darwin run_blueprint build/ --mode folder --debugCreate custom_build.lua:
-- 🔧 Custom build script for developerslocalsilverchain=require("LuaSilverChain")
-- 🧪 Test the moduleprint("🧪 Testing LuaSilverChain module...")
-- Test basic functionalitysilverchain.generate({
src="test/src",
tags= {"dependencies", "functions"}
})
print("✅ Module test passed!")
-- Test removalsilverchain.remove("test/src")
print("✅ Removal test passed!")
print("🎉 All tests completed successfully!")- 🎓 Students: Script your C assignments with elegant Lua automation
- 🏢 Professional Development: Integrate into existing Lua-based build pipelines
- 📚 Library Creation: Automate organization in your Lua build tools
- 🚀 DevOps Engineers: Add to your Lua automation and deployment scripts
- 🎮 Game Developers: Organize game engine modules with Lua scripting power
"LuaSilverChain made organizing my C projects feel like magic! The Lua integration is perfect for my build scripts." - Game Developer
"Finally, I can automate SilverChain organization in my existing Lua workflows. This is exactly what I needed!" - DevOps Engineer
"The beginner examples are fantastic. I went from confused to confident in one afternoon!" - CS Student
- 🎮 Game Engine Builders: Automated asset pipeline organization
- 🏢 Enterprise Tools: Lua-based build system integration
- 📚 Educational Projects: Teaching C organization with Lua scripting
- 🔧 DevOps Pipelines: Automated code organization in CI/CD
- 🔗 SilverChain - The original C command-line tool
- 🌙 LuaSilverChain - This Lua wrapper (you are here!)
- 🦄 Darwin - The build system used to create SilverChain
- 🌙 Lua - The scripting language powering this wrapper
- 🔧 LuaRocks - Lua package management (coming soon!)
- 📦 GNU Make - Perfect for Makefile integration
- 🏗️ CMake - Modern build system integration support
- 🐛 Found a Bug?Create an Issue
- 💡 Have a Feature Idea?Suggest It Here
- ⭐ Like the Project? Give us a star on GitHub!
- 📖 Need Documentation? You're reading the most comprehensive guide available!
- 🎬 SilverChain Video Tutorial - Visual explanation of concepts
- 📖 Original SilverChain Docs - Deep dive into the underlying system
- 🌙 Lua Tutorial - Learn Lua programming
- 🔧 C Programming Guide - Master C development
# 🆘 Get help quickly
lua -e "print('LuaSilverChain Help:\n- require(\"LuaSilverChain\").generate({src=\"src\", tags={\"deps\", \"funcs\"}})\n- require(\"LuaSilverChain\").remove(\"src\")')"# 🧪 Test installation
lua -e "local sc = require('LuaSilverChain'); print('✅ LuaSilverChain installed correctly!')"# 📋 List available functions
lua -e "for k,v in pairs(require('LuaSilverChain')) do print('🔧 ' .. k .. ': ' .. type(v)) end"Made with ❤️ by OUIsolutions
Organizing C code with Lua magic, one script at a time! ✨🌙
-- 🚀 Essential LuaSilverChain Commandslocalsc=require("LuaSilverChain")
-- ✨ Organize projectsc.generate({src="src", tags={"deps","types","funcs"}})
-- 🧹 Clean up sc.remove("src")
-- 🎯 Full configurationsc.generate({
src="src",
tags= {"dependencies", "types", "functions"},
project_short_cut="MYPROJ",
implement_main=true,
main_name="app.c"
})🎉 Happy Coding!