此頁面由社群從英文翻譯而來。了解更多並加入 MDN Web Docs 社群。

View in English Always switch to English

nop

nop 源於 no-operation(沒有任何操作),顧名思義,它不會執行任何動作。

嘗試一下

(module (func (export "do_nothing") nop ) ) 
const url = "{%wasm-url%}"; await WebAssembly.instantiateStreaming(fetch(url)).then((result) => { result.instance.exports.do_nothing(); }); 

語法

wasm
nop 
指令 二進制運算碼
nop 0x01