Skip to content

hf/lua-noio

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
doc
 
 
src
 
 
 
 
 
 
 
 
 
 

Lua without IO

This is a customized version of Lua that does not do any IO.

You can toggle whether it's built with IO support in the luaconfig.h header, where you can undefine the LUA_NOIO flag.

Additionally, you'd need to change the src/Makefile to build lua and luac, as they use a lot of the Lua IO functionality.

src/noio is a test program that checks the no-IO setup.

Users of the no-IO version should probably implement these macros to provide output for their no-IO system, in lauxlib.h. They are noop by default.

/* print a string */
#if !defined(lua_writestring)
#define lua_writestring(s,l) {}
#endif

/* print a newline and flush the output */
#if !defined(lua_writeline)
#define lua_writeline() {}
#endif

/* print an error message */
#if !defined(lua_writestringerror)
#define lua_writestringerror(s,p) {}
#endif

License

Lua is free software and licensed under the MIT License by PUC-Rio.

All modifications herein are also licensed under the MIT License.

Read the full text in the LICENSE.txt file.

About

Lua without IO.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published