pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://developer.mozilla.org/ko/docs/WebAssembly/Reference/JavaScript_interface/compile_static

4bdf-a490-390a1aebf6dd/airgap.js" >

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

WebAssembly.compile()

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2017년 10월.

* Some parts of this feature may have varying levels of support.

**WebAssembly.compile()**함수는 WebAssembly 바이너리 코드에서 WebAssembly.Module을 컴파일합니다. 이 함수는 모듈을 인스턴스화하기 전에 컴파일해야하는 경우에 유용합니다. 그렇지 않으면 WebAssembly.instantiate () 함수를 사용해야합니다.

Syntax

js
WebAssembly.compile(bufferSource);

Parameters

bufferSource

컴파일 할 .wasm 모듈의 이진 코드가 들어있는 typed array 또는 ArrayBuffer입니다.

Return value

Promise는 컴파일 된 모듈로 표현된 WebAssembly.Module 객체로 반환됩니다.

Exceptions

Examples

다음은 compile() 함수를 사용하여 simple.wasm 바이트 코드를 컴파일 하고 postMessage()를 사용하여 worker에 보내는 예제입니다.

js
var worker = new Worker("wasm_worker.js");

fetch("simple.wasm")
  .then((response) => response.arrayBuffer())
  .then((bytes) => WebAssembly.compile(bytes))
  .then((mod) => worker.postMessage(mod));

참고 : 대부분의 경우에 WebAssembly.compileStreaming()를 사용하는 것이 좋습니다. 이는 compile()보다 효율적이기 때문입니다.

명세서

Specification
WebAssembly JavaScript Interface
# dom-webassembly-compile

브라우저 호환성

See also

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy