Skip to content

Commit

Permalink
examples: introduce hello-world-async (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspar030 authored May 24, 2024
2 parents 8240907 + c402355 commit 38a57fb
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions examples/hello-world-async/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "hello-world-async"
version = "0.1.0"
authors.workspace = true
edition.workspace = true
publish = false

[dependencies]
riot-rs = { path = "../../src/riot-rs" }
riot-rs-boards = { path = "../../src/riot-rs-boards" }

embassy-executor = { workspace = true, default-features = false }
11 changes: 11 additions & 0 deletions examples/hello-world-async/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# hello-world-async

## About

This application is the classic example using async Rust.

## How to run

In this folder, run

laze build -b nrf52840dk run
4 changes: 4 additions & 0 deletions examples/hello-world-async/laze.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apps:
- name: hello-world-async
selects:
- ?release
11 changes: 11 additions & 0 deletions examples/hello-world-async/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#![no_main]
#![no_std]
#![feature(type_alias_impl_trait)]
#![feature(used_with_arg)]

use riot_rs::debug::println;

#[riot_rs::task(autostart)]
async fn main() {
println!("Hello World!");
}
1 change: 1 addition & 0 deletions examples/laze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ subdirs:
- embassy-net-udp
- embassy-usb-keyboard
- hello-world
- hello-world-async
- minimal
- random
- threading
Expand Down

0 comments on commit 38a57fb

Please sign in to comment.