platform
This commit is contained in:
parent
645e03ea86
commit
ea38f61058
14 changed files with 123 additions and 19 deletions
|
@ -16,6 +16,7 @@ crate-type = ["staticlib", "cdylib", "rlib"]
|
|||
tauri-build = { version = "=2.0.0-beta.15", features = [] }
|
||||
|
||||
[dependencies]
|
||||
shared.workspace = true
|
||||
wellen.workspace = true
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
use std::rc::Rc;
|
||||
use std::sync::Mutex;
|
||||
use wellen::simple::Waveform;
|
||||
|
||||
mod wellen_helpers;
|
||||
use shared::wellen_helpers;
|
||||
|
||||
#[derive(Default)]
|
||||
struct Store {
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
use wellen::{simple::Waveform, *};
|
||||
|
||||
pub fn read_from_bytes(bytes: Vec<u8>) -> Result<Waveform> {
|
||||
read_from_bytes_with_options(bytes, &LoadOptions::default())
|
||||
}
|
||||
|
||||
pub fn read_from_bytes_with_options(bytes: Vec<u8>, options: &LoadOptions) -> Result<Waveform> {
|
||||
let header = viewers::read_header_from_bytes(bytes, options)?;
|
||||
let body = viewers::read_body(header.body, &header.hierarchy, None)?;
|
||||
Ok(Waveform::new(
|
||||
header.hierarchy,
|
||||
body.source,
|
||||
body.time_table,
|
||||
))
|
||||
}
|
Reference in a new issue