repair broken things
This commit is contained in:
parent
611413dab1
commit
e19b6ef9cc
2
.cargo/config.toml
Normal file
2
.cargo/config.toml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
[build]
|
||||||
|
target = "wasm32-unknown-unknown"
|
8
Cargo.lock
generated
8
Cargo.lock
generated
|
@ -2,6 +2,14 @@
|
||||||
# It is not intended for manual editing.
|
# It is not intended for manual editing.
|
||||||
version = 3
|
version = 3
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ableos-wasm-lib"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "git+https://github.com/ableos/ableos-wasm-lib.git#e8f49be85360a3371a8a0ffc215a0f570b0bc20c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ableos-wasm-test"
|
name = "ableos-wasm-test"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"ableos-wasm-lib",
|
||||||
|
]
|
||||||
|
|
|
@ -2,3 +2,8 @@
|
||||||
name = "ableos-wasm-test"
|
name = "ableos-wasm-test"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
|
|
||||||
|
[dependencies.ableos-wasm-lib]
|
||||||
|
git = "https://github.com/ableos/ableos-wasm-lib.git"
|
||||||
|
version = "*"
|
||||||
|
|
26
src/main.rs
26
src/main.rs
|
@ -1,28 +1,14 @@
|
||||||
#![no_std]
|
#![no_std]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
|
|
||||||
extern "C" {
|
use ableos_wasm_lib::*;
|
||||||
pub fn kill();
|
|
||||||
pub fn empty();
|
extern "C" fn console_out() {}
|
||||||
// pub fn exit();
|
|
||||||
}
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
extern "C" fn _start() {
|
extern "C" fn _start() -> i32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
kill();
|
kill();
|
||||||
}
|
}
|
||||||
loop {}
|
1
|
||||||
main();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
|
||||||
unsafe {
|
|
||||||
kill();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[panic_handler]
|
|
||||||
fn panic(_info: &PanicInfo) -> ! {
|
|
||||||
loop {}
|
|
||||||
}
|
|
||||||
use core::panic::PanicInfo;
|
|
||||||
|
|
Loading…
Reference in a new issue