Xous SDK (pinned for betrusted transpilation)
Find a file
2026-06-30 17:44:31 +02:00
.cargo update lockfile and remove a stale alias 2025-10-20 02:22:02 +08:00
.vscode make bao1x view default for vscoders 2025-10-06 14:24:06 +08:00
api bump utralib version for publication 2026-01-29 19:12:00 +08:00
apps Fix ball app compilation updating i16 to isize. 2026-03-12 15:27:03 +00:00
apps-baosec add support for more keyboard input configs on baosec 2026-02-26 18:29:47 +08:00
apps-dabao cleanup local echo during BIO loading - makes it a bit more reliable 2026-06-09 17:52:20 +08:00
bao1x-boot add uf2-spim feature to bootloader 2026-06-24 15:08:12 +08:00
baremetal add some baremetal factory modes 2026-06-15 23:03:45 +08:00
devkey add a testing key for third party images 2026-02-04 02:50:24 +08:00
docs add API calls for debugging kernel under baochip targets 2025-12-09 16:19:04 +08:00
emulation emulation: cast frequency to ulong for Renode v1.16+ compatibility 2026-04-26 08:39:01 -05:00
imports bump utralib version for publication 2026-01-29 19:12:00 +08:00
kernel add some debug telemetry on process termination 2026-05-09 16:06:41 +08:00
libs add apis for application keys 2026-06-08 23:54:52 +08:00
LICENSES Move license file to top level so github can detect it 2023-11-16 20:59:16 -08:00
loader adjust other configurations stack limit 2026-04-23 15:13:11 +08:00
locales fix: use runtime CARGO_MANIFEST_DIR 2026-03-18 10:50:09 +09:00
planning bump utralib version for publication 2026-01-29 19:12:00 +08:00
precursors chore: cleanup typos in docs, comments 2024-01-15 02:16:43 +08:00
services add mising dependency on owc-inc feature flag 2026-06-10 14:37:49 +08:00
signing update signer to accept and inject baobit-commit hash 2026-02-16 18:07:42 +08:00
svd2repl update formatting to latest nightly rules 2024-09-24 01:49:45 +08:00
svd2utra bump utralib version for publication 2026-01-29 19:12:00 +08:00
tools Merge branch 'dev' into docs/tools-pddbci-testing-instructions 2026-05-06 09:39:04 +02:00
tools-bao update readme to reflect changes to monitor flags 2025-11-06 14:53:09 +09:00
utralib update all the locks and verifiers 2026-01-29 19:17:40 +08:00
xous-ipc bump utralib version for publication 2026-01-29 19:12:00 +08:00
xous-rs bump utralib version for publication 2026-01-29 19:12:00 +08:00
xtask apply a clean patch of the changes required to fix ci 2026-05-06 08:45:15 +08:00
.dockerignore Improve security of dockerfiles 2026-01-16 16:41:43 +09:00
.gitattributes Completes the i18n_helper.py tool 2022-10-27 16:07:05 -05:00
.gitignore checkpoint the c -> rust asm flow for the BIO 2026-02-20 02:19:46 +08:00
analyze-bloat.sh refactor paths to use xpack instead of sifive toolchain 2023-02-21 17:43:31 +08:00
API.md regex search/replace instances of xous_ipc::String to String 2024-09-22 14:14:55 +08:00
baosign.ps1 fixup error messages 2026-05-14 01:30:59 +08:00
Cargo.lock update lockfile with bio loader deps 2026-06-09 00:01:09 +08:00
Cargo.toml downgrade susres to a common api 2026-01-28 00:36:05 +08:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md Update CONTRIBUTING.md 2026-04-22 21:24:01 +08:00
Dockerfile Refactor dockerfiles and ci docker.yml 2026-01-29 02:49:19 +09:00
FORMATTING.md add a formatting document 2024-01-11 22:21:50 +08:00
LICENSE Move license file to top level so github can detect it 2023-11-16 20:59:16 -08:00
publish.py add option to do minor/major rev bumps in publish 2026-02-08 20:54:54 +08:00
README-baochip.md try to make the readme's more friendly to beginners 2026-03-22 14:06:45 +08:00
README-consoles.md try to make the readme's more friendly to beginners 2026-03-22 14:06:45 +08:00
README-precursor.md helps to save the file 2025-10-08 01:20:31 +08:00
README.md add note about fetching tags to the page readme 2026-01-08 02:03:58 +08:00
RELEASE-v0.8.md ...and a pretty obvious one i missed 2024-01-15 02:17:28 +08:00
RELEASE-v0.9.md note that release commentary has moved to discord 2026-02-09 03:48:05 +08:00
rustfmt.toml fix formatting skip directive 2025-09-30 00:44:13 +08:00

Xous Core

Xous is a microkernel operating system written in pure Rust, built for high-assurance applications.

Key features:

  • Hardware memory protection
    • Virtual memory via MMU
    • Each process has an isolated address space
  • std support in stable Rust (tier-3 Rust target)
  • Asynchronous message passing
  • Minimal code base
  • Targeted at high-assurance embedded applications

The Xous Book covers the architecture and structure of the kernel.

The wiki is a community resource that answers many FAQ.

The Baochip README is the starting point for Baochip users. vscode users may wish to install the baochip extension to help manage build & test cycles.

The Precursor README is the starting point for Precursor users.

Important

Xous checks version tags as part of the build process. If building from a "shallow clone" or fork, fetch the tags, or else image creation will fail:

git remote add upstream https://github.com/betrusted-io/xous-core.git
git fetch upstream --tags

Organization

Xous is a mono-repo project. It contains the kernel, libraries, applications, and tools necessary to build full device images. Here is a brief description of the more important directories:

  • api: "Secular" API libraries - minimal-dependency, common-core APIs used by core Xous services
  • apps: Precursor applications
  • apps-dabao: Dabao applications
  • apps-baosec: Baosec applications
  • bao1x-boot: Bao1x secure boot chain
  • baremetal: Baremetal target - runs after the boot chain, for developers that don't want Xous but can still use Xous' no-std features
  • emulation: Renode scripts used to emulate Xous
  • imports: Vendored-in libraries that had to be forked for Xous compatibility
  • kernel: core memory manager, irq manager, and syscall implementations.
  • libs: Device driver libraries. The common thread is that none of these code bases contain a main.rs, just a lib.rs.
  • loader: Sets up virtual memory space and boots the kernel
  • locales: Tools for handling internationalization
  • signing: Scripts for generating signed images
  • services: Xous programs that support Xous apps. Middleware, if you will.
  • svd2utra: A program for converting SVD chip descriptions in XML to the UTRA "header file" format
  • tools: Programs used to construct a final boot image. Also the home of various diagnostic and test utilities.
  • utralib: The Unambigous Thin Register Abtraction. The core hardware interface for Xous.
  • xous-ipc: Inter-process communication convenience APIs for Xous
  • xous-rs: API files for the kernel. Where the syscall interfaces live.
  • xtask: The build system manager for Xous.

Dependencies

Install the latest Rust or run rustup update to update your Rust installation prior to building. Xous development assumes a recent version of Rust.

Build Commands

  • Precursor: cargo xtask app-image
  • Dabao: cargo xtask dabao
  • Baosec: cargo xtask baosec
  • Baochip baremetal: cargo xtask baremetal-bao1x

Additional apps to be bundled into images can be specified as extra arguments on the command line, e.g. cargo xtask dabao helloworld will generate a Dabao image that includes helloworld in the detached-app section. Features, app-features, loader-features, and so forth can also be passed as command line arguments; run cargo xtask on its own for more help.

Emulation

  • cargo xtask run will bring up an emulated Precursor
  • cargo xtask baosec-emu will bring up an emulated Baosec
  • cargo xtask renode-image will build an image suitable for Renode emulation of a Precursor target. Start renode by running renode emulation/xous-release.resc

Building Documentation

A flag of --feature doc-deps must be passed when running cargo doc, like this:

cargo doc --no-deps --feature doc-deps

doc-deps is a dummy hardware target that satisfies the requirement of a "board" when building documentation.

Local-vs-crates.io Verification

xtask does a check every build to ensure that any crates.io dependencies are synchronized with the contents of the monorepo. It protects against the scenario where you edited a crate that exists in the Xous repo, but the build system ignores the local edits because it's fetching an old version from crates.io.

Developers working on published crates should patch them in the root Cargo.toml file and bypass the check with --no-verify.

Acknowledgement

This project is funded through the NGI0 PET Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 825310.

NLnet foundation logo NGI0 logo