From bbe8743f77c9b4a8a80768cb11bc01fbce8385ae Mon Sep 17 00:00:00 2001 From: Able Date: Sat, 1 Jan 2022 20:39:57 -0600 Subject: [PATCH] repair broken things --- .cargo/config.toml | 2 ++ Cargo.lock | 8 ++++++++ Cargo.toml | 5 +++++ src/main.rs | 26 ++++++-------------------- 4 files changed, 21 insertions(+), 20 deletions(-) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..f4e8c00 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[build] +target = "wasm32-unknown-unknown" diff --git a/Cargo.lock b/Cargo.lock index 5392da3..7218e23 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,14 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "ableos-wasm-lib" +version = "0.1.0" +source = "git+https://github.com/ableos/ableos-wasm-lib.git#e8f49be85360a3371a8a0ffc215a0f570b0bc20c" + [[package]] name = "ableos-wasm-test" version = "0.1.0" +dependencies = [ + "ableos-wasm-lib", +] diff --git a/Cargo.toml b/Cargo.toml index e155770..dcf99bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,3 +2,8 @@ name = "ableos-wasm-test" version = "0.1.0" edition = "2018" + + +[dependencies.ableos-wasm-lib] +git = "https://github.com/ableos/ableos-wasm-lib.git" +version = "*" diff --git a/src/main.rs b/src/main.rs index 9f4e677..8421fed 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,28 +1,14 @@ #![no_std] #![no_main] -extern "C" { - pub fn kill(); - pub fn empty(); - // pub fn exit(); -} +use ableos_wasm_lib::*; + +extern "C" fn console_out() {} + #[no_mangle] -extern "C" fn _start() { +extern "C" fn _start() -> i32 { unsafe { kill(); } - loop {} - main(); + 1 } - -fn main() { - unsafe { - kill(); - } -} - -#[panic_handler] -fn panic(_info: &PanicInfo) -> ! { - loop {} -} -use core::panic::PanicInfo;