Native Binary
Packaging a Native Binary
daedalus can package a pre-compiled ELF binary into a self-extracting executable.
No runtime embedding is needed — just the binary and its shared libraries.
Detection
The builder detects a native binary when a single ELF executable is found in the app directory and no other runtime (Python, Node, Java, etc.) is detected.
my-binary/
my-app ← ELF executable (auto-detected)
libfoo.so ← optional shared library
Build
daedalus build ./my-binary -o my-binary.de
The builder:
- detects the ELF binary via the
\x7fELFmagic bytes; - resolves its shared library dependencies via the ELF analyzer;
- packages the binary + libraries into the app layer;
- compresses and assembles the
.de.
How it works
No runtime interpreter is embedded. The launcher:
- extracts the binary and its
.sodependencies to the cache; - sets
LD_LIBRARY_PATHto include the extracted library directories; execvps the binary directly.
Shared library resolution
The Rust ELF analyzer reads DT_NEEDED, DT_RPATH, and DT_RUNPATH
entries from the ELF header to find all transitive shared library dependencies.
No host ldd is required.
daedalus inspect my-binary.de
# layers:
# - app 2.1MB compressed / 8.4MB raw (binary + .so files)
Cross-compilation
Native binaries cannot be cross-compiled by daedalus — the binary must already be
built for the target architecture. Use daedalus build --target aarch64 only for
interpreted runtimes (Python, etc.) where the interpreter can be downloaded for
the target arch.
Known limitations
- Only ELF binaries are supported (no PE/Windows, no Mach-O/macOS).
- Statically linked binaries (no
.sodependencies) work perfectly — the smallest possible.de. - Binaries with unusual loader paths (
/lib/ld-linux.so.2) may need the loader embedded in the rootfs.