Outline for the wasm compare function.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#![feature(exact_size_is_empty)]
|
||||
use std::io::Read;
|
||||
|
||||
use organic::settings::GlobalSettings;
|
||||
use wasm::wasm_parse_org;
|
||||
|
||||
mod error;
|
||||
@@ -10,6 +11,7 @@ mod wasm;
|
||||
use crate::init_tracing::init_telemetry;
|
||||
#[cfg(feature = "tracing")]
|
||||
use crate::init_tracing::shutdown_telemetry;
|
||||
use crate::wasm::compare::wasm_run_anonymous_compare_with_settings;
|
||||
#[cfg(feature = "tracing")]
|
||||
mod init_tracing;
|
||||
|
||||
@@ -40,10 +42,12 @@ async fn main_body() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let org_contents = read_stdin_to_string()?;
|
||||
let wasm_result = wasm_parse_org(org_contents.as_str());
|
||||
println!("{}", serde_json::to_string(&wasm_result)?);
|
||||
// if run_anonymous_compare(org_contents).await? {
|
||||
// } else {
|
||||
// Err("Diff results do not match.")?;
|
||||
// }
|
||||
if wasm_run_anonymous_compare_with_settings(org_contents, &GlobalSettings::default(), false)
|
||||
.await?
|
||||
{
|
||||
} else {
|
||||
Err("Diff results do not match.")?;
|
||||
}
|
||||
Ok(())
|
||||
} else {
|
||||
todo!()
|
||||
|
||||
Reference in New Issue
Block a user