diff options
Diffstat (limited to 'WebInterface')
-rwxr-xr-x | WebInterface/wasm/asm-paint/build.sh | 2 | ||||
-rw-r--r-- | WebInterface/wasm/asm-paint/deploy.py | 1 | ||||
-rw-r--r-- | WebInterface/wasm/asm-paint/index.html | 1 | ||||
-rw-r--r-- | WebInterface/wasm/asm-paint/loader.js | 1 | ||||
-rw-r--r-- | WebInterface/wasm/asm-paint/src/main.rs | 13 |
5 files changed, 17 insertions, 1 deletions
diff --git a/WebInterface/wasm/asm-paint/build.sh b/WebInterface/wasm/asm-paint/build.sh new file mode 100755 index 0000000..457d1d8 --- /dev/null +++ b/WebInterface/wasm/asm-paint/build.sh @@ -0,0 +1,2 @@ +#!/bin/sh +cargo build --target=wasm32-unknown-emscripten --release diff --git a/WebInterface/wasm/asm-paint/deploy.py b/WebInterface/wasm/asm-paint/deploy.py index ed4e0dd..fce7a02 100644 --- a/WebInterface/wasm/asm-paint/deploy.py +++ b/WebInterface/wasm/asm-paint/deploy.py @@ -9,6 +9,7 @@ HTML_MIME = 'text/html' REQUESTS = { '/': ('index.html', HTML_MIME), + '/loader.js': ('loader.js', JS_MIME), '/asm-paint.js': ('target/wasm32-unknown-emscripten/release/asm-paint.js', JS_MIME), '/asm_paint.wasm': ('target/wasm32-unknown-emscripten/release/asm_paint.wasm', WASM_MIME), } diff --git a/WebInterface/wasm/asm-paint/index.html b/WebInterface/wasm/asm-paint/index.html index b03a295..c47d89d 100644 --- a/WebInterface/wasm/asm-paint/index.html +++ b/WebInterface/wasm/asm-paint/index.html @@ -4,6 +4,7 @@ <meta charset="UTF-8"> <title> Scribblio </title> <script src='asm-paint.js'></script> + <script src='loader.js'></script> </head> <body> </body> diff --git a/WebInterface/wasm/asm-paint/loader.js b/WebInterface/wasm/asm-paint/loader.js new file mode 100644 index 0000000..3e25291 --- /dev/null +++ b/WebInterface/wasm/asm-paint/loader.js @@ -0,0 +1 @@ +//Module. diff --git a/WebInterface/wasm/asm-paint/src/main.rs b/WebInterface/wasm/asm-paint/src/main.rs index 0d01b18..f8949ee 100644 --- a/WebInterface/wasm/asm-paint/src/main.rs +++ b/WebInterface/wasm/asm-paint/src/main.rs @@ -1,3 +1,14 @@ +use std::os::raw::c_int; + +#[no_mangle] +pub extern fn run_infinite() { + std::thread::spawn(move || { + loop { + println!("iterating infititely"); + } + }); +} + fn main() { - println!("hello wasm world!"); + println!("haha from wasm lol"); } |