Skip to content

Commit

Permalink
Fix build: 1-shell/xmodem use custom-std
Browse files Browse the repository at this point in the history
  • Loading branch information
fubupc committed Jul 11, 2023
1 parent 9654be6 commit e237b89
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions 1-shell/xmodem/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
name = "xmodem"
version = "0.1.0"
authors = ["Sergio Benitez <[email protected]>"]
edition = "2021"

[dependencies]
custom-std = { path = "../../os/std", package = "std", optional = true }
14 changes: 13 additions & 1 deletion 1-shell/xmodem/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
#![cfg_attr(target_arch = "aarch64", feature(restricted_std))]
#![no_std]

#[cfg(not(feature = "custom-std"))]
#[allow(unused_imports)]
#[macro_use]
extern crate std;
#[cfg(feature = "custom-std")]
#[allow(unused_imports)]
#[macro_use]
extern crate custom_std as std;

// re-add std/custom-std prelude
use std::prelude::v1::*;

use std::io;

Expand Down

0 comments on commit e237b89

Please sign in to comment.