Rust libraries and tools to interact with the system.
The tool works on Linux, Windows and the UEFI shell. Most features are supported on every "OS".
You can find lots of examples in EXAMPLES.md.
nix-shell -p framework-toolpacman -S framework-systemdnf install framework-systemzypper install framework_toolemerge framework_toolapt install framework-toolapt install framework-toolsnap install --edge framework-tool --classicframework-tool instead of framework_toolpacstall -I framework-system-bineopkg it framework-systemsudo xbps-install -S framework-systempacman -S framework-systemcargo install --locked framework_toolbrew install --cask framework-toolwinget install framework_tool --source winget
sudo pkg install framework-system
This project includes both a tool and a library, that you can use to build custom software.
The commandline does not guarantee a stable interface, it is intended for
manual usage, for programmatic usage, please use framework_lib.
The library is still in active development and does not guarantee stable
interfaces. If you, as a user of the library have suggestions for improvements
or requests for features, feel free to create an issue.
To add it to your project add it to your Cargo.toml:
[dependencies]
framework_lib = "0.6.5"
To check which features are supported on which OS and platform, see the Support Matrices.
The following operating environments are supported.
Most functionality depends communication with the EC. For Linux and Windows there are dedicated drivers. On UEFI and FreeBSD raw port I/O is used - on Linux this can also be used as a fallback, if the driver is not available or not working.
| Port I/O | Linux | Windows | |
|---|---|---|---|
| Framework Laptop 12 | |||
| Intel Core 12th Gen | Yes | 6.12 | Yes |
| Framework Laptop 13 | |||
| Intel Core 11th Gen | Yes | 6.11 | Not yet |
| Intel Core 12th Gen | Yes | 6.13 | Not yet |
| Intel Core 13th Gen | Yes | 6.13 | Not yet |
| AMD Ryzen 7040 | Yes | 6.10 | BIOS 3.16+ |
| Intel Core Ultra S1 | Yes | 6.12 | BIOS 3.06+ |
| AMD Ryzen AI 300 | Yes | 6.12 | Yes |
| Intel Core Ultra S3 | Yes | 6.12 | Yes |
| Framework Laptop 16 | |||
| AMD Ryzen 7040 | Yes | 6.10 | BIOS 3.06+ |
| AMD Ryzen AI 300 | Yes | 6.10 | Yes |
| Framework Desktop | |||
| AMD Ryzen AI Max | Yes | 6.15 | Yes |
--esrt)--ec-bin)--pd-bin)--pd-bin)--pd-bin)--h2o-capsule)--capsule)--versions)--dp-hdmi-info)--dp-hdmi-info)--audio-card-info)--dp-hdmi-update)--dp-hdmi-update)All of these need EC communication support in order to work.
--power)--pdports)--pd-info)--intrusion)--privacy)--console recent)--kblight)--charge-limit)--fp-brightness, --fp-led-level)--tablet-mode)--touchscreen-enable)cros_ec driver in Linux kernelRustup is convenient for setting up the right Rust version.
Based on rust-toolchain.toml it will install the right toolchain and version for this project.
MSRV (Minimum Supported Rust Version):
System dependencies
# NixOS
nix-shell --run fish -p cargo systemd udev hidapi pkg-config
# NixOS using flakes
nix develop
# Or build fully using flake, see section below
# Fedora
sudo dnf install systemd-devel hidapi-devel
# FreeBSD
sudo pkg install rust hidapi pkgconf
# Debian/Ubuntu
sudo apt install rustup build-essential libhidapi-dev libsystemd-dev libudev-dev libusb-1.0-0-dev pkg-config
If you have Nix with flakes enabled, you can build and develop without manually installing dependencies.
Run directly from GitHub
# Run directly from GitHub
nix run github.com:FrameworkComputer/framework-system -- --versions
Build and run locally after cloning:
# Build the CLI tool (release)
nix build .#tool
# Build the CLI tool (debug)
nix build .#tool-debug
# Build the UEFI application (release)
nix build .#uefi
# Run the CLI tool directly
nix run .#tool -- --help
# Cross-compile for Windows (from Linux, no Windows needed)
nix build .#windows
# Run the UEFI app in QEMU
nix run .#qemu
# Enter a development shell with all dependencies
nix develop
# Enter a cross-compilation shell for Windows
nix develop .#cross-windows
cargo build --target x86_64-pc-windows-gnu -p framework_tool
# Running linter
cargo clippy
# Running autoformatter as a check
cargo fmt --check
# Fixing format issues
cargo fmt
# Building the library and tool
cargo build
# Building only the library
cargo build -p framework_lib
# Building only the tool
cargo build -p framework_tool
ls -l target/debug/framework_tool
# Build the UEFI application
# Can't be built with cargo! That's why we need to exclude it in the other commands.
make -C framework_uefi
ls -l framework_uefi/build/x86_64-unknown-uefi/boot.efi
> cargo install --path framework_tool
> which framework_tool
/home/zoid/.cargo/bin/framework_tool
Run without any arguments to see the help.
Many actions require root. First build with cargo and then run the binary with sudo:
cargo build && sudo ./target/debug/framework_tool
$ claude mcp add framework-system \
-- python -m otcore.mcp_server <graph>