luakernel icon indicating copy to clipboard operation
luakernel copied to clipboard

Persistence

Open turbo opened this issue 6 years ago • 3 comments

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?

turbo avatar Nov 11 '18 12:11 turbo

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.

ers35 avatar Nov 13 '18 03:11 ers35

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.

turbo avatar Nov 13 '18 13:11 turbo

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.

Shadowblitz16 avatar Dec 05 '21 06:12 Shadowblitz16