Fix rust build breakage caused by bare-io package being yanked.

Didn't find an explanation for why all versions of bare-io were yanked
but core2 has the Cursor support and is by the same author.

Change-Id: Id27adaa568a8e1b7b5825c8f81aa489a96675969
GitOrigin-RevId: 7fb8950938c9536a9c795b246d240fca756b3499
This commit is contained in:
Sam Leffler
2021-11-16 11:05:27 -08:00
parent 39f9eac9c3
commit 77f71b6de7
2 changed files with 2 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ edition = "2018"
[dependencies]
arrayvec = { version = "0.7", default-features = false }
core2 = { version = "0.3", default-features = false }
# Disable default so we don't pull in CString which requires an allocator
bare-io = "0.2"
cstr_core = { version = "0.2.3", default-features = false }
log = "0.4"

View File

@@ -1,6 +1,7 @@
#![cfg_attr(not(test), no_std)]
use cstr_core::CStr;
use core2::io::{Cursor, Write};
use log::{Metadata, Record};
// TODO(sleffler): until we can copy directly into shared memory limit
@@ -19,7 +20,6 @@ impl log::Log for KataLogger {
extern "C" {
fn logger_log(level: u8, msg: *const cstr_core::c_char);
}
use bare_io::{Cursor, Write};
let mut buf = [0 as u8; MAX_MSG_LEN];
let mut cur = Cursor::new(&mut buf[..]);
// Log msgs are of the form: '<target>::<fmt'd-msg>