Juliacon 2024

App support in Pkg
07-10, 15:00–15:30 (Europe/Amsterdam), REPL (2, main stage)

This presentation explores the design and implementation of a new feature in Pkg, enabling the installation of "apps" - Julia programs launched directly by their name in the terminal.

Most Julia packages function as "libraries," loaded by users or other packages, with their functions (API) being subsequently called. However, certain Julia packages are better categorized as "applications" where you don't really call any functions in them but either communicate with them though stdin and stdout or via a GUI. Notable examples include Pluto.jl and IJulia.jl. Currently, to launch these, one must initiate a Julia session, load the package, and execute specific commands like Pluto.run() or IJulia.notebook().

For such application-oriented packages, initiating them by simply typing their name in the terminal would be more convenient. Additionally, installing applications in a shared environment with other packages can lead to compatibility conflicts due to dependency issues.

This presentation introduces a new functionality in Pkg where a Julia package can declare itself to contain applications. Users can then effortlessly install these applications using Pkg, making them readily executable from the terminal. This feature encompasses handling updates, precompilation, and other aspects to ensure a seamless user experience.

Software engineer for JuliaHub, worked on many open source projects including Pkg.jl, PackageCompiler.jl and Julia itself.

This speaker also appears in: