AppBundler v0.6.0
Documentation | Examples
This release completes AppBundler’s core feature set by integrating system image generation and native compilation through JuliaC. The focus now shifts toward API refinement and documentation for the v1.0 release—feedback on naming and API design is welcome.
System image generation
AppBundler now includes SysImgTools, a module that handles system image creation in ~100 lines by building on Base.Linking. This eliminates the need for external compiler installation. To create a system image, specify which packages to bake in:
spec = JuliaAppBundle(project; sysimg_packages = ["QMLApp"])
dmg = DMG(project; windowed = true)
bundle(spec, dmg, joinpath(build_dir, "qmlapp.dmg"))
For project dependencies not included in sysimg_packages, precompilation cache is used instead. This enables hybrid approaches where critical packages use system images while others rely on pkgimages—useful for Julia distributions with GUI shells, significantly improving startup times.
Selective assets
Applications can now include only specified assets, reducing distribution size:
asset_spec = Dict{Symbol, Vector{String}}(
:QMLApp => ["src/App.qml"]
)
spec = JuliaAppBundle(project; sysimg_packages = ["QMLApp"],
asset_rpath = "assets", asset_spec)
This creates an assets directory with declared files accessible via pkgdir(@__MODULE__), while removing redundant source files. AppEnv launched via startup.jl handles this by reading a pkgorigins index at startup from $(dirname(Sys.BINDIR))/index, which maps packages to their asset locations, providing flexibility in where assets can be stored.
JuliaC integration and AppEnv
Bundling with JuliaC compilation is now supported. AppEnv package handles platform-specific initialization through a config file at $(dirname(Sys.BINDIR))/config:
import AppEnv
function (@main)(ARGS)
AppEnv.init()
println(AppEnv.USER_DATA) # Sandbox-assigned user data directory
println(pkgdir(@__MODULE__)) # Points to assets when compiled
end
To compile and bundle the application using JuliaC:
asset_spec = Dict{Symbol, Vector{String}}(
:AppEnv => ["LICENSE"]
)
spec = JuliaCBundle(project; asset_spec, trim = true)
msix = MSIX(project; windowed = false)
bundle(spec, msix, joinpath(build_dir, "cmdapp.msix"))
During interactive development, AppEnv.init() is safely ignored. With trimming enabled, simple applications reach 20 MB (Snap) or 40 MB (MSIX). Compiled applications integrate with platform conventions—appearing as cmdapp.exe on Windows and cmdapp on Linux.
Future work and v1.0
The project is feature-complete. Work now focuses on API polish, comprehensive documentation, and addressing community feedback. See test/release.jl for complete examples until documentation is finalized.