Add math mod for lib
This commit is contained in:
@@ -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.
|
||||
|
||||
11
src/main.rs
11
src/main.rs
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user