Developing Packages
onelf run is a dev-loop helper: it runs an AppDir directly without packing. Iterate fast by tweaking files and re-running.
First-time setup
Scaffold a recipe:
cd myapp/
onelf init --binary /path/to/mybinaryThis writes myapp/onelf.toml seeded with sensible defaults.
Then run it, bundling libs on the first pass:
onelf run --bundleSubsequent runs just exec (libs are already bundled):
onelf runDev loop
# Edit recipe or source, rebuild the binary, then:
onelf run
# If you added new dependencies:
onelf run --bundleRunning without a recipe
If your AppDir has no onelf.toml but has a single binary under bin/, onelf run auto-detects it:
onelf run ./myappIf there are multiple binaries, pass --command:
onelf run ./myapp --command bin/helperPassing arguments
Anything after -- goes to the app:
onelf run -- --verbose --config ./dev.tomlOr for named entrypoints:
onelf run --entrypoint myapp-daemon -- --port 8080What onelf run sets up
Same as a real packed run, minus the mount:
ONELF_DIR,ONELF_MODE=dev,ONELF_ARGV0, etc.LD_LIBRARY_PATHprepended with the AppDir's lib directoriesXDG_DATA_DIRSprepended withshare/LIBGL_DRIVERS_PATH,LIBVA_DRIVERS_PATH,GBM_BACKENDS_PATHif the corresponding subdirs exist
For cross-libc packages, onelf run detects a missing PT_INTERP and invokes the bundled ld-musl or ld-linux directly, just like the packed runtime does.
Packing for distribution
Once the recipe is stable:
onelf build # produces myapp.onelf
onelf verify myapp.onelf # sanity checkClean / reset
The lib/ directory and .onelf/ metadata are managed by onelf. To start fresh, delete them:
rm -rf myapp/lib myapp/.onelf myapp/myapp.onelf
onelf build