Add math mod for lib

This commit is contained in:
2020-08-20 15:27:50 +07:00
parent 39101f2081
commit 0ae0b214bc
6 changed files with 35 additions and 12 deletions

View File

@@ -3,7 +3,6 @@ use wasm_bindgen::prelude::*;
extern crate web_sys;
mod utils;
mod main;
// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global
// allocator.

View File

@@ -1,11 +0,0 @@
fn main() {
let a = 10;
let b = 5;
let sum = sum(a, b);
println!("Sum of {} + {} = {}", a, b, sum);
}
pub fn sum(a: i32, b: i32) -> i32 {
a + b
}