Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here

lua-conf

Convert a lua table to a C object , and share it among many lua states .

Subscribe to updates I use lua-conf


Statistics on lua-conf

Number of watchers on Github 37
Number of open issues 1
Main language C
Average time to merge a PR 1 day
Open pull requests 0+
Closed pull requests 1+
Last commit about 5 years ago
Repo Created over 6 years ago
Repo Last Updated over 2 years ago
Size 226 KB
Organization / Authorcloudwu
Contributors3
Page Updated
Do you use lua-conf? Leave a review!
View lua-conf activity
View on github
Fresh, new opensource launches πŸš€πŸš€πŸš€
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating lua-conf for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

What's the lua-conf

lua-conf is a lua library , it can convert a lua table to a constant C object (a lightuserdata). And then you can share it among many lua states .

Why use lua-conf

  1. Reading the constant C object is thread safe , so you can use it in many lua states concurrently.
  2. If you convert a large lua table , it will reduce the memory usage of lua vm . So the garbage collector will run faster (mark less gc objects).
  3. Sometimes you need reload the lua vm , the constant data in the table don't need parser again.

Supported types

The keys must be a 32 bit integer or a string, the values can be boolean, string, number, and table.

How to build

Include the source luaconf.c in your project, or build it as a dynamic library.

gcc -O2 -Wall --shared -o conf.so luaconf.c   #linux
gcc -O2 -Wall --shared -o conf.dll luaconf.c -I/usr/local/include -L/usr/local/bin -llua52 # mingw

How to use

See test.lua

http://blog.codingnow.com/2014/04/lua-conf.html (In Chinese)

lua-conf open issues Ask a question     (View All Issues)
  • about 6 years ζŸ₯θ―’0δΌšε‡ΊηŽ°BUG
lua-conf list of languages used
Other projects in C