
1.51.0 clippy has been giving me trouble (not reporting all problems), and so I take the easy way out and just bump MSRV. We will upgrade to 1.56.0 once it comes around anyway to get access to that sweet disjoint capture in closures (https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html)
18 lines
680 B
Rust
18 lines
680 B
Rust
// Forbid warnings in release builds:
|
|
#![cfg_attr(not(debug_assertions), deny(warnings))]
|
|
#![forbid(unsafe_code)]
|
|
#![warn(clippy::all, rust_2018_idioms)]
|
|
|
|
#[cfg(target_arch = "wasm32")]
|
|
use eframe::wasm_bindgen::{self, prelude::*};
|
|
|
|
/// This is the entry-point for all the web-assembly.
|
|
/// This is called once from the HTML.
|
|
/// It loads the app, installs some callbacks, then returns.
|
|
/// You can add more callbacks like this if you want to call in to your code.
|
|
#[cfg(target_arch = "wasm32")]
|
|
#[wasm_bindgen]
|
|
pub fn start(canvas_id: &str) -> Result<(), wasm_bindgen::JsValue> {
|
|
let app = egui_demo_lib::WrapApp::default();
|
|
eframe::start_web(canvas_id, Box::new(app))
|
|
}
|