ern0/howto-wasm-minimal
소개
순수 C/C++로 최소 WASM 모듈을 만드는 방법
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalhowto-wasm-minimal
How to create minimal wasm module - PoC
Goals
- use no Emscripten or any libs
- simple toolchain, compile to wasm in a single step
- wasm may use memory prepared by JavaScript
- do something relative compute-intensive
- do something visible
Mystic issue
Symptom: on some systems, the linker may hang, or produce output file with correct size but full of zeros (that's why build script contains a hexdump as last step).
Solution: update your linker.
More info: https://stackoverflow.com/questions/71573019/cant-compile-to-wasm-on-linux
Install
You need CLANG and CLANG's linker (LLD). Tested on versions 13 and 14.
Debian nightly pacakges: https://apt.llvm.org/
On MacOS, you should install CLANG from homebrew. More info on Mac troubleshooting: https://til.simonwillison.net/webassembly/compile-to-wasm-llvm-macos
On Windows, you may use Chocolatey package manager to install CLANG: https://chocolatey.org/
Summary
Why WASM?
Writing web app in any language which is not JavaScript is just pure joy.
Try it
The color change and the blur effect is a WASM module, written in C:
관련 프로젝트 살펴보기
불러오는 중…