try to get a wasm interpreter in this

This commit is contained in:
Cadey Ratio 2019-10-23 21:10:36 -04:00
parent 50955547b9
commit 1003ccc648
4 changed files with 1266 additions and 4 deletions

1243
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -16,6 +16,25 @@ pic8259_simple = "0.1.1"
pc-keyboard = "0.3.1"
linked_list_allocator = "0.6.4"
[dependencies.wasmtime-environ]
git = "https://github.com/CraneStation/wasmtime"
rev = "a7fa6bdb3197ca98bcd1b55665e3bb550888dda1"
default-features = false
features = ["core"]
[dependencies.wasmtime-jit]
git = "https://github.com/CraneStation/wasmtime"
rev = "a7fa6bdb3197ca98bcd1b55665e3bb550888dda1"
default-features = false
features = ["core"]
[dependencies.wasmtime-runtime]
git = "https://github.com/CraneStation/wasmtime"
rev = "a7fa6bdb3197ca98bcd1b55665e3bb550888dda1"
version = "*"
default-features = false
features = ["core"]
[dependencies.lazy_static]
version = "1.0"
features = ["spin_no_std"]

BIN
data/h.wasm Normal file

Binary file not shown.

View File

@ -17,10 +17,6 @@ fn kernel_main(boot_info: &'static BootInfo) -> ! {
xe_os::init(&boot_info);
println!("Hello World{}", "!");
// allocate a number on the heap
let heap_value = Box::new(41);
println!("heap_value at {:p}", heap_value);
#[cfg(test)]
test_main();
@ -28,6 +24,10 @@ fn kernel_main(boot_info: &'static BootInfo) -> ! {
xe_os::hlt_loop();
}
fn run_wasm() {
let bytes = include_bytes!("../data/h.wasm");
}
// our existing panic handler
#[cfg(not(test))] // new attribute
#[panic_handler]