# \[ANN\] RunBinary.jl: easily run binaries from YggDrasil

**URL:** https://discourse.julialang.org/t/ann-runbinary-jl-easily-run-binaries-from-yggdrasil/63179
**Category:** Package Announcements
**Created:** [June 19, 2021, 11:26am UTC](https://discourse.julialang.org/t/ann-runbinary-jl-easily-run-binaries-from-yggdrasil/63179 "2021-06-19T11:26:45Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)
#### Post date: [June 19, 2021, 11:26am UTC](https://discourse.julialang.org/t/ann-runbinary-jl-easily-run-binaries-from-yggdrasil/63179/1 "2021-06-19T11:26:45Z")

</div>

Thanks to `BinaryBuilder`, some programs are now much easier to install as Julia \*\_jll packages compared to other solutions. However, simple no-setup ways to run these programs were not available yet to my knowledge.

This is where [RunBinary.jl](https://gitlab.com/aplavin/RunBinary.jl) (registered) comes to help. Its API consists of a single macro `@run` that installs the required jll package in a temporary environment and executes the specified binary:

```julia
@run SQLCipher.sqlcipher

```

A common usecase is to run via CLI:

```bash
$ julia -e 'using RunBinary; @run ImageMagick.identify `/path/to/file.jpg`'

```

For more details and options, see [README](https://gitlab.com/aplavin/RunBinary.jl).

The overhead is just about 2 seconds on my laptop:

```bash
$ time julia -e 'using RunBinary; @run HelloWorldC'
...
Hello, World!
2.20s user 0.86s system 144% cpu 2.116 total

```

This includes starting julia, creating a new temporary env, instantiating it, and running the target program. It further improves fourfold to 0.5 seconds with `--compile=min`.

---

<div class="post-metadata">

### Author: ![oschulz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oschulz/32/2998_2.png) [@oschulz](https://discourse.julialang.org/u/oschulz)
#### Post date: [June 19, 2021, 11:44am UTC](https://discourse.julialang.org/t/ann-runbinary-jl-easily-run-binaries-from-yggdrasil/63179/2 "2021-06-19T11:44:42Z")

</div>

There’s also [ygg](https://github.com/fredrikekre/ygg) (see also [Announcing ygg](https://discourse.julialang.org/t/announcing-ygg/54687)), maybe there’s some synergy potential here?

---

<div class="post-metadata">

### Author: ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)
#### Post date: [June 19, 2021, 11:50am UTC](https://discourse.julialang.org/t/ann-runbinary-jl-easily-run-binaries-from-yggdrasil/63179/3 "2021-06-19T11:50:44Z")

</div>

Indeed, @ericphanson pointed me to `ygg` in slack when I asked about it.  
As I understand, `ygg`’s approach is aimed at a somewhat different case of using jll binaries: set up all required programs beforehand, add paths to $PATH, etc.  
`RunBinary` is the alternative for running these programs in a more ad-hoc way with no additional setup needed (only julia + `]add RunBinary`), and everything is garbage-collected by Pkg when not in use.  
But I agree, in principle there may be some overlap…

---

<div class="post-metadata">

### Author: ![oschulz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oschulz/32/2998_2.png) [@oschulz](https://discourse.julialang.org/u/oschulz)
#### Post date: [June 19, 2021, 1:03pm UTC](https://discourse.julialang.org/t/ann-runbinary-jl-easily-run-binaries-from-yggdrasil/63179/4 "2021-06-19T13:03:19Z")

</div>

Thanks, @ericphanson !

---

<div class="post-metadata">

### Author: ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)
#### Post date: [January 2, 2025, 9:38pm UTC](https://discourse.julialang.org/t/ann-runbinary-jl-easily-run-binaries-from-yggdrasil/63179/5 "2025-01-02T21:38:13Z")

</div>

RunBinary.jl happened to be one of those rare packages that don’t need any maintenance for years 🙂 It’s one of my first Julia packages and has been working reliably since creation. It also remains compatible with all Julia versions since 1.6.

Julia + BinaryBuilder still is one of the easiest ways to install various software (assuming you have Julia installed already). And RunBinary.jl is a simple frontend to make ad-hoc install & run workflows maximally convenient.

There’s just one real update since 2021, in version 0.1.1 that should be registered momentarily:  
Recently, I learned that one can silence Pkg operations by passing `io=devnull`. This allowed me to make RunBinary.jl usage even cleaner, now there’s no extra output at all – only what the underlying binary prints:

```julia
❯ julia -e 'using RunBinary; @run SQLite `-version`'
3.47.2 2024-12-07 20:39:59 2aabe05e2e8cae4847a802ee2daddc1d7413d8fc560254d93ee3e72c14685b6c (64-bit)

```

Pass `verbose=true` for the old (very verbose) behavior in case you need it for debugging:

```julia
❯ julia -e 'using RunBinary; @run SQLite `-version` verbose=true'
  Activating new project at `/var/folders/2j/9vtd991d201dbkh9dnx3wvy00000gq/T/jl_v6ZX81`
   Resolving package versions...
    Updating `/private/var/folders/2j/9vtd991d201dbkh9dnx3wvy00000gq/T/jl_v6ZX81/Project.toml`
  [76ed43ae] + SQLite_jll v3.47.2+2
    Updating `/private/var/folders/2j/9vtd991d201dbkh9dnx3wvy00000gq/T/jl_v6ZX81/Manifest.toml`
  [692b3bcd] + JLLWrappers v1.7.0
  [21216c6a] + Preferences v1.4.3
  [76ed43ae] + SQLite_jll v3.47.2+2
  [56f22d72] + Artifacts v1.11.0
  [ade2ca70] + Dates v1.11.0
  [8f399da3] + Libdl v1.11.0
  [de0858da] + Printf v1.11.0
  [fa267f1f] + TOML v1.0.3
  [4ec0a83e] + Unicode v1.11.0
  [83775a58] + Zlib_jll v1.2.13+1
3.47.2 2024-12-07 20:39:59 2aabe05e2e8cae4847a802ee2daddc1d7413d8fc560254d93ee3e72c14685b6c (64-bit)
  Activating project at `~/.julia/environments/v1.11`

```

The only other thing I wish RunBinary.jl had is an easier way to run it. Something like `julia -m RunBinary SQLite file.db`?.. This may become possible in the next Julia version.

---

<div class="post-metadata">

### Author: ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)
#### Post date: [February 20, 2026, 11:35pm UTC](https://discourse.julialang.org/t/ann-runbinary-jl-easily-run-binaries-from-yggdrasil/63179/6 "2026-02-20T23:35:54Z")

</div>

# RunBinary.jl is now a Julia App

The most recent Julia version (1.12) supports so-called “apps”, and now RunBinary.jl can utilize this!

Run:

```julia-auto
import Pkg; Pkg.Apps.add("RunBinary")

```

in Julia 1.12 to install the app, which then should become available from your terminal as:

```julia-auto
runbinary ImageMagick.convert input.png output.jpg
runbinary SQLCipher database.db
runbinary difmap
...

```

for any binary available as a jll (mostly, from the Yggdrasil repo).

One time setup – to easily run any available binary in an ad-hoc way 🤩

* * *

Please report if anything doesn’t work, I’m new to the “julia apps” setup.

---

<div class="post-metadata">

### Author: ![mchitre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mchitre/32/13756_2.png) [@mchitre](https://discourse.julialang.org/u/mchitre)
#### Post date: [March 10, 2026, 6:35am UTC](https://discourse.julialang.org/t/ann-runbinary-jl-easily-run-binaries-from-yggdrasil/63179/7 "2026-03-10T06:35:23Z")

</div>

Neat! Is there a way to run a binary from a JLL package installed in some environment (not globally)? Like: `runbinary --project=@img ImageMagick.convert input.png output.jpg`?

---

<div class="post-metadata">

### Author: ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)
#### Post date: [March 10, 2026, 1:09pm UTC](https://discourse.julialang.org/t/ann-runbinary-jl-easily-run-binaries-from-yggdrasil/63179/8 "2026-03-10T13:09:43Z")

</div>

> [@mchitre](#):
>
> not globally

`runbinary` doesn’t use and doesn’t affect the global Julia environment. Everything is installed into a temporary env – the idea is to have everything automatic, no manual setup nor cleanup.

---

<div class="post-metadata">

### Author: ![mchitre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mchitre/32/13756_2.png) [@mchitre](https://discourse.julialang.org/u/mchitre)
#### Post date: [March 10, 2026, 2:53pm UTC](https://discourse.julialang.org/t/ann-runbinary-jl-easily-run-binaries-from-yggdrasil/63179/9 "2026-03-10T14:53:03Z")

</div>

Oh, neat!

---

<div class="post-metadata">

### Author: ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)
#### Post date: [March 10, 2026, 3:13pm UTC](https://discourse.julialang.org/t/ann-runbinary-jl-easily-run-binaries-from-yggdrasil/63179/10 "2026-03-10T15:13:16Z")

</div>

So I suppose that ends up being a key difference with `ygg` — that’s a more traditional package manager with installation and version management, whereas this is a “just give me the latest version on the fly” sort of thing.

In practice, do you find it ends up GC’ing and re-downloading the JLLs often?

---

<div class="post-metadata">

### Author: ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)
#### Post date: [March 10, 2026, 4:52pm UTC](https://discourse.julialang.org/t/ann-runbinary-jl-easily-run-binaries-from-yggdrasil/63179/11 "2026-03-10T16:52:31Z")

</div>

Yes, `runbinary` definitely aims to make running “anything” as simple as possible, no per-binary installation. Conceptually close to `comma` in Nix ecosystem.  
I didn’t systematically measure how often GC/redownloads trigger, but it just reuses the existing Pkg cache policies.
