| Crates.io | riscv_vcpu |
| lib.rs | riscv_vcpu |
| version | 0.1.2 |
| created_at | 2025-09-04 08:38:15.33572+00 |
| updated_at | 2025-09-08 09:22:18.836442+00 |
| description | ArceOS-Hypervisor riscv vcpu module |
| homepage | |
| repository | https://github.com/arceos-hypervisor/riscv_vcpu |
| max_upload_size | |
| id | 1823856 |
| size | 154,930 |
riscv64 virtual CPU (vCPU) implementation for hypervisors. This crate provides the core vCPU structure and virtualization-related interface support specifically designed for the riscv64 architecture.
riscv_vcpu implements a minimal RISC-V Virtual CPU (VCPU) abstraction layer compliant with the RISC-V Hypervisor Extension (RVH). Designed for embedded hypervisors and educational use, it can operates in no_std environments.
Add this to your Cargo.toml:
[dependencies]
riscv_vcpu = "0.1"
use riscv_vcpu::{RISCVVCpu, RISCVVCpuCreateConfig, has_hardware_support};
// Check if hardware virtualization is supported
if has_hardware_support() {
// Create vCPU configuration
let config = RISCVVCpuCreateConfig::default();
// Create and configure the virtual CPU
let vcpu = RISCVVCpu::new(config)?;
// Run the virtual CPU
vcpu.run()?;
}
This project is dual-licensed under either:
at your option.