@tintvrtkovic Can also be done using npmjs.com with a thin JS wrapper.
@kevin @tintvrtkovic I thought for that to work with an npm package you either needed to include binaries for all platforms or have a custom install script that figured out what file to download and ultimately install?
@brettcannon @tintvrtkovic Yes, that's true. NPM doesn't have a concept equivalent to 'wheels' so choosing and installing a binary package for the specific architecture required has to be done by a JS program. It's pretty much a copy-and-paste thing though, there are lots of examples out there in the wild.
@kevin @brettcannon @tintvrtkovic Does any other language ecosystem have an equivalent concept to wheels (i.e. built binaries with compatibility guarantees)?
@pradyunsg @brettcannon @tintvrtkovic I can't think of one... there are things like Homebrew but that's not a language ecosystem.
@brettcannon @kevin @pradyunsg @tintvrtkovic Ruby has some equivalent thing I think, no? Is that what a gem is?
@pganssle @brettcannon @kevin @tintvrtkovic
IIUC, Ruby's native gems still trigger a compile at install time on the user's machine.
And, prebuild is quite close! Although it seems the generated binaries live outside of the NodeJS index/dependency resolution (eg: https://github.com/wadey/node-microtime/releases). https://unpkg.com/browse/mutou-micro@1.0.0-14/ shows a package that is "just" copying a bundled binary with custom logic instead of compiling in certain circumstances.
@pradyunsg @pganssle @kevin @tintvrtkovic Yeah, npm doesn't have a similar concept of wheels. You either upload a package with all compiled bits for all platforms as one thing or you run an install script to download the appropriate file from somewhere else (e.g. the PyTorch sdist hack).
I still haven't heard of a scenario where another ecosystem can just download the pre-compiled binaries and unzip them like we have with wheels. OCI container images might be the closest.
@pradyunsg @brettcannon @kevin @tintvrtkovic I can't tell if that is right. I distinctly remember that Ruby used to be a pain like Python was (requiring a compiler, etc), and then they had a change similar to our change with wheels that made it not a pain.
I just created a bundle with `nokogiri` and `sqlite3` and this was included in the verbose output:
```
Fetching racc 1.8.1
Fetching sqlite3 2.4.1 (x86_64-linux-gnu)
Installing racc 1.8.1 with native extensions
Installing sqlite3 2.4.1 (x86_64-linux-gnu)
Fetching nokogiri 1.17.1 (x86_64-linux)
Installing nokogiri 1.17.1 (x86_64-linux)
Bundle complete! 2 Gemfile dependencies, 4 gems now installed.
Bundled gems are installed into `./.vendor/bundle`
```
That makes me think that `racc` has native code that needed to be compiled, but `sqlite3` and `nokogiri` had some pre-built binaries available. Maybe a #ruby person can chime in if I'm misunderstanding it.
@brettcannon @kevin @pradyunsg @tintvrtkovic Looking into it a bit, seems like Ruby definitely has equivalent of a wheel ("native gems" I think they are called) and npm has something like this as well, looking at this: https://www.npmjs.com/package/prebuild