Skip to content

Commit 625221e

Browse files
committed
Move the example into an independent crate
To avoid exporting Ravedude, .cargo/config.toml, rust-toolchain.toml that were present at the root of the repository, create a binary crate to have a standalone example
1 parent 71911f5 commit 625221e

File tree

6 files changed

+37
-6
lines changed

6 files changed

+37
-6
lines changed

Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ edition = "2021"
1212
embedded-hal = "1.0"
1313
embedded-hal-bus = "0.3.0"
1414

15-
[dev-dependencies]
16-
panic-halt = "1.0.0"
17-
pcd8544-hal = { path = "../pcd8544-hal" }
18-
arduino-hal = { git = "https://github.com/Rahix/avr-hal", rev = "ravedude-0.2.0", features = ["arduino-uno"] }
19-
2015
[profile.dev]
2116
panic = "abort"
2217
lto = true
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[build]
2+
target = "avr-none"
3+
rustflags = ["-C", "target-cpu=atmega328p"]
4+
5+
[target.'cfg(target_arch = "avr")']
6+
runner = "ravedude"
7+
8+
[unstable]
9+
build-std = ["core"]
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[package]
2+
name = "arduino-uno-pcd8544"
3+
version = "0.2.0"
4+
authors = ["Nabil Elqatib <nabilelqatib@gmail.com>"]
5+
edition = "2021"
6+
7+
[[bin]]
8+
name = "arduino-uno-pcd8544"
9+
test = false
10+
bench = false
11+
12+
[dependencies]
13+
panic-halt = "1.0.0"
14+
pcd8544-hal = { path = "../.." }
15+
arduino-hal = { git = "https://github.com/Rahix/avr-hal", rev = "ravedude-0.2.0", features = ["arduino-uno"] }
16+
17+
18+
[profile.dev]
19+
panic = "abort"
20+
lto = true
21+
opt-level = "s"
22+
23+
[profile.release]
24+
panic = "abort"
25+
codegen-units = 1
26+
lto = true
27+
opt-level = "s"
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
22
channel = "nightly-2025-04-27"
3-
components = [ "rust-src" ]
3+
components = ["rust-src"]
44
profile = "minimal"
File renamed without changes.

0 commit comments

Comments
 (0)