Emscripten 3.0 ์ปดํ์ผ๋ฌ ๋ฆด๋ฆฌ์ค๊ฐ ์ถ์๋์ด C/C++ ๋ฐ LLVM ๊ธฐ๋ฐ ํ๋ฐํธ์๋๋ฅผ ์ฌ์ฉํ ์ ์๋ ๊ธฐํ ์ธ์ด์ ์ฝ๋๋ฅผ ๋ฒ์ฉ ํ์ ์์ค ์ค๊ฐ ์ฝ๋ WebAssembly๋ก ์ปดํ์ผํ์ฌ JavaScript ํ๋ก์ ํธ์์ ํ์ ํตํฉ์ ์คํํ ์ ์์ต๋๋ค. ์น ๋ธ๋ผ์ฐ์ ์์ Node.js์์ ์ฌ์ฉํ๊ฑฐ๋ wasm ๋ฐํ์์ ์ฌ์ฉํ์ฌ ์คํ๋๋ ๋ ๋ฆฝํ ๋ค์ค ํ๋ซํผ ์ ํ๋ฆฌ์ผ์ด์ ์ ์์ฑํฉ๋๋ค. ํ๋ก์ ํธ ์ฝ๋๋ MIT ๋ผ์ด์ ์ค์ ๋ฐ๋ผ ๋ฐฐํฌ๋ฉ๋๋ค. ์ปดํ์ผ๋ฌ๋ LLVM ํ๋ก์ ํธ์ ๊ฐ๋ฐ์ ์ฌ์ฉํ๊ณ Binaryen ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ WebAssembly ์์ฑ ๋ฐ ์ต์ ํ์ ์ฌ์ฉ๋ฉ๋๋ค.
Emscripten ํ๋ก์ ํธ์ ์ฃผ์ ๋ชฉํ๋ ์ฝ๋๊ฐ ์์ฑ๋ ํ๋ก๊ทธ๋๋ฐ ์ธ์ด์ ๊ด๊ณ์์ด ์น์์ ์ฝ๋๋ฅผ ์คํํ ์ ์๋ ๋๊ตฌ๋ฅผ ๋ง๋๋ ๊ฒ์ ๋๋ค. ์ปดํ์ผ๋ ์ ํ๋ฆฌ์ผ์ด์ ์ ํ์ค C ๋ฐ C++ ๋ผ์ด๋ธ๋ฌ๋ฆฌ(libc, libcxx), C++ ํ์ฅ, pthread ๊ธฐ๋ฐ ๋ฉํฐ์ค๋ ๋ฉ, POSIX API ๋ฐ ๋ค์ํ ๋ฉํฐ๋ฏธ๋์ด ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ๋ํ ํธ์ถ์ ์ฌ์ฉํ ์ ์์ต๋๋ค. Web API์ JavaScript ์ฝ๋์์ ํตํฉ์ ์ํ API๋ ๋ณ๋๋ก ์ ๊ณต๋ฉ๋๋ค.
Emscripten์ Canvas๋ฅผ ํตํด SDL2 ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ์ถ๋ ฅ ๋ธ๋ก๋์บ์คํ ์ ์ง์ํ๊ณ WebGL์ ํตํด OpenGL ๋ฐ EGL๋ ์ง์ํ๋ฏ๋ก ๊ทธ๋ํฝ ์ ํ๋ฆฌ์ผ์ด์ ๊ณผ ๊ฒ์์ WebAssembly๋ก ๋ณํํ ์ ์์ต๋๋ค(์๋ฅผ ๋ค์ด Qt ํดํท ํฌํธ๊ฐ ์๊ณ Unreal Engine์ ์ง์ํฉ๋๋ค) 4 ๋ฐ ์ ๋ ๊ฒ์ ์์ง, ๋ฌผ๋ฆฌ์ Bullet ์์ง). C/C++๋ก ์ฝ๋๋ฅผ ์ปดํ์ผํ๋ ๊ฒ ์ธ์๋ Lua, C#, Python, Ruby ๋ฐ Perl ์ธ์ด์ฉ ๋ธ๋ผ์ฐ์ ์์ ์ธํฐํ๋ฆฌํฐ ๋ฐ ๊ฐ์ ๋จธ์ ์ ์คํํ ์ ์๋๋ก ํ๋ก์ ํธ๊ฐ ๋ณ๋๋ก ๊ฐ๋ฐ๋๊ณ ์์ต๋๋ค. Swift, Rust, D ๋ฐ Fortran๊ณผ ๊ฐ์ ์ธ์ด์ ์ฌ์ฉ ๊ฐ๋ฅํ ๋น Clang ํ๋ฐํธ์๋๋ฅผ LLVM์ ์ ์ฉํ๋ ๊ฒ๋ ๊ฐ๋ฅํฉ๋๋ค.
Emscripten 3.0์ ์ฃผ์ ๋ณ๊ฒฝ ์ฌํญ:
- emscripten์ ์ฌ์ฉ๋ musl C ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ๋ฒ์ 1.2.2๋ก ์ ๋ฐ์ดํธ๋์์ต๋๋ค(๋ฒ์ 2๋ Emscripten 1.1.15.x ๋ถ๊ธฐ์์ ์ฌ์ฉ๋์์ต๋๋ค).
- ํ๋ก์ ํธ ๋ด์์ ์ฃผ๋ก ์ฌ์ฉ๋์๋ ํจ์ ์ค ์ผ๋ถ๊ฐ parseTools.js ๋ผ์ด๋ธ๋ฌ๋ฆฌ์์ ์ ๊ฑฐ๋์์ต๋๋ค: RemovePointing, PointingLevels, RemoveAllPointing, isVoidType, isStructPointerType, isArrayType, isStructType, isVectorType, isStructuralType getStructuralTypeParts, getStructuralTypePartBits, isFunctionDef, isPossilyFunctionType, isFunctionType, getReturnType, SplitTo kenList, _IntToHex, IEEEUnHex, Compiletime.isPointerType, Compiletime.isStructType, Compiletime.INT_TYPES, isType.
- shell.html ๋ฐ shell_minimal.html ํ ํ๋ฆฟ์์ emscripten ์์ ์ค์ ๋ฐ์ํ๊ณ stderr๋ฅผ ํตํด ์ ํ๋ฆฌ์ผ์ด์ ์์ ์ถ๋ ฅ๋๋ ์ค๋ฅ ๋ฉ์์ง์ ์ถ๋ ฅ์ ๊ธฐ๋ณธ์ ์ผ๋ก console.error ๋์ console.warn์ ์ฌ์ฉํ๋๋ก ์ ํ๋ฉ๋๋ค.
- ํ์ผ ์ด๋ฆ์ ์ฌ์ฉ๋๋ ํน์ ํ ์คํธ ์ธ์ฝ๋ฉ์ ์ง์ ํ๋ ๊ธฐ๋ฅ์ด ์ถ๊ฐ๋์์ต๋๋ค. ํ์ผ ์ด๋ฆ์ ์ ๋ฌํ ๋ ์ ๋ฏธ์ฌ ํ์์ผ๋ก ์ธ์ฝ๋ฉ์ ์ง์ ํ ์ ์์ต๋๋ค(์: "a.rsp.utf-8" ๋๋ "a.rsp.cp1251").
์ถ์ฒ : opennet.ru