From a0f1b0ee01d461607660d2d56b5b1bdc57e0d3fb Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Fri, 29 Jul 2022 21:58:35 +0200 Subject: Split embassy crate into embassy-executor, embassy-util. --- examples/wasm/Cargo.toml | 3 ++- examples/wasm/src/lib.rs | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'examples/wasm') diff --git a/examples/wasm/Cargo.toml b/examples/wasm/Cargo.toml index 347252fa3..4e26f023c 100644 --- a/examples/wasm/Cargo.toml +++ b/examples/wasm/Cargo.toml @@ -7,7 +7,8 @@ version = "0.1.0" crate-type = ["cdylib"] [dependencies] -embassy = { version = "0.1.0", path = "../../embassy", features = ["log", "wasm", "nightly"] } +embassy-util = { version = "0.1.0", path = "../../embassy-util", features = ["log"] } +embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["log", "wasm", "nightly"] } wasm-logger = "0.2.0" wasm-bindgen = "0.2" diff --git a/examples/wasm/src/lib.rs b/examples/wasm/src/lib.rs index 61757ebd7..2e961e65a 100644 --- a/examples/wasm/src/lib.rs +++ b/examples/wasm/src/lib.rs @@ -1,10 +1,10 @@ #![feature(type_alias_impl_trait)] #![allow(incomplete_features)] -use embassy::executor::Spawner; -use embassy::time::{Duration, Timer}; +use embassy_executor::executor::Spawner; +use embassy_executor::time::{Duration, Timer}; -#[embassy::task] +#[embassy_executor::task] async fn ticker() { let window = web_sys::window().expect("no global `window` exists"); @@ -24,7 +24,7 @@ async fn ticker() { } } -#[embassy::main] +#[embassy_executor::main] async fn main(spawner: Spawner) { wasm_logger::init(wasm_logger::Config::default()); spawner.spawn(ticker()).unwrap(); -- cgit