WebAssembly
| |
특징
| 명령형, 구조적, 정적 타이핑
|
최초 공개
| 2017년 3월
|
설계
| |
개발
| |
라이선스
| |
파일 확장자
| .wat
.wasm |
1. 개요
2. 역사
3. 예시
C 소스 코드
WebAssembly IR
WebAssembly 바이너리
#include <stdio.h>
int factorial(int n) {
if (n == 0)
return 1;
else
return n * factorial(n-1);
}
WebAssembly IR
get_local 0
i64.eqz
if (result i64)
i64.const 1
else
get_local 0
get_local 0
i64.const 1
i64.sub
call 0
i64.mul
end
WebAssembly 바이너리
20 00
50
04 7E
42 01
05
20 00
20 00
42 01
7D
10 00
7E
0B