web: migrate from lib->bin

This commit is contained in:
2024-07-06 18:18:28 -07:00
parent 5fc272054c
commit b4d1528612
2 changed files with 1 additions and 6 deletions

25
web/src/main.rs Normal file
View File

@@ -0,0 +1,25 @@
// (Lines like the one below ignore selected Clippy rules
// - it's useful when you want to check your code with `cargo make verify`
// but some rules are too "annoying" or are not applicable for your case.)
#![allow(clippy::wildcard_imports)]
use log::Level;
use seed::{prelude::wasm_bindgen, App};
mod api;
mod consts;
mod graphql;
mod state;
mod view;
fn main() {
// This provides better error messages in debug mode.
// It's disabled in release mode so it doesn't bloat up the file size.
#[cfg(debug_assertions)]
console_error_panic_hook::set_once();
let lvl = Level::Info;
console_log::init_with_level(lvl).expect("failed to initialize console logging");
// Mount the `app` to the element with the `id` "app".
App::start("app", state::init, state::update, view::view);
}