Project details
Liella offers a clean-room implementation of glibc 2.39, tailored for x86-64 Linux using Rust. By adhering to glibc's conventions and structures, it aims to be an alternative for running programs that require glibc compatibility, although it is currently under development and not ready for production use.
Liella is an innovative clean-room implementation of the GNU C library (glibc) 2.39 ABI tailored specifically for x86-64 Linux, developed using Rust. The project aims to deliver a library that accurately replicates glibc's symbols, calling conventions, data layouts, and versioning as outlined in over 3,900 names. This allows programs compiled against glibc to function seamlessly with Liella, all while adhering to a functional specification detailed in glibc-functional-spec.md.
Liella is currently a public work in progress, meaning it is still under active development and not yet suitable for production use. Specific limitations include:
ld-linux) has yet to be implemented, barring the execution of many dynamically linked programs on Linux.The project operates through various phases, with the current implementation status as follows:
| Area | Status | Documentation |
|---|---|---|
| Phases 1 to 13 (e.g., strings, math, threads, etc.) | Implemented on main; coverage ensured by rigorous testing | plan/06-phases, docs/spec-symbol-gaps.md |
| Phase 14 (dynamic loader) | Not completed | docs/toolchain.md section 8, plan phase 14 |
| Phase 15 (legacy tier and binary compatibility) | Not completed | plan phase 15 |
| Security pass | Planned after phase 15 | plan |
Support for Rust std programs | Not yet supported | docs/toolchain.md section 8 |
| Performance metrics | Currently measured against glibc through various benchmarks | benchmarks/progress.md, docs/benchmarks.md |
The repository contains several essential components:
glibc-functional-spec.md and spec/: Acts as the primary specification contract containing ABI data.csys/: Contains C syscall layer, system-call wrappers, and assembly primitives.crates/: The core Rust library, prohibiting unsafe code, with specifications for operations needing safe handling.implementation-plan.md and plan/: Outline the architectural development, phases, and decision-making styles employed.For developers working with Liella, the following commands can be executed to manage the library effectively:
cargo xtask stubs # Regenerate test stubs from the specification
cargo xtask so # Build libc.a, libc.so.6, and liella-crt1.o into target/liella/
cargo xtask test # Execute the full test suite
cargo xtask affected --list # List affected tests based on changes
To delve deeper into customization and development tips, refer to the CONTRIBUTING.md file and the code map located in docs/codemap/README.md.
Liella's development is grounded in a clean-room methodology, ensuring that the implementation originates entirely from derived documentation rather than from glibc's source code. This effort is documented thoroughly to maintain transparency and integrity throughout the project's evolution.
To further explore the architecture of Liella, documentation is provided across multiple areas:
Liella represents a significant step toward modernizing the implementation of core libraries while maintaining compatibility and performance benchmarks against established standards.
Comments
0Start the conversation
Share the first comment.