GitHub release (latest by date) GitHub GitHub Repo stars Lua Platform
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 PowerShell Invoke-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! local silverchain = require("LuaSilverChain") -- ๐ฏ Organize your project in one simple command! silverchain.generate({ src = "my_project", -- ๐ Your source folder tags = {"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:
#ifndef CALCULATOR_TYPES_H #define CALCULATOR_TYPES_H typedef struct { double result; char operation; } Calculator; #endif
functions.math.h:
#ifndef MATH_FUNCTIONS_H #define MATH_FUNCTIONS_H double add(double a, double b); double subtract(double a, double b); #endif
functions.math.c:
double add(double a, double b) { return a + b; } double subtract(double a, double b) { return a - b; }
๐ Now, let's organize everything with LuaSilverChain:
Create build_calculator.lua:
-- ๐งฎ Calculator Project Organizer local silverchain = 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:
#ifndef PERSON_TYPES_H #define PERSON_TYPES_H typedef struct { char name[50]; int age; } Person; #endif
src/functions.person.h:
#ifndef PERSON_FUNCTIONS_H #define PERSON_FUNCTIONS_H void print_person(Person p); Person create_person(const char* name, int age); #endif
src/functions.person.c:
void print_person(Person p) { printf("Name: %s, Age: %d\n", p.name, p.age); } Person create_person(const char* name, int age) { Person p; strcpy(p.name, name); p.age = age; return p; }
3. Create your Lua organizer script:
organize_person.lua:
-- ๐ค Person Project Organizer local silverchain = require("LuaSilverChain") print("๐ Organizing Person project...") -- ๐ฏ Main organization silverchain.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.lua
5. 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:
local silverchain = require("LuaSilverChain") silverchain.generate({ -- โ REQUIRED OPTIONS src = "src", -- ๐ Source folder to organize tags = {"dependencies", "types", "functions"}, -- ๐ท๏ธ Organization tags (in order!) -- ๐๏ธ OPTIONAL OPTIONS (with defaults) project_short_cut = "MYPROJECT", -- ๐ Project name for #ifndef guards implement_main = false, -- ๐ฏ Create main.c file? main_name = "main.c", -- ๐ Name of main file main_path = nil, -- ๐ Custom path to main file import_dir = "imports" -- ๐ Where to save organized files })
Remove the organized imports folder:
local silverchain = require("LuaSilverChain") -- ๐๏ธ Clean up the imports folder silverchain.remove("src") -- This removes src/imports folder print("๐งน 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" |
local silverchain = require("LuaSilverChain") -- ๐ฏ Simple organization - perfect for learning! silverchain.generate({ src = "src", tags = {"dependencies", "types", "functions"} })
local silverchain = require("LuaSilverChain") -- ๐๏ธ Custom configuration with main file creation silverchain.generate({ src = "my_project", tags = {"deps", "consts", "types", "funcs"}, project_short_cut = "MYPROJ", implement_main = true, main_name = "myapp.c", import_dir = "organized_code" })
local silverchain = require("LuaSilverChain") -- ๐ Complex project with multiple modules silverchain.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 ๐ง
local silverchain = 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:
local silverchain = 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:
local silverchain = require("LuaSilverChain") print("๐ฎ Organizing Game Engine...") -- ๐ Complex game engine organization silverchain.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:
local silverchain = require("LuaSilverChain") -- ๐ Configuration local config = { project_name = "MyEnterpriseApp", version = "1.0.0", src_dir = "src", output_dir = "dist/organized" } print("๐ข Building " .. config.project_name .. " v" .. config.version) -- ๐งน Clean previous build silverchain.remove(config.src_dir) -- ๐๏ธ Organize project silverchain.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:
local silverchain = require("LuaSilverChain") -- ๐ค Automated build pipeline function build_project() print("๐ Starting automated build...") -- ๐งน Step 1: Clean print("๐งน Cleaning previous build...") silverchain.remove("src") -- ๐๏ธ Step 2: Organize print("๐๏ธ 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...") local compile_result = os.execute("gcc auto_app.c imports/imports.funcs.c -o auto_app 2>/dev/null") if compile_result == 0 then print("โ Build successful! Executable: auto_app") else print("โ ๏ธ Organization complete, but compilation failed.") print("๐ก Please compile manually: gcc auto_app.c imports/imports.funcs.c -o auto_app") end print("๐ Automated build complete!") end -- ๐โโ๏ธ Run the build build_project()
Create watch_build.lua for development mode:
local silverchain = require("LuaSilverChain") -- ๐ Configuration local watch_config = { src_dir = "src", check_interval = 2, -- seconds last_modified = 0 } function get_directory_modified_time(dir) -- Simple modification detection (works on Unix-like systems) local handle = io.popen("find " .. dir .. " -type f -exec stat -c %Y {} \\; 2>/dev/null | sort -n | tail -1") local result = handle:read("*a") handle:close() return tonumber(result) or 0 end function rebuild_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")) end print("๐ 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 build rebuild_project() watch_config.last_modified = get_directory_modified_time(watch_config.src_dir) -- ๐ Watch loop while true do local current_modified = get_directory_modified_time(watch_config.src_dir) if current_modified > watch_config.last_modified then rebuild_project() watch_config.last_modified = current_modified end -- ๐ด Sleep os.execute("sleep " .. watch_config.check_interval) end
Don't do this:
-- โ This will fail! local silverchain = require("silverchain") -- Wrong name!
Do this instead:
-- โ Correct way local silverchain = 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 tags silverchain.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 tags silverchain.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 gracefully local success, error_msg = pcall(function() silverchain.generate({ src = "src", tags = {"dependencies", "functions"} }) end) if success then print("โ Project organized successfully!") else print("โ Error: " .. tostring(error_msg)) print("๐ก Check if your src folder exists and has properly named files.") end
Makefile:
# ๐๏ธ 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: build
build_script.lua:
local silverchain = require("LuaSilverChain") silverchain.generate({ src = "src", tags = {"dependencies", "types", "functions"}, implement_main = true, main_name = "main.c" })
CMakeLists.txt:
cmake_minimum_required(VERSION 3.10) project(MyProject) # ๐ Custom target to organize code add_custom_target(organize COMMAND lua ${CMAKE_CURRENT_SOURCE_DIR}/organize.lua WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Organizing source code with LuaSilverChain" ) # ๐ Add organized sources file(GLOB ORGANIZED_SOURCES "imports/*.c") add_executable(myapp main.c ${ORGANIZED_SOURCES}) # ๐ Make sure organization happens before build add_dependencies(myapp organize)
.github/workflows/build.yml:
name: Build with LuaSilverChain on: [push, pull_request] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install Lua run: sudo apt-get install lua5.3 - name: Download LuaSilverChain run: | curl -L https://github.com/OUIsolutions/LuaSilverChain/releases/download/0.1.1/LuaSilverChain.zip -o LuaSilverChain.zip unzip LuaSilverChain.zip - name: Organize Code run: lua ci_build.lua - name: Compile run: gcc main.c imports/imports.functions.c -o myapp - name: Test run: ./myapp
ci_build.lua:
local silverchain = 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 Makefile build: 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: error loading module 'LuaSilverChain' from file './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 script package.path = package.path .. ";./LuaSilverChain/?.lua" package.cpath = package.cpath .. ";./LuaSilverChain/?.so" local silverchain = 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" int main() { // Your code here return 0; }
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 organization silverchain.remove("src") -- ๐ Organize again silverchain.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 directories silverchain.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 --debug
Create custom_build.lua:
-- ๐ง Custom build script for developers local silverchain = require("LuaSilverChain") -- ๐งช Test the module print("๐งช Testing LuaSilverChain module...") -- Test basic functionality silverchain.generate({ src = "test/src", tags = {"dependencies", "functions"} }) print("โ Module test passed!") -- Test removal silverchain.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 Commands local sc = require("LuaSilverChain") -- โจ Organize project sc.generate({src="src", tags={"deps","types","funcs"}}) -- ๐งน Clean up sc.remove("src") -- ๐ฏ Full configuration sc.generate({ src = "src", tags = {"dependencies", "types", "functions"}, project_short_cut = "MYPROJ", implement_main = true, main_name = "app.c" })
๐ Happy Coding!