Comments (1)
Agreed*. In the past, we had to really jump through some hoops to get this binary into our environment--like Heroku. I had to build an asdf
script to help get the binary locally to non-Nix users as well.
*Disagreements: while this does help some setups and team, in the larger scope, delivering binaries via NPM is kind of anti-pattern--and NPM not having checksums means it's not a reliable tool when you could snipe an email and publish malicious code; in newer contracts/teams, we've avoided NPM as much as possible. Really our setups should be robust enough that adding another binary isn't seen as an issue to overcome. PureScript is PureScript, a tool separate and not inside of the Node ecosystem (though in practice has a lot of overlap).
There's also a lot of caveats to consider::
- what architecture is the user running
- does that system have
glibc
or not (I put note in the README about this, failing once to get it in a Alpine Docker container and then later failing to just pull the binary into Nix/NixOS)
These are real problems that would need to be solved. One could go the route of compiling a staticly-linked binary with llvm
+ musl
to get more portability on Linux, but macOS can't handle static binaries so what do you do? We see a loud bunch of ARM-based macOS users now demanding support while the ARM support on Linux and Windows exists but no one bothered to care. There's the BSDs... the list goes on. Making assumptions like isDarwin
or isLinux
is obviously myopic and NPM is not build to distribute binaries in a meaningful way like this so there's a lot of wheels to reinvent and hope to get right.
If it were me and I had infinite knowledge and time (lol), providing a flake.nix
with nixpkgs.pkgsMusl
and the like could go a long way--skipping NPM support altogether. Users of Nix could tap into this project with ease as an input
and the CI could build/cross-compile a large swath of binaries for various architectures for delivering to everyone else and even containers could be built and the sorry folks using *-compose
architectures as well. Everything here though applies to the state that Spago and even the PureScript compiler are in as well--which is the whole reason easy-purescript-nix
has to exist, patchelf
ing the binaries and dynamically linking to where Nix keeps its libs. That's not to say parts of the idea couldn't be used piecemeal like #65.
Between Nix, static bins, and containers, a lot more of the deployment space would be covered than bothering with NPM.
from zephyr.
Related Issues (20)
- Doesnt work with latest purescript
- Not compatible with PureScript 0.13.8 HOT 1
- "zephyr: output/Affjax/externs.json: openBinaryFile: does not exist" with purescript 0.13.8 HOT 4
- Build fails on macOS HOT 2
- language-javascript version in stack.yaml's extra-deps too low? HOT 2
- Build fails HOT 8
- Mention glibc requirement HOT 1
- `-f` removes exports used by other exports HOT 2
- Sometimes produces more code than just bundle-app alone HOT 4
- CI: add-path was deprecated HOT 3
- Binary fails with missing libtinfo.so.6 HOT 6
- Upgrade to PureScript v0.14 HOT 2
- Build with Nix HOT 1
- Get ready for ES modules in the new PureScript version HOT 7
- Halogen Hooks problems HOT 3
- Fails to parse corefn.json with 0.15.3 HOT 2
- (0.4.0) -f messes up unicode characters HOT 1
- Breaks after upgrading to PureScript 0.15 HOT 3
- macos-arm64 build
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zephyr.