luakernel
luakernel copied to clipboard
Persistence
Hi,
Been playing around with this for a few hours. Neat project! I wonder though, is there a way to persist files to a local file system? I've noticed that there is a syscall wrapper for open/write etc. calls, but it isn't used in the actual lua demo.
What I want to do is basically build a disk image, instead of an ISO, so files can be written/read from the "OS".
Side question: Is there a technical reason why this uses lua, instead of luajit? Could it be easily replaced?
Writing to a local file system is not implemented. One idea is to use the included SQLite database instead of a filesystem.
Lua is used for simplicity as it only depends on C89. I haven't tried with LuaJIT.
Much is missing from luakernel as it's a proof of concept that hasn't had much development.
One idea is to use the included SQLite database instead of a filesystem.
That's actually what I had in mind. I've written a filesystem that's backed by SQLite (/comdb2) for an unrelated project. But I'd love a way to actually store the db file so that it can be modified permanently by the system.
Why no use lua files for configuration? you could even modify the lua interpreter and strip out the logical parts of the language, statically link it under a different like name so it can only be used for configuration. then you have a pure lua system.