-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement simple packager #25
Comments
Yeah, that would be really nice! We can basically just pack up pixie-vm + dust + the library, but we also need to specify what program to run after unpacking. (Or we read it from a On Linux, we could unpack to |
Kinda, I was thinking not to bundle dust with it, try to make it slim and use the project.edn to generate a thin startup script with things like the entry point derived from project.edn and proper load path, and have all the dependencies prefetched on the dev machine and bundled in the archive. Then we don't need to bundle dust, worry about curl presence or whatnot, it makes deploys to other OSes even ok'ish in the long run. For the unpacking yes, something of that sort this could be as simple as |
Ah yes, baking-in the load path makes sense. To make things start up more quickly we can (and should) byte-compile everything as well. |
Yes that what I mean with "trigger compilation (pxic)", sorry I am not super clear, just throwing ideas :] |
I have written a tarfile reader in pixie so it would be possible to make a tar.gz of a byte compiled library with all its dependencies and read them as though they were extracted. |
@thomasmulvaney the problem is that pixie would have to be installed first in that case. |
Unfortunately my bash-foo is very weak, I could probably get something working but this will be poorly written. Feel free to take over this task. |
I've got an example up and running. It's not automated, but it works™. By dark magic, you'll have to assemble the pixie stdlib, your dependencies and your own code into a directory. It will look something like the following:
In addition, I added a top-level
Now you can use
And then you have to automate this... Maybe I'll try that tomorrow, but if anyone wants to take over, feel free to do so! |
Cool stuff. |
Since we cannot statically compile (yet) libs + the runtime, it could be nice to have a way to bundle pixie-vm with a lib and it's dependencies and have some kind of startup script for it to make it "transparent".
This could be something similar to makeself or UPX
From a quick test we could shrink pixie-vm to 3.1 mo with compression. That command would resolve all depedencies of a project, trigger compilation (pxic), create a platform specific script and bundle all the compiled files with pixie-vm. Upon execution the first time it would uncompress all of it in a temp/local directory and run a startup command.
This is nothing too fancy but that would make distribution a bit easier.
The text was updated successfully, but these errors were encountered: