Hi everyone I'm new here and i wanted to introduce my project i've been working on.
Astra is a simple but powerful node.js to exe compiler. It uses esbuild and Node SEA. It uses postject to inject your code to nodejs binary. It focuses more on compiling cli and Servers like pkg or nexe (express) than fullstack applications like electron or tauri. It has rich ESM and typescript support. It has good DX and cli UX. I made it bc i didn't like using pkg or nexe, they cause a lot of problems with esm.
LIMITATIONS: Now it has problems compiling projects with depencides containing binaries (e.g. bcrypt, rcedit), and it compiles only for Windows but i'm working on it
If you like it, leave a and comment what you think about it!
- The first thing on the "features" list should be something that other compilers cannot do. Esthetics (maybe just say "DX"?) is a nice to have - sometimes VERY nice to have - but should not be positioned as the most important item.
As the original post says the alternatives have poor ESM support - that's a good differentiator.
- Even though ES Modules are part of the ECMAScript standard, having a header stating "(Partial) Support for ECMAScript"- to me, at least - indicates the project does not support base JS features, not that ESM imports have problems. Maybe say "improved ESM support"?
- Docs seem a little bare. For example, the Usage section says:
Which machine is the "target" machine? I would assume, in the context of compiling, that the target would be the machine you are compiling for... but installing software remotely seems out of scope. Does it install it locally, or swap the bundled installation in the .exe?Also, no mention of binary limitations in actual docs, despite mention in post.
Hopefully this does not come off as discouraging - this looks like a good project.
I wish the JS universe would stop inventing new and wrong names for things.
(That said, this thing is at least using postject for actual insertion of the payload blob into the target executable, and based on its README, postjecth as the good taste to embed data as PE/ELF/Mach-O sections instead (as Bun does) of just YOLOing the attachment with cat.)
I used the term "compiler" because for many developers, it’s strongly associated with "turning source code into a single binary." That’s what Astra does at a practical level - even if it's technically just bundling and embedding into a node executable using SEA and postject.
Using things because they sound nice without thinking about whether they make sense is pretty much the whole JavaScript community. :)
So in a way, the "magic sauce" it that it doesn't try to do anything fancy. I made astra beacuse i needed to compile js to exe for latest versions.
I wanted astra to be simple, built on official tools, and be future-proof.
Deleted Comment
I'm not sure what the use case is and it doesn't auto-load chromium with its own web server from what I can tell. Is it just for creating javascript CLI utilities?
Nothing wrong with that, but why call it a compiler instead of bundler which would make the intension obvious