WIP...
This commit is contained in:
parent
e7d2f8f6c7
commit
57d7e7a3ce
17 changed files with 608 additions and 500 deletions
|
|
@ -36,4 +36,4 @@ opt-level = "s"
|
|||
lto = true
|
||||
|
||||
[package.metadata.wasm-pack.profile.release]
|
||||
wasm-opt = false
|
||||
wasm-opt = false
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
wasm-pack build --target web
|
||||
wasm-pack build --target web -- --features wee_alloc
|
||||
cp pkg/frontend.js ../backend/static
|
||||
cp pkg/frontend_bg.wasm ../backend/static
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
use wasm_bindgen::prelude::*;
|
||||
use web_sys::Document;
|
||||
|
||||
pub fn edit_recipe(doc: &Document) {
|
||||
|
||||
}
|
||||
pub fn edit_recipe(doc: &Document) {}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
mod utils;
|
||||
mod handles;
|
||||
mod utils;
|
||||
|
||||
use wasm_bindgen::prelude::*;
|
||||
use web_sys::console;
|
||||
|
|
@ -11,7 +11,7 @@ use web_sys::console;
|
|||
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
|
||||
|
||||
#[wasm_bindgen]
|
||||
extern {
|
||||
extern "C" {
|
||||
fn alert(s: &str);
|
||||
}
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ pub fn main() -> Result<(), JsValue> {
|
|||
handles::edit_recipe(&document);
|
||||
|
||||
let title_input = document.get_element_by_id("title_field").unwrap();
|
||||
},
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
||||
|
|
@ -60,4 +60,4 @@ pub fn main() -> Result<(), JsValue> {
|
|||
// body.append_child(&val)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@ macro_rules! console_log {
|
|||
// Note that this is using the `log` function imported above during
|
||||
// `bare_bones`
|
||||
($($t:tt)*) => (console::log_1(&format_args!($($t)*).to_string().into()))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue