WebAssembly Part 3 : Different ways to call the exported function in WebAssembly.

How to use ccall, cwrap in emscripten to call the exported function like Javascript functions. This is Part-3 of WebAssembly Tutorial , You can read Part 1 and Part 2 , which gives you the picture of what is webAssembly. Let’s write a simple C++ program with some functions // test.cpp #include<iostream> using namespace std; extern “C” …

WebAssembly Part 2 : Writing our first calculator program

In this tutorial we will learn how to create a calculator in WebAssembly. If you aren’t aware of WebAssembly then you can learn here . First let’s write our C program. // calculator.cpp #include<stdio.h> extern “C” { double calculate(double num1, double num2, int operation) { double result = 0; switch(operation) { case 1 : result = …

WebAssembly → Part 1 :Introduction to WebAssembly.

WebAssembly satisfies every developers desire 🤩 of writing ✍️ efficient code. If you’re a frontend developer👨 , definitely you spend more time with javascript 👨🏾‍💻 than your wife 👰. We always try to write high performance ⚡️code . But Javascript doesn’t allow us to do that in some cases, where the performance can still be improved. One …

Design a site like this with WordPress.com
Get started