DraganSr

web-links (blinks) web-log (blog) by Dragan Sretenovic

Tuesday, April 19, 2022

C/C++ => WASM

Advantage: more compact WASM code, plus access of existing libs.

When you've written a new code module in a language like C/C++, you can compile it into WebAssembly using a tool like Emscripten. 

Compiling a New C/C++ Module to WebAssembly - WebAssembly | MDN

Compiling an Existing C Module to WebAssembly - WebAssembly | MDN

How to Compile C code into WebAssembly with Emscripten – The New Stack

alternative:

Bare metal WASM with C using Clang - no stdlib; no emscripten - Demo - YouTube


I want to… - WebAssembly

  • C/C++
    • starting from scratch
    • library that I want to port to the Web
  • Rust
  • AssemblyScript (a TypeScript-like syntax)
  • C#
  • F#
  • Go
    • with full language support
    • targeting minimal size
  • Kotlin
  • Swift
  • D
  • Pascal
  • Zig
  • Grain
Dragan at 6:00 AM No comments:
‹
›
Home
View web version

About Me

My photo
Dragan
View my complete profile
Powered by Blogger.