Open olofson opened 10 years ago
As of now, this could easily be implemented all in script (though preferably - but not necessarily - implementing the actual archive decompression in native code), without even modifying builtin.eel. Just add a loader to $.module_loaders!
Obviously, we should call them *.ear... Because eels (at least the electric variety - which, however, are not actually eels) have very good hearing, apparently!
Seriously, it would probably be a handy way of distributing multi-file libraries, engines and the like. They'd be attached to a "virtual overlay file system," allowing import directives and load() to work transparently. Naturally, this should also be exposed via the API, so scripts and host applications can read user data from the archives as well.
Do we use the classic libz, or use something more sophisticated? Being able to optionally drop in PhysicsFS (https://icculus.org/physfs/) would be nice, of course - so it might be an idea to model our API appropriately.
Do we build archive construction into the executive? And if so, with compression? Probably not; we can just make that part a native module (once that's implemented), so one can simply drop it in with distros if desired.