Skip to content

Commit

Permalink
Merge pull request #7 from hermit-os/stable_support
Browse files Browse the repository at this point in the history
allow compilation on stable Rust
  • Loading branch information
mkroening committed Feb 22, 2024
2 parents b7c75dd + a9e4184 commit 786d41b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ exclude = ["/.gitlab-ci.yml", ".gitignore", ".gitattributes", "/.github/*"]
[dependencies]
aarch64-cpu = { version = "9.3" }
tock-registers = { version = "0.8.x", default-features = false }

[features]
default = ["nightly"]
nightly = []
4 changes: 3 additions & 1 deletion src/instructions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ pub fn halt() {
unsafe { asm!("wfi", options(nomem, nostack)) }
}

mod exceptions {
#[cfg(feature = "nightly")]
#[allow(clippy::missing_safety_doc)]
pub mod exceptions {
use core::arch::asm;

/// Generate an exception targeting EL1, with the specified exception code
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
// copied, modified, or distributed except according to those terms.

#![allow(dead_code)]
#![allow(stable_features)]
#![feature(asm_const, core_intrinsics)]
#![cfg_attr(feature = "nightly", feature(asm_const))]
#![no_std]

pub mod instructions;
Expand Down
1 change: 0 additions & 1 deletion src/paging.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use core::convert::{From, Into};
use core::fmt;
use core::ops;

Expand Down

0 comments on commit 786d41b

Please sign in to comment.