# RustSBI

> Rust language implementation of RISC-V SBI, used on RISC-V ISA

**Wikidata**: [Q132174406](https://www.wikidata.org/wiki/Q132174406)  
**Source**: https://4ort.xyz/entity/rustsbi

## Summary
RustSBI is a Rust language implementation of the RISC-V Supervisor Binary Interface (SBI), providing firmware-level control for RISC-V hardware. It serves as a free and open-source alternative to proprietary firmware like BIOS or UEFI, enabling secure and efficient system boot on RISC-V platforms.

## Key Facts
- Latest stable version: 0.4.0 (released October 18, 2024)
- Licensed under Mulan Permissive Software License v2 and MIT License
- Used by oreboot as a replacement for proprietary firmware
- Platform: RISC-V ISA
- Source code repository: https://github.com/rustsbi/rustsbi
- Official website: https://rustsbi.com
- Programming language: Rust
- Available on crates.io as rustsbi

## FAQs
### Q: What is RustSBI used for?
A: RustSBI provides firmware-level control for RISC-V hardware, enabling secure system boot and low-level hardware management as an open-source alternative to proprietary firmware solutions.

### Q: What platforms does RustSBI support?
A: RustSBI is specifically designed for the RISC-V Instruction Set Architecture (ISA), providing SBI implementation for RISC-V platforms.

### Q: How is RustSBI licensed?
A: RustSBI is dual-licensed under the Mulan Permissive Software License v2 and the MIT License, making it freely available for both commercial and non-commercial use.

## Why It Matters
RustSBI represents a significant advancement in the RISC-V ecosystem by providing a modern, Rust-based implementation of the Supervisor Binary Interface. As open-source firmware, it addresses the critical need for transparent, auditable, and secure firmware in the RISC-V community. By replacing proprietary alternatives, RustSBI enables developers and manufacturers to maintain full control over their hardware initialization and boot processes, reducing dependency on closed-source solutions. Its adoption by projects like oreboot demonstrates its practical value in creating truly open computing platforms. The use of Rust as the implementation language also brings memory safety guarantees to firmware development, potentially reducing security vulnerabilities that have historically plagued firmware implementations.

## Notable For
- First major Rust-based implementation of RISC-V SBI specification
- Dual licensing under Mulan Permissive Software License v2 and MIT License
- Integration with oreboot project as firmware replacement
- Active development with 10+ stable releases since 2020
- Memory-safe firmware implementation using Rust programming language

## Body
### Development History
RustSBI began development as a Rust implementation of the RISC-V SBI specification, with the first stable release (0.0.2) published on October 20, 2020. The project has maintained consistent release cadence, with major versions including 0.1.0 (December 26, 2020), 0.2.0 (February 13, 2022), 0.3.0 (November 3, 2022), and the current stable 0.4.0 (October 18, 2024).

### Technical Implementation
The project implements the RISC-V Supervisor Binary Interface specification, providing the necessary firmware services for operating system boot and hardware management. Written entirely in Rust, it leverages the language's memory safety features to create more secure firmware compared to traditional C-based implementations.

### Integration and Usage
RustSBI has been integrated into the oreboot project, which aims to replace proprietary firmware solutions like BIOS and UEFI. This integration demonstrates RustSBI's practical utility as a drop-in replacement for closed-source firmware in real-world applications.

### Community and Ecosystem
Hosted on GitHub at https://github.com/rustsbi/rustsbi, the project maintains active development with comprehensive documentation available through docs.rs. The project's presence on crates.io as rustsbi facilitates easy integration into Rust-based projects and tools.

### Licensing and Distribution
The dual licensing approach under Mulan Permissive Software License v2 and MIT License provides flexibility for both commercial and non-commercial use cases. This licensing strategy supports wide adoption while maintaining the project's open-source nature.

## References

1. [Source](https://github.com/rustsbi/rustsbi/blob/main/README.md)
2. [Release 0.0.2. 2020](https://github.com/rustsbi/rustsbi/releases/tag/v0.0.2)
3. [Release 0.1.0. 2020](https://github.com/rustsbi/rustsbi/releases/tag/v0.1.0)
4. [Release 0.1.1. 2021](https://github.com/rustsbi/rustsbi/releases/tag/v0.1.1)
5. [Release 0.2.0. 2022](https://github.com/rustsbi/rustsbi/releases/tag/v0.2.0)
6. [Release 0.2.1. 2022](https://github.com/rustsbi/rustsbi/releases/tag/v0.2.1)
7. [Release 0.2.2. 2022](https://github.com/rustsbi/rustsbi/releases/tag/v0.2.2)
8. [Release 0.3.0. 2022](https://github.com/rustsbi/rustsbi/releases/tag/v0.3.0)
9. [Release 0.3.1. 2023](https://github.com/rustsbi/rustsbi/releases/tag/v0.3.1)
10. [Release 0.3.2. 2023](https://github.com/rustsbi/rustsbi/releases/tag/v0.3.2)
11. [Release 0.4.0. 2024](https://github.com/rustsbi/rustsbi/releases/tag/v0.4.0)