Announcing ygg

ygg

ygg is a simple installer for using BinaryBuilder.jl built binaries from Yggdrasil outside of Julia. Installing ygg is simple (see the README), and then installing binaries is even simpler. Here is an example of adding the fzf fuzzy finder:

$ ygg install fzf

The list of binaries that is currently available (see README) is just the ones I have used myself. Adding new ones is, generally, as simple as adding a line in the Makefile as in this commit. Feel free to add your favorite program to the list and make a pull request!

Why?

Most binaries can of course be installed using system package managers, but here are some reasons for using ygg instead:

  • There are A LOT of stuff available in Yggdrasil.
  • If you are using Julia it is likely that you already have the binaries inside .julia/artifacts/* and ygg makes them usable outside Julia too.
  • Versions available in system package managers are often outdated whereas in Yggdrasil, generally, the latest versions are built. For example, my system package manager gives me git version 2.7, but from Yggdrasil you get version 2.27.

I know this is not directly related to Julia, but I hope some of you might find this useful!

/Fredrik

51 Likes

For anyone else that misread this at first: x.27 is a newer version than x.7. It’s not x.2.7 after all (note the extra dot).

5 Likes

7 posts were split to a new topic: Disgruntled with JLLs

Excellent! I think of this like a Linux distro or Homebrew but portable to Windows, macOS, Linux and FreeBSD, instead of being only for one of those kinds of systems. Conda is a little like this but they use different compilers for different architectures, so the results are less comparable across systems.

But unlike Linux distros aside from Nix, everything it installs is immutable and content-addressed. Yggdrasil also differs from Nix in that it supports more than just Linux and instead of building packages from source, binaries are prebuilt for each target platform and can simply be downloaded, unpacked, put in the right place and used without compilation.

17 Likes

Awesome! I for one, look forward to a linux distro that uses this as its package manager. :smiley:

Does this assume that the user has Julia installed already? If so, we should perhaps make that explicit. If Julia is not required to be installed to use this, then perhaps there’s a way we can use this for users to install julia itself, that’d be really nice.

Yes, it creates shims that are just small Julia scripts, so it does require a Julia install.

Yea, I will add that to the README.

The shims themselves are just bash scripts.

2 Likes

Oops, sorry, I misread that. The bash script just ends up running the Julia script though, right?

No, they just invoke the binary directly:

$ cat fzf 
#!/bin/bash
exec env LD_LIBRARY_PATH="..." PATH="..." fzf "$@"

Oh, I did not realize that. That’s super cool! At the risk of embarassing myself further, I did understand correctly though that to generate these, it installs the JLL and then extracts the path and environment from there?

Does ygg actually ensure that artifacts are not accidentally cleaned up when running Pkg.gc()?

Yea correct.

Kinda, since Pkg does not GC artifacts from active manifests, and ygg keeps the manifest around.

4 Likes

instead of building packages from source, binaries are prebuilt for each target platform and can simply be downloaded, unpacked, put in the right place and used without compilation.

FWIW that’s true in Nix too. The Nixpkgs cache has terabytes of built packages for various platforms.

Yggdrasil also differs from Nix in that it supports more than just Linux

Nix works on MacOS and I believe on Windows too.

3 Likes

WSL is not Windows

1 Like