feat: add rust demo

This commit is contained in:
ikey4u
2021-01-12 23:47:54 +08:00
parent 1aca57c9c6
commit 0cdfd83eb6
61 changed files with 6894 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
#![no_std]
extern crate cortex_m;
mod bridge;
use crate::bridge::*;
use cty::*;
#[no_mangle]
pub extern "C" fn application_entry_rust() -> c_void {
unsafe {
rust_print(b"[+] Welcome to the RUST-WORLD in TencentOS :)".as_ptr());
rust_mqtt_daemon();
}
loop {
unsafe {
rust_print(b"[+] This is a mqtt demo!".as_ptr());
rust_sleep(5000u32);
}
}
}