mirror of
https://github.com/novnc/noVNC.git
synced 2026-06-03 10:59:39 +00:00
- mode 1: call putImageData from rust/wasm. This involves copying the image data via the wasm-bindgen API. - mode 2: allocating memory in rust/wasm and returning reference to it for JS code. JS code calls draw2 using the reference so now image data is copying in either direction. - mode 3: same as mode 2 but the draw3 function treats the memory as a vector of u32 instead of a vector of u8.
15 lines
555 B
JSON
15 lines
555 B
JSON
{
|
|
"scripts": {
|
|
"serve": "webpack-dev-server --host 0.0.0.0",
|
|
"build-debug": "cargo +nightly build --target wasm32-unknown-unknown && wasm-bindgen target/wasm32-unknown-unknown/debug/novnc.wasm --out-dir .",
|
|
"build-release": "cargo +nightly build --release --target wasm32-unknown-unknown && wasm-bindgen target/wasm32-unknown-unknown/release/novnc.wasm --out-dir .",
|
|
"bundle": "npm run build-release && webpack"
|
|
|
|
},
|
|
"devDependencies": {
|
|
"webpack": "^4.16.2",
|
|
"webpack-cli": "^3.1.0",
|
|
"webpack-dev-server": "^3.1.0"
|
|
}
|
|
}
|