Skip to content

Commit bbd4981

Browse files
Hacks to get through CI.
1 parent 8aec1d2 commit bbd4981

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

examples/prof2duckdb.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
#![warn(clippy::all, rust_2018_idioms)]
22
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
33

4-
#[cfg(target_arch = "wasm32")]
5-
compile_error!("DuckDB is not support on WASM");
6-
74
use std::ffi::OsString;
85
use std::path::Path;
96

107
use clap::Parser;
118

129
use legion_prof_viewer::deferred_data::DeferredDataSource;
10+
#[cfg(feature = "duckdb")]
1311
use legion_prof_viewer::duckdb_data::DataSourceDuckDBWriter;
1412
use legion_prof_viewer::file_data::FileDataSource;
1513
use legion_prof_viewer::http::client::HTTPClientDataSource;
@@ -42,6 +40,7 @@ fn file_ds(path: impl AsRef<Path>) -> Box<dyn DeferredDataSource> {
4240
Box::new(ParallelDeferredDataSource::new(FileDataSource::new(path)))
4341
}
4442

43+
#[cfg(feature = "duckdb")]
4544
fn main() {
4645
let args = Cli::parse();
4746

@@ -56,3 +55,8 @@ fn main() {
5655
.write()
5756
.expect("writing DuckDB database failed");
5857
}
58+
59+
#[cfg(not(feature = "duckdb"))]
60+
fn main() {
61+
panic!("Rebuild with --features=duckdb");
62+
}

0 commit comments

Comments
 (0)