https://github.com/hf/lua-noio
Lua without IO.
https://github.com/hf/lua-noio
lua
Last synced: about 1 month ago
JSON representation
Lua without IO.
- Host: GitHub
- URL: https://github.com/hf/lua-noio
- Owner: hf
- License: mit
- Created: 2019-02-09T13:14:30.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-11T17:00:57.000Z (about 7 years ago)
- Last Synced: 2024-12-31T06:29:54.347Z (over 1 year ago)
- Topics: lua
- Language: C
- Size: 344 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# 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.
```c
/* 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](http://www.puc-rio.br/index.html).
All modifications herein are also licensed under the MIT License.
Read the full text in the LICENSE.txt file.