# rust-libutee
## Introduction
`rust-libutee` is a Rust wrapper for **libutee**, providing Rust bindings and utilities to interact with the TEE user-mode TEE runtime.
### Feature: `xtee-panic-notify`
For **x-kernel** TAs hosted by [`xtee-utee`](../xtee-utee), enable this feature (or depend on `xtee-utee`, which enables it) so `TEE_Panic` calls `xtee_ta_panic_notify` and the CA receives `TEE_ERROR_TARGET_DEAD` on the in-flight invoke connection.
Without this feature, `_utee_panic` only spins in a loop (no undefined symbols when publishing or building standalone `src/bin/*` tools).
```toml
rust-libutee = { version = "0.1", features = ["xtee-panic-notify"] }
# xtee-utee enables this on its rust-libutee dependency automatically.
```
## Prerequisites
Before building the project, ensure that the required cross-compilers are available in your `PATH`.
Example:
```bash
export PATH=/home/data/tools/aarch64-linux-musl-cross/bin:$PATH
export PATH=/home/data/tools/x86_64-linux-musl-cross/bin:$PATH
```
## Build
Clone the repository:
```bash
git clone <repository-url>
cd rust-libutee
```
Build the project:
```bash
cargo build
```
Build for a specific target (example: `x86_64-unknown-linux-musl`):
```bash
cargo build --target x86_64-unknown-linux-musl
```