Browse Source

add multiple Rust binaries

master
parent
commit
ecfcb85041
  1. 8
      Cargo.toml
  2. 2
      plot.py
  3. 0
      simple-dmi.json
  4. 2
      src/simple-dmi.rs
  5. 3
      src/wavemeter.rs

8
Cargo.toml

@ -4,6 +4,14 @@ version = "0.1.0"
authors = ["Sebastien Bourdeauducq <sb@m-labs.hk>"]
edition = "2018"
[[bin]]
name = "simple-dmi"
path = "src/simple-dmi.rs"
[[bin]]
name = "wavemeter"
path = "src/wavemeter.rs"
[dependencies]
num-traits = "0.2"
serde = "1.0"

2
plot.py

@ -9,7 +9,7 @@ async def task(mw):
mw.setCentralWidget(widget)
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)
data = []
while True:

0
config.json → simple-dmi.json

2
src/main.rs → src/simple-dmi.rs

@ -31,7 +31,7 @@ fn read_config_from_file<P: AsRef<Path>>(path: P) -> Result<Config, Box<dyn Erro
}
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(
noptica::Dpll::frequency_to_ftw(config.freq_min, config.sample_rate),
noptica::Dpll::frequency_to_ftw(config.freq_max, config.sample_rate),

3
src/wavemeter.rs

@ -0,0 +1,3 @@
fn main() {
println!("hello world");
}
Loading…
Cancel
Save