breakout into sub projects

This commit is contained in:
Evan Feenstra
2022-05-20 14:44:54 -07:00
parent b944eb20fa
commit 8e2273fc6c
10 changed files with 24 additions and 6 deletions

10
.gitignore vendored
View File

@@ -1,4 +1,6 @@
/.vscode
/.embuild
/target
/Cargo.lock
.vscode
.embuild
target
Cargo.lock
.DS_Store
sphinx-key/Cargo.lock

View File

@@ -1,4 +1,4 @@
# sphinx-key
# cd sphinx-key
These notes were tested for macOS
@@ -35,3 +35,7 @@ These notes were tested for macOS
If the above command does not work, try this one below:
`espflash target/riscv32imc-esp-espidf/debug/sphinx-key`
### monitor
`espmonitor /dev/ttyUSB0`

6
signer/Cargo.toml Normal file
View File

@@ -0,0 +1,6 @@
[package]
name = "sphinx-key-signer"
version = "0.1.0"
authors = ["Evan Feenstra <evanfeenstra@gmail.com>"]
edition = "2018"
resolver = "2"

3
signer/src/lib.rs Normal file
View File

@@ -0,0 +1,3 @@
pub fn say_hi() {
println!("hi!");
}

View File

@@ -17,7 +17,7 @@ pio = ["esp-idf-sys/pio"]
[dependencies]
esp-idf-sys = { version = "0.31.5", features = ["binstart"] }
sphinx-key-signer = { path = "../signer" }
[build-dependencies]
embuild = "0.29"

View File

@@ -1,4 +1,5 @@
use esp_idf_sys as _; // If using the `binstart` feature of `esp-idf-sys`, always keep this module imported
use sphinx_key_signer;
fn main() {
// Temporary. Will disappear once ESP-IDF 4.4 is released, but for now it is necessary to call this function once,
@@ -6,4 +7,6 @@ fn main() {
esp_idf_sys::link_patches();
println!("Hello, world!");
sphinx_key_signer::say_hi();
}