UEFI framebuffer wrapper

uefi
Able 2022-02-13 00:43:21 -06:00
parent e9bf31da78
commit 1cdb990794
Signed by untrusted user: able
GPG Key ID: D164AF5F5700BE51
146 changed files with 695 additions and 69 deletions

View File

@ -2,8 +2,8 @@
[build]
target = "./json_targets/x86_64-ableos.json"
# target = "x86_64-unknown-uefi"
# target = "./json_targets/x86_64-ableos.json"
target = "x86_64-unknown-uefi"
[unstable]
build-std = ["core", "compiler_builtins", "alloc"]

View File

@ -10,19 +10,10 @@ pub fn sloop() -> ! {
use crate::kmain::kernel_main;
use uefi::{
prelude::*,
proto::{
console::gop::{GraphicsOutput, PixelFormat},
media::{
file::{File, FileAttribute, FileMode},
fs::SimpleFileSystem,
},
},
CStr16,
proto::console::gop::{GraphicsOutput, PixelFormat},
};
use uefi::{proto::console::gop::FrameBuffer, ResultExt};
use crate::{file::FileLocations, logger, vterm::Vterm, GraphicsReturn, ScreenBuffer};
#[entry]
fn main(_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
system_table
@ -30,9 +21,9 @@ fn main(_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
.reset(false)
.expect_success("Failed to reset output buffer");
uefi_services::init(&mut system_table).unwrap_success();
// Print out UEFI revision number
{
// Print out UEFI revision number
let rev = system_table.uefi_revision();
let (major, minor) = (rev.major(), rev.minor());
@ -46,14 +37,11 @@ fn main(_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
stdout.set_cursor_position(0, 10).unwrap_success();
info!("{:?}", stdout.cursor_position());
// loop {}
if let Ok(gop) = system_table
.boot_services()
.locate_protocol::<GraphicsOutput>()
{
let gop = gop.expect("Warnings encountered while opening GOP");
// Maybe save this
let gop = unsafe { &mut *gop.get() };
let mode = gop
.modes()
@ -67,7 +55,12 @@ fn main(_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
gop.set_mode(&mode)
.expect_success("Failed to set graphics mode");
draw_fb(gop);
let mut fb_1 = FrameBuffWrap::new(gop);
loop {
for x in 0..100 {
fb_1.draw_pixel(x, 400, [123, 123, 123]);
}
}
} else {
// No tests can be run.
warn!("UEFI Graphics Output Protocol is not supported");
@ -90,58 +83,6 @@ fn main(_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
Status::SUCCESS
}
pub fn draw_fb(gop: &mut GraphicsOutput) {
let mi = gop.current_mode_info();
let stride = mi.stride();
let (width, height) = mi.resolution();
let mut fb = gop.frame_buffer();
type PixelWriter = unsafe fn(&mut FrameBuffer, usize, [u8; 3]);
unsafe fn write_pixel_rgb(fb: &mut FrameBuffer, pixel_base: usize, rgb: [u8; 3]) {
fb.write_value(pixel_base, rgb);
}
unsafe fn write_pixel_bgr(fb: &mut FrameBuffer, pixel_base: usize, rgb: [u8; 3]) {
fb.write_value(pixel_base, [rgb[2], rgb[1], rgb[0]]);
}
let write_pixel: PixelWriter = match mi.pixel_format() {
PixelFormat::Rgb => write_pixel_rgb,
PixelFormat::Bgr => write_pixel_bgr,
_ => {
info!("This pixel format is not supported by the drawing demo");
return;
}
};
let mut fill_rectangle = |(x1, y1), (x2, y2), color| {
assert!((x1 < width) && (x2 < width), "Bad X coordinate");
assert!((y1 < height) && (y2 < height), "Bad Y coordinate");
for row in y1..y2 {
for column in x1..x2 {
unsafe {
let pixel_index = (row * stride) + column;
let pixel_base = 4 * pixel_index;
write_pixel(&mut fb, pixel_base, color);
}
}
}
};
fill_rectangle((50, 30), (150, 600), [123, 123, 123]);
fill_rectangle((400, 120), (750, 450), [16, 0, 255]);
fill_rectangle((80, 50), (200, 120), [0, 255, 0]);
}
pub trait GopBuffer {
fn copy_to_buffer(&self) -> GraphicsReturn;
}
impl GopBuffer for ScreenBuffer {
fn copy_to_buffer(&self) -> GraphicsReturn {
GraphicsReturn::GenericError
}
}
/*
pub fn file_system() -> Result<SimpleFileSystem, Status> {
if let Ok(gop) = system_table
@ -178,3 +119,81 @@ pub fn file_system() -> Result<SimpleFileSystem, Status> {
*/
pub fn mp_handle() {}
/*
let write_pixel: PixelWriter = match mi.pixel_format() {
// PixelFormat::Rgb => write_pixel_rgb,
PixelFormat::Bgr => write_pixel_bgr,
_ => {
info!("This pixel format is not supported by the drawing demo");
return;
}
};
let mut fill_rectangle = |(x1, y1), (x2, y2), color| {
assert!((x1 < width) && (x2 < width), "Bad X coordinate");
assert!((y1 < height) && (y2 < height), "Bad Y coordinate");
for row in y1..y2 {
for column in x1..x2 {
unsafe {
let pixel_index = (row * stride) + column;
let pixel_base = 4 * pixel_index;
write_pixel(&mut fb, pixel_base, color);
}
}
}
};
fill_rectangle((50, 30), (150, 600), [250, 128, 64]);
fill_rectangle((400, 120), (750, 450), [16, 128, 255]);
*/
use uefi::proto::console::gop::ModeInfo;
pub type PixelWriter = unsafe fn(&mut FrameBuffer, usize, [u8; 3]);
pub struct FrameBuffWrap<'a> {
inner: FrameBuffer<'a>,
mode_info: ModeInfo,
pub resolution: (usize, usize),
}
impl<'b: 'c, 'c> FrameBuffWrap<'c> {
pub fn new(gop: &'c mut GraphicsOutput<'c>) -> Self {
let mi = gop.current_mode_info();
let res = mi.resolution();
Self {
inner: gop.frame_buffer(),
mode_info: mi,
resolution: res,
}
}
unsafe fn write_pixel_rgb(&mut self, pixel_base: usize, rgb: [u8; 3]) {
self.inner.write_value(pixel_base, rgb);
}
unsafe fn write_pixel_bgr(&mut self, pixel_base: usize, rgb: [u8; 3]) {
self.inner.write_value(pixel_base, [rgb[2], rgb[1], rgb[0]]);
}
pub fn draw_pixel(&mut self, x: usize, y: usize, color: [u8; 3]) {
let pixel_base = (y * self.mode_info.stride()) + x;
match self.mode_info.pixel_format() {
PixelFormat::Rgb => unsafe {
self.write_pixel_rgb(pixel_base, color);
},
PixelFormat::Bgr => unsafe {
self.write_pixel_bgr(pixel_base, color);
},
_ => {
info!("This pixel format is not supported by the drawing demo");
return;
}
}
}
}
unsafe impl Sync for FrameBuffWrap<'_> {}
unsafe impl Send for FrameBuffWrap<'_> {}

View File

@ -0,0 +1 @@
{"rustc_fingerprint":18003274168711798016,"outputs":{"17579209074980676242":{"success":true,"status":"","code":0,"stdout":"___.wasm\nlib___.rlib\n___.wasm\nlib___.a\n","stderr":"{\"message\":\"dropping unsupported crate type `dylib` for target `wasm32-unknown-unknown`\",\"code\":null,\"level\":\"warning\",\"spans\":[],\"children\":[],\"rendered\":\"warning: dropping unsupported crate type `dylib` for target `wasm32-unknown-unknown`\\n\\n\"}\n{\"message\":\"dropping unsupported crate type `proc-macro` for target `wasm32-unknown-unknown`\",\"code\":null,\"level\":\"warning\",\"spans\":[],\"children\":[],\"rendered\":\"warning: dropping unsupported crate type `proc-macro` for target `wasm32-unknown-unknown`\\n\\n\"}\n{\"message\":\"2 warnings emitted\",\"code\":null,\"level\":\"warning\",\"spans\":[],\"children\":[],\"rendered\":\"warning: 2 warnings emitted\\n\\n\"}\n"},"2797684049618456168":{"success":false,"status":"exit status: 1","code":1,"stdout":"","stderr":"error: `-Csplit-debuginfo` is unstable on this platform\n\n"},"17598535894874457435":{"success":true,"status":"","code":0,"stdout":"rustc 1.60.0-nightly (498eeb72f 2022-01-31)\nbinary: rustc\ncommit-hash: 498eeb72f590e518e19746b346be53713689e207\ncommit-date: 2022-01-31\nhost: x86_64-unknown-linux-gnu\nrelease: 1.60.0-nightly\nLLVM version: 13.0.0\n","stderr":""},"931469667778813386":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/able/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"5309432699494263626":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n","stderr":""},"6067017610845943405":{"success":true,"status":"","code":0,"stdout":"___.wasm\nlib___.rlib\n___.wasm\nlib___.a\n/home/able/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"abort\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"wasm32\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"wasm\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"unknown\"\ntarget_pointer_width=\"32\"\ntarget_thread_local\ntarget_vendor=\"unknown\"\n","stderr":"warning: dropping unsupported crate type `dylib` for target `wasm32-unknown-unknown`\n\nwarning: dropping unsupported crate type `proc-macro` for target `wasm32-unknown-unknown`\n\nwarning: 2 warnings emitted\n\n"},"1932693776494054550":{"success":false,"status":"exit status: 1","code":1,"stdout":"","stderr":"error: `-Csplit-debuginfo` is unstable on this platform\n\n"}},"successes":{}}

View File

@ -0,0 +1,3 @@
Signature: 8a477f597d28d172789f06886806bc55
# This file is a cache directory tag created by cargo.
# For information about cache directory tags see https://bford.info/cachedir/

View File

@ -0,0 +1 @@
{"rustc":12144636395764155066,"features":"[\"compiler-builtins\", \"core\", \"default\", \"mem\", \"rustc-dep-of-std\"]","target":2709041430195671023,"profile":17504242664759948721,"path":2957610746799249899,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"release/.fingerprint/compiler_builtins-265d0505a77f2123/dep-build-script-build-script-build"}}],"rustflags":[],"metadata":14701936454766889299,"config":2202906307356721367,"compile_kind":0}

View File

@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@ -0,0 +1,5 @@
/home/able/Projects/ableos/userland/aos_wasm_stress_test/target/release/build/compiler_builtins-265d0505a77f2123/build_script_build-265d0505a77f2123: /home/able/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.66/build.rs
/home/able/Projects/ableos/userland/aos_wasm_stress_test/target/release/build/compiler_builtins-265d0505a77f2123/build_script_build-265d0505a77f2123.d: /home/able/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.66/build.rs
/home/able/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.66/build.rs:

View File

@ -0,0 +1,3 @@
Signature: 8a477f597d28d172789f06886806bc55
# This file is a cache directory tag created by cargo.
# For information about cache directory tags see https://bford.info/cachedir/

View File

@ -0,0 +1,6 @@
{"message":"cannot find macro `info` in this scope","code":null,"level":"error","spans":[{"file_name":"src/main.rs","byte_start":151,"byte_end":155,"line_start":12,"line_end":12,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":" info!(b\"hello\");","highlight_start":5,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: cannot find macro `info` in this scope\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:12:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m12\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m info!(b\"hello\");\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^\u001b[0m\n\n"}
{"message":"cannot find function `add` in this scope","code":{"code":"E0425","explanation":"An unresolved name was used.\n\nErroneous code examples:\n\n```compile_fail,E0425\nsomething_that_doesnt_exist::foo;\n// error: unresolved name `something_that_doesnt_exist::foo`\n\n// or:\n\ntrait Foo {\n fn bar() {\n Self; // error: unresolved name `Self`\n }\n}\n\n// or:\n\nlet x = unknown_variable; // error: unresolved name `unknown_variable`\n```\n\nPlease verify that the name wasn't misspelled and ensure that the\nidentifier being referred to is valid for the given situation. Example:\n\n```\nenum something_that_does_exist {\n Foo,\n}\n```\n\nOr:\n\n```\nmod something_that_does_exist {\n pub static foo : i32 = 0i32;\n}\n\nsomething_that_does_exist::foo; // ok!\n```\n\nOr:\n\n```\nlet unknown_variable = 12u32;\nlet x = unknown_variable; // ok!\n```\n\nIf the item is not defined in the current module, it must be imported using a\n`use` statement, like so:\n\n```\n# mod foo { pub fn bar() {} }\n# fn main() {\nuse foo::bar;\nbar();\n# }\n```\n\nIf the item you are importing is not defined in some super-module of the\ncurrent module, then it must also be declared as public (e.g., `pub fn`).\n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":133,"byte_end":136,"line_start":10,"line_end":10,"column_start":24,"column_end":27,"is_primary":true,"text":[{"text":" let ret = unsafe { add(1, 2) };","highlight_start":24,"highlight_end":27}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0425]\u001b[0m\u001b[0m\u001b[1m: cannot find function `add` in this scope\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:10:24\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m10\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m let ret = unsafe { add(1, 2) };\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mnot found in this scope\u001b[0m\n\n"}
{"message":"found duplicate lang item `panic_impl`","code":{"code":"E0152","explanation":"A lang item was redefined.\n\nErroneous code example:\n\n```compile_fail,E0152\n#![feature(lang_items)]\n\n#[lang = \"owned_box\"]\nstruct Foo<T>(T); // error: duplicate lang item found: `owned_box`\n```\n\nLang items are already implemented in the standard library. Unless you are\nwriting a free-standing application (e.g., a kernel), you do not need to provide\nthem yourself.\n\nYou can build a free-standing crate by adding `#![no_std]` to the crate\nattributes:\n\n```ignore (only-for-syntax-highlight)\n#![no_std]\n```\n\nSee also the [unstable book][1].\n\n[1]: https://doc.rust-lang.org/unstable-book/language-features/lang-items.html#writing-an-executable-without-stdlib\n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":233,"byte_end":265,"line_start":20,"line_end":20,"column_start":1,"column_end":33,"is_primary":true,"text":[{"text":"fn panic(_info: &PanicInfo) -> ! {","highlight_start":1,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lang item is first defined in crate `std` (which `test` depends on)","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"first definition in `std` loaded from /home/able/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-2c0a0e43b8090224.rlib","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"second definition in the local crate (`aos_wasm_stress_test`)","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0152]\u001b[0m\u001b[0m\u001b[1m: found duplicate lang item `panic_impl`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:20:1\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m20\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0mfn panic(_info: &PanicInfo) -> ! {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: the lang item is first defined in crate `std` (which `test` depends on)\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: first definition in `std` loaded from /home/able/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-2c0a0e43b8090224.rlib\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: second definition in the local crate (`aos_wasm_stress_test`)\u001b[0m\n\n"}
{"message":"aborting due to 3 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to 3 previous errors\u001b[0m\n\n"}
{"message":"Some errors have detailed explanations: E0152, E0425.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1mSome errors have detailed explanations: E0152, E0425.\u001b[0m\n"}
{"message":"For more information about an error, try `rustc --explain E0152`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1mFor more information about an error, try `rustc --explain E0152`.\u001b[0m\n"}

View File

@ -0,0 +1 @@
{"rustc":12144636395764155066,"features":"[]","target":12450528787789777486,"profile":1021633075455700787,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"wasm32-unknown-unknown/debug/.fingerprint/aos_wasm_stress_test-61e1c08f945f2897/dep-test-bin-aos_wasm_stress_test"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":8104632896995515128}

View File

@ -0,0 +1 @@
{"rustc":12144636395764155066,"features":"[]","target":12450528787789777486,"profile":7309141686862299243,"path":1684066648322511884,"deps":[[16512045861018094591,"libwasm",false,4070631371700431413]],"local":[{"CheckDepInfo":{"dep_info":"wasm32-unknown-unknown/debug/.fingerprint/aos_wasm_stress_test-ccf7a9b3c2579b99/dep-bin-aos_wasm_stress_test"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":8104632896995515128}

View File

@ -0,0 +1 @@
{"rustc":12144636395764155066,"features":"[]","target":12450528787789777486,"profile":7309141686862299243,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"wasm32-unknown-unknown/debug/.fingerprint/aos_wasm_stress_test-d507c534f009c86d/dep-bin-aos_wasm_stress_test"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":8104632896995515128}

View File

@ -0,0 +1,4 @@
{"message":"cannot find macro `info` in this scope","code":null,"level":"error","spans":[{"file_name":"src/main.rs","byte_start":151,"byte_end":155,"line_start":12,"line_end":12,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":" info!(b\"hello\");","highlight_start":5,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: cannot find macro `info` in this scope\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:12:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m12\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m info!(b\"hello\");\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^\u001b[0m\n\n"}
{"message":"cannot find function `add` in this scope","code":{"code":"E0425","explanation":"An unresolved name was used.\n\nErroneous code examples:\n\n```compile_fail,E0425\nsomething_that_doesnt_exist::foo;\n// error: unresolved name `something_that_doesnt_exist::foo`\n\n// or:\n\ntrait Foo {\n fn bar() {\n Self; // error: unresolved name `Self`\n }\n}\n\n// or:\n\nlet x = unknown_variable; // error: unresolved name `unknown_variable`\n```\n\nPlease verify that the name wasn't misspelled and ensure that the\nidentifier being referred to is valid for the given situation. Example:\n\n```\nenum something_that_does_exist {\n Foo,\n}\n```\n\nOr:\n\n```\nmod something_that_does_exist {\n pub static foo : i32 = 0i32;\n}\n\nsomething_that_does_exist::foo; // ok!\n```\n\nOr:\n\n```\nlet unknown_variable = 12u32;\nlet x = unknown_variable; // ok!\n```\n\nIf the item is not defined in the current module, it must be imported using a\n`use` statement, like so:\n\n```\n# mod foo { pub fn bar() {} }\n# fn main() {\nuse foo::bar;\nbar();\n# }\n```\n\nIf the item you are importing is not defined in some super-module of the\ncurrent module, then it must also be declared as public (e.g., `pub fn`).\n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":133,"byte_end":136,"line_start":10,"line_end":10,"column_start":24,"column_end":27,"is_primary":true,"text":[{"text":" let ret = unsafe { add(1, 2) };","highlight_start":24,"highlight_end":27}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0425]\u001b[0m\u001b[0m\u001b[1m: cannot find function `add` in this scope\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:10:24\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m10\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m let ret = unsafe { add(1, 2) };\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mnot found in this scope\u001b[0m\n\n"}
{"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to 2 previous errors\u001b[0m\n\n"}
{"message":"For more information about this error, try `rustc --explain E0425`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1mFor more information about this error, try `rustc --explain E0425`.\u001b[0m\n"}

View File

@ -0,0 +1 @@
{"rustc":12144636395764155066,"features":"[]","target":12450528787789777486,"profile":1021633075455700787,"path":1684066648322511884,"deps":[[16512045861018094591,"libwasm",false,4070631371700431413]],"local":[{"CheckDepInfo":{"dep_info":"wasm32-unknown-unknown/debug/.fingerprint/aos_wasm_stress_test-f504b55631bb4804/dep-test-bin-aos_wasm_stress_test"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":8104632896995515128}

View File

@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@ -0,0 +1 @@
{"rustc":12144636395764155066,"features":"[]","target":6513979472087742090,"profile":3735503092003429423,"path":9687252742856789285,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"wasm32-unknown-unknown/debug/.fingerprint/libwasm-b21332fe5cdaae2f/dep-lib-libwasm"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":8104632896995515128}

View File

@ -0,0 +1,5 @@
/home/able/Projects/ableos/userland/aos_wasm_stress_test/target/wasm32-unknown-unknown/debug/deps/aos_wasm_stress_test-2214295b2507695e.wasm: src/main.rs
/home/able/Projects/ableos/userland/aos_wasm_stress_test/target/wasm32-unknown-unknown/debug/deps/aos_wasm_stress_test-2214295b2507695e.d: src/main.rs
src/main.rs:

View File

@ -0,0 +1,6 @@
/home/able/Projects/ableos/userland/aos_wasm_stress_test/target/wasm32-unknown-unknown/debug/deps/aos_wasm_stress_test-61e1c08f945f2897.rmeta: src/main.rs src/libwasm.rs
/home/able/Projects/ableos/userland/aos_wasm_stress_test/target/wasm32-unknown-unknown/debug/deps/aos_wasm_stress_test-61e1c08f945f2897.d: src/main.rs src/libwasm.rs
src/main.rs:
src/libwasm.rs:

View File

@ -0,0 +1,5 @@
/home/able/Projects/ableos/userland/aos_wasm_stress_test/target/wasm32-unknown-unknown/debug/deps/aos_wasm_stress_test-ccf7a9b3c2579b99.rmeta: src/main.rs
/home/able/Projects/ableos/userland/aos_wasm_stress_test/target/wasm32-unknown-unknown/debug/deps/aos_wasm_stress_test-ccf7a9b3c2579b99.d: src/main.rs
src/main.rs:

View File

@ -0,0 +1,6 @@
/home/able/Projects/ableos/userland/aos_wasm_stress_test/target/wasm32-unknown-unknown/debug/deps/aos_wasm_stress_test-d507c534f009c86d.rmeta: src/main.rs src/libwasm.rs
/home/able/Projects/ableos/userland/aos_wasm_stress_test/target/wasm32-unknown-unknown/debug/deps/aos_wasm_stress_test-d507c534f009c86d.d: src/main.rs src/libwasm.rs
src/main.rs:
src/libwasm.rs:

View File

@ -0,0 +1,5 @@
/home/able/Projects/ableos/userland/aos_wasm_stress_test/target/wasm32-unknown-unknown/debug/deps/aos_wasm_stress_test-f504b55631bb4804.rmeta: src/main.rs
/home/able/Projects/ableos/userland/aos_wasm_stress_test/target/wasm32-unknown-unknown/debug/deps/aos_wasm_stress_test-f504b55631bb4804.d: src/main.rs
src/main.rs:

View File

@ -0,0 +1,7 @@
/home/able/Projects/ableos/userland/aos_wasm_stress_test/target/wasm32-unknown-unknown/debug/deps/libwasm-b21332fe5cdaae2f.rmeta: /home/able/.cargo/git/checkouts/libwasm-d0e6e34f082f8703/b79b27c/src/lib.rs /home/able/.cargo/git/checkouts/libwasm-d0e6e34f082f8703/b79b27c/src/logger/mod.rs /home/able/.cargo/git/checkouts/libwasm-d0e6e34f082f8703/b79b27c/src/syscalls.rs
/home/able/Projects/ableos/userland/aos_wasm_stress_test/target/wasm32-unknown-unknown/debug/deps/libwasm-b21332fe5cdaae2f.d: /home/able/.cargo/git/checkouts/libwasm-d0e6e34f082f8703/b79b27c/src/lib.rs /home/able/.cargo/git/checkouts/libwasm-d0e6e34f082f8703/b79b27c/src/logger/mod.rs /home/able/.cargo/git/checkouts/libwasm-d0e6e34f082f8703/b79b27c/src/syscalls.rs
/home/able/.cargo/git/checkouts/libwasm-d0e6e34f082f8703/b79b27c/src/lib.rs:
/home/able/.cargo/git/checkouts/libwasm-d0e6e34f082f8703/b79b27c/src/logger/mod.rs:
/home/able/.cargo/git/checkouts/libwasm-d0e6e34f082f8703/b79b27c/src/syscalls.rs:

View File

@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@ -0,0 +1 @@
{"rustc":12144636395764155066,"features":"[\"compiler-builtins-mem\"]","target":17978258598841637115,"profile":6269190295429226618,"path":1768653150461482424,"deps":[[1802021172542371048,"compiler_builtins",false,2508276311391942940],[15769198103576810567,"core",false,16365439688015846686]],"local":[{"CheckDepInfo":{"dep_info":"wasm32-unknown-unknown/release/.fingerprint/alloc-43ce75f510ba6690/dep-lib-alloc"}}],"rustflags":[],"metadata":8311380272888801894,"config":2202906307356721367,"compile_kind":8104632896995515128}

View File

@ -0,0 +1 @@
{"rustc":12144636395764155066,"features":"[]","target":12450528787789777486,"profile":6269190295429226618,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"wasm32-unknown-unknown/release/.fingerprint/aos_wasm_stress_test-720d13ff269d6aa2/dep-bin-aos_wasm_stress_test"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":8104632896995515128}

View File

@ -0,0 +1,4 @@
{"message":"no global memory allocator found but one is required; link to std or add `#[global_allocator]` to a static item that implements the GlobalAlloc trait","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: no global memory allocator found but one is required; link to std or add `#[global_allocator]` to a static item that implements the GlobalAlloc trait\u001b[0m\n\n"}
{"message":"`#[alloc_error_handler]` function required, but not found","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: `#[alloc_error_handler]` function required, but not found\u001b[0m\n\n"}
{"message":"use `#![feature(default_alloc_error_handler)]` for a default error handler","code":null,"level":"note","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;10mnote\u001b[0m\u001b[0m\u001b[1m: use `#![feature(default_alloc_error_handler)]` for a default error handler\u001b[0m\n\n"}
{"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to 2 previous errors\u001b[0m\n\n"}

View File

@ -0,0 +1 @@
{"rustc":12144636395764155066,"features":"[]","target":12450528787789777486,"profile":6269190295429226618,"path":1684066648322511884,"deps":[[16512045861018094591,"libwasm",false,10491070812147292584]],"local":[{"CheckDepInfo":{"dep_info":"wasm32-unknown-unknown/release/.fingerprint/aos_wasm_stress_test-e1fbcc9fcf42d813/dep-bin-aos_wasm_stress_test"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":8104632896995515128}

View File

@ -0,0 +1 @@
{"rustc":12144636395764155066,"features":"","target":0,"profile":0,"path":0,"deps":[[1802021172542371048,"build_script_build",false,5627751587834272139]],"local":[{"RerunIfChanged":{"output":"wasm32-unknown-unknown/release/build/compiler_builtins-5d277bee50e34785/output","paths":["build.rs"]}}],"rustflags":[],"metadata":0,"config":0,"compile_kind":0}

View File

@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@ -0,0 +1 @@
{"rustc":12144636395764155066,"features":"[\"compiler-builtins\", \"core\", \"default\", \"mem\", \"rustc-dep-of-std\"]","target":7830843880007288163,"profile":6269190295429226618,"path":10994967705594443486,"deps":[[1802021172542371048,"build_script_build",false,17221472823520399443],[6064942063313465214,"core",false,4817457754657527751]],"local":[{"CheckDepInfo":{"dep_info":"wasm32-unknown-unknown/release/.fingerprint/compiler_builtins-6711a67c7e5e42a7/dep-lib-compiler_builtins"}}],"rustflags":[],"metadata":14701936454766889299,"config":2202906307356721367,"compile_kind":8104632896995515128}

View File

@ -0,0 +1 @@
This file has an mtime of when this was started.

Some files were not shown because too many files have changed in this diff Show More