https://github.com/juliaaplavin/runbinary.jl
Seamlessly run binaries from BinaryBuilder.
https://github.com/juliaaplavin/runbinary.jl
binary-builder external-binaries system-integration wrapper
Last synced: 3 months ago
JSON representation
Seamlessly run binaries from BinaryBuilder.
- Host: GitHub
- URL: https://github.com/juliaaplavin/runbinary.jl
- Owner: JuliaAPlavin
- License: mit
- Created: 2024-02-19T13:18:30.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-03-16T12:17:49.000Z (over 1 year ago)
- Last Synced: 2026-01-01T02:36:42.751Z (6 months ago)
- Topics: binary-builder, external-binaries, system-integration, wrapper
- Language: Julia
- Homepage:
- Size: 5.86 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Overview
Looking for a simple way to run binaries from the [YggDrasil](https://github.com/JuliaPackaging/Yggdrasil) repo? `RunBinary.jl` has you covered!
Under the hood, it performs the following steps:
- Activate a temporary environment, as in `]activate --temp`.
- Add the required jll package to this env.
- Import the jll and run the target executable.
# Usage from Julia
`RunBinary.jl` exports a single macro, `@run`.
```julia
julia> using RunBinary
```
Most basic usage: run a binary from a jll package with `@run .`. Here, `package` can be specified either with or without the `_jll` suffix.
For example,
```julia
julia> @run SQLCipher.sqlcipher
julia> @run ImageMagick_jll.identify
```
Can omit the binary name if the package contains only a single binary:
```julia
julia> @run SQLCipher
```
`RunBinary.jl` passes command-line arguments to the binary:
```julia
julia> @run ImageMagick_jll.identify `-version`
```
The binary is started in the current directory, as if it was ran normally from a shell.
`RunBinary.jl` can be executed via Julia CLI in a reasonably convenient way:
```bash
$ julia -e 'using RunBinary; @run ImageMagick_jll.identify `-version`'
```
(assuming `RunBinary` is installed in the global Julia environment).
# Command line usage
On Julia 1.12+, `RunBinary` can be installed as a standalone app:
```bash
$ julia -e 'import Pkg; Pkg.Apps.add("RunBinary")'
```
Then use it directly from the shell:
```bash
$ runbinary ImageMagick.identify --version
$ runbinary p7zip --help
$ runbinary ImageMagick.convert input.png output.jpg
```
Run `runbinary` without arguments to see usage help.