add multiple Rust binaries
This commit is contained in:
parent
e4bad186dc
commit
ecfcb85041
@ -4,6 +4,14 @@ version = "0.1.0"
|
|||||||
authors = ["Sebastien Bourdeauducq <sb@m-labs.hk>"]
|
authors = ["Sebastien Bourdeauducq <sb@m-labs.hk>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "simple-dmi"
|
||||||
|
path = "src/simple-dmi.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "wavemeter"
|
||||||
|
path = "src/wavemeter.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
num-traits = "0.2"
|
num-traits = "0.2"
|
||||||
serde = "1.0"
|
serde = "1.0"
|
||||||
|
2
plot.py
2
plot.py
@ -9,7 +9,7 @@ async def task(mw):
|
|||||||
mw.setCentralWidget(widget)
|
mw.setCentralWidget(widget)
|
||||||
mw.show()
|
mw.show()
|
||||||
|
|
||||||
process = await asyncio.create_subprocess_shell("cargo run --release",
|
process = await asyncio.create_subprocess_shell("cargo run --release --bin simple-dmi",
|
||||||
stdout=asyncio.subprocess.PIPE)
|
stdout=asyncio.subprocess.PIPE)
|
||||||
data = []
|
data = []
|
||||||
while True:
|
while True:
|
||||||
|
@ -31,7 +31,7 @@ fn read_config_from_file<P: AsRef<Path>>(path: P) -> Result<Config, Box<dyn Erro
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let config = read_config_from_file("config.json").unwrap();
|
let config = read_config_from_file("simple-dmi.json").unwrap();
|
||||||
let mut refpll = noptica::Dpll::new(
|
let mut refpll = noptica::Dpll::new(
|
||||||
noptica::Dpll::frequency_to_ftw(config.freq_min, config.sample_rate),
|
noptica::Dpll::frequency_to_ftw(config.freq_min, config.sample_rate),
|
||||||
noptica::Dpll::frequency_to_ftw(config.freq_max, config.sample_rate),
|
noptica::Dpll::frequency_to_ftw(config.freq_max, config.sample_rate),
|
3
src/wavemeter.rs
Normal file
3
src/wavemeter.rs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fn main() {
|
||||||
|
println!("hello world");
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user