AXL SDK
Version |
0.1.0 |
License |
MIT |
C header |
|
Website |
|
Source |
|
Build |
|
AXL
AXL (AximCode Library) is a GLib-inspired C library for UEFI, plus an SDK for building UEFI applications and drivers without EDK2.
AXL Library (
libaxl.a) — the library itself: data structures, file I/O, networking (TCP, UDP, HTTP, TLS), graphics, event loop, logging, and more. UTF-8 everywhere, standard C types,axl_snake_caseAPI.AXL SDK — packages the library with headers, a CRT0 entry point, and
axl-cc(a compiler wrapper). Build.efibinaries with a single command — no EDK2 source tree, no gnu-efi, just clang or GCC.
#include <axl.h>
int main(int argc, char **argv) {
axl_printf("Hello from %s\n", argv[0]);
AXL_AUTOPTR(AxlString) s = axl_string_new("AXL ");
axl_string_append_printf(s, "v%d", 1);
axl_printf("%s\n", axl_string_str(s));
return 0;
}
$ axl-cc hello.c -o hello.efi # 11KB binary, zero external deps
Include <axl.h> for the full API, or individual headers for specific
modules (e.g., <axl/axl-mem.h>, <axl/axl-net.h>).
AXL Library API
Category |
Functions |
GLib equivalent |
|---|---|---|
Memory |
|
|
Auto-cleanup |
|
|
Strings |
|
|
String builder |
|
|
String search |
|
|
Printf |
|
|
File I/O |
|
POSIX-style |
File ops |
|
|
Directories |
|
|
Hash table |
|
|
Dynamic array |
|
|
Linked lists |
|
|
Queue |
|
|
JSON |
|
json-glib |
Cache |
|
— |
Config |
|
|
Event loop |
|
|
Deferred work |
|
— |
Arg parsing |
|
|
Logging |
|
|
HTTP client |
|
libsoup |
HTTP server |
|
libsoup |
TCP sockets |
|
|
UDP sockets |
|
— |
TLS (optional) |
|
— (mbedTLS) |
Graphics |
|
— (UEFI GOP) |
Task pool |
|
— (UEFI MP) |
Environment |
|
|
System |
|
— (UEFI-specific) |
SMBIOS |
|
— (UEFI-specific) |
Utilities |
|
|
Quick start
Requirements
clang + lld-link (LLVM toolchain, default) or GCC + ld + objcopy
No EDK2, no gnu-efi, no external UEFI SDK
Install SDK
git clone --recurse-submodules git@github.com:aximcode/axl-sdk.git
cd axl-sdk
./scripts/install.sh --prefix /opt/axl-sdk
This builds the library for x64 and AARCH64 and packages headers,
libs, and the axl-cc compiler wrapper.
Build an app
/opt/axl-sdk/bin/axl-cc hello.c -o hello.efi
Cross-build for AARCH64
/opt/axl-sdk/bin/axl-cc --arch aa64 hello.c -o hello-aa64.efi
CMake
set(AXL_SDK_DIR "/opt/axl-sdk")
include(${AXL_SDK_DIR}/lib/axl.cmake)
axl_add_app(hello hello.c)
Build a driver
/opt/axl-sdk/bin/axl-cc --type driver mydriver.c -o mydriver.efi
Build with TLS (optional)
# Library with TLS support (requires mbedTLS submodule)
make AXL_TLS=1
# Install SDK with TLS
./scripts/install.sh --prefix /opt/axl-sdk AXL_TLS=1
Run tests
# Unit tests (776 tests)
./test/integration/test-axl.sh
# Tool tests (hexdump, grep, find, sysinfo, etc.)
./test/integration/test-tools.sh
# HTTP integration tests
./test/integration/test-http.sh
# UDP integration tests
./test/integration/test-udp.sh
# HTTPS integration tests (requires AXL_TLS=1 build)
./test/integration/test-https.sh
# All architectures (x64 + aa64)
./test/integration/test-all.sh
Documentation
API Reference — auto-generated from headers (Sphinx + Breathe)
Coding Style — naming conventions, formatting
Porting Guide — how to port EDK2 apps to axl-cc
Design — architecture, phases
Roadmap — phase tracker
Architecture
AXL Library
include/axl/— public headers.axl_snake_casefunctions,AxlPascalCasetypes, standard C types, UTF-8 strings.src/— module implementations. Each directory has aREADME.mdwith overview, examples, and usage guidance: mem, data (str, string, hash, array, list, queue, json, cache), io, log, util (args, config, path, env, sys, driver), loop (event loop, defer, signal), task (arena, task pool, buf pool, async), net (tcp, udp, http, tls), gfx.Backend (
src/backend/) — platform abstraction over UEFI firmware services. Single native implementation.
AXL SDK
axl-cc— compiler wrapper. Invokes clang + lld-link (or GCC) with the right flags, includes, and libraries.axl-crt0— UEFI entry point stub. BridgesEFI_HANDLE+EFI_SYSTEM_TABLEtoint main(int argc, char **argv).axl.cmake— CMake integration viaaxl_add_app().include/uefi/— auto-generated UEFI type definitions from the UEFI spec HTML. No dependency on EDK2 headers.
Optional: TLS
TLS support uses mbedTLS
(v3.6.3) as a git submodule. Build with AXL_TLS=1 to enable
HTTPS server/client and self-signed certificate generation.
Status
AXL is under active development. The core library is stable with 776 unit tests + 16 tool tests + 17 HTTP integration tests + 3 UDP tests + 5 HTTPS tests. Apps and drivers build with just clang (or GCC) — no EDK2 or external UEFI SDK needed.
License
Modules
- AxlMem – Memory Allocation
- AxlStr – String Utilities
- AxlString – String Builder
- AxlIO – Stream I/O
- AxlLog – Logging
- AxlData – Data Structures
- AxlJson – JSON
- AxlCache – TTL Cache
- AxlConfig – Configuration
- AxlPath – Path Manipulation
- AxlArgs – Argument Parser
- AxlLoop – Event Loop
- AxlTask – Task Pool and Arena
- AxlNet – Networking
- AxlTls – TLS Support
- AxlSys – System Utilities
- AxlGfx – Graphics
Reference