mirror of
https://github.com/eliasstepanik/egui_node_graph.git
synced 2026-01-11 22:08:28 +00:00
24 lines
735 B
Rust
24 lines
735 B
Rust
#![forbid(unsafe_code)]
|
|
#![cfg_attr(not(debug_assertions), deny(warnings))] // Forbid warnings in release builds
|
|
#![warn(clippy::all, rust_2018_idioms)]
|
|
|
|
// When compiling natively:
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
fn main() {
|
|
use eframe::egui::Visuals;
|
|
|
|
eframe::run_native(
|
|
"Egui node graph example",
|
|
eframe::NativeOptions::default(),
|
|
Box::new(|cc| {
|
|
cc.egui_ctx.set_visuals(Visuals::dark());
|
|
#[cfg(feature = "persistence")]
|
|
{
|
|
Box::new(egui_node_graph_example::NodeGraphExample::new(cc))
|
|
}
|
|
#[cfg(not(feature = "persistence"))]
|
|
Box::new(egui_node_graph_example::NodeGraphExample::default())
|
|
}),
|
|
);
|
|
}
|