diff options
Diffstat (limited to 'examples/wasm')
| -rw-r--r-- | examples/wasm/Cargo.toml | 12 | ||||
| -rw-r--r-- | examples/wasm/src/lib.rs | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/examples/wasm/Cargo.toml b/examples/wasm/Cargo.toml index 3a27f913c..e8897506c 100644 --- a/examples/wasm/Cargo.toml +++ b/examples/wasm/Cargo.toml | |||
| @@ -3,14 +3,15 @@ edition = "2021" | |||
| 3 | name = "embassy-wasm-example" | 3 | name = "embassy-wasm-example" |
| 4 | version = "0.1.0" | 4 | version = "0.1.0" |
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | publish = false | ||
| 6 | 7 | ||
| 7 | [lib] | 8 | [lib] |
| 8 | crate-type = ["cdylib"] | 9 | crate-type = ["cdylib"] |
| 9 | 10 | ||
| 10 | [dependencies] | 11 | [dependencies] |
| 11 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["log"] } | 12 | embassy-sync = { version = "0.7.2", path = "../../embassy-sync", features = ["log"] } |
| 12 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-wasm", "executor-thread", "log"] } | 13 | embassy-executor = { version = "0.9.0", path = "../../embassy-executor", features = ["arch-wasm", "executor-thread", "log"] } |
| 13 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["log", "wasm", ] } | 14 | embassy-time = { version = "0.5.0", path = "../../embassy-time", features = ["log", "wasm", ] } |
| 14 | 15 | ||
| 15 | wasm-logger = "0.2.0" | 16 | wasm-logger = "0.2.0" |
| 16 | wasm-bindgen = "0.2" | 17 | wasm-bindgen = "0.2" |
| @@ -19,3 +20,8 @@ log = "0.4.11" | |||
| 19 | 20 | ||
| 20 | [profile.release] | 21 | [profile.release] |
| 21 | debug = 2 | 22 | debug = 2 |
| 23 | |||
| 24 | [package.metadata.embassy] | ||
| 25 | build = [ | ||
| 26 | { target = "wasm32-unknown-unknown", artifact-dir = "out/examples/wasm" } | ||
| 27 | ] | ||
diff --git a/examples/wasm/src/lib.rs b/examples/wasm/src/lib.rs index 71cf980dd..170c97fb7 100644 --- a/examples/wasm/src/lib.rs +++ b/examples/wasm/src/lib.rs | |||
| @@ -24,5 +24,5 @@ async fn ticker() { | |||
| 24 | #[embassy_executor::main] | 24 | #[embassy_executor::main] |
| 25 | async fn main(spawner: Spawner) { | 25 | async fn main(spawner: Spawner) { |
| 26 | wasm_logger::init(wasm_logger::Config::default()); | 26 | wasm_logger::init(wasm_logger::Config::default()); |
| 27 | spawner.spawn(ticker()).unwrap(); | 27 | spawner.spawn(ticker().unwrap()); |
| 28 | } | 28 | } |
