SkillAgentSearch skills...

EmbindAsync

Call C++ function that use await operator from Javascript

Install / Use

/learn @Satancito/EmbindAsync
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Emscripten - Embind Async

Call C++ function that use await operator from Javascript

Steps to configure

1. Emsdk location

Create a environment variable named as EMSCRIPTEN_DIR with the location of emsdk folder.
Example on my pc, get enviroment variable value.

PS> Write-Host $env:EMSCRIPTEN_DIR

I:\WebAssembly\emsdk

2. Install PowerShell Core

You can install PowerShell Core on Windows, Linux, MacOS

3. Run Compile.ps1

PS> ./Compile.ps1

Compile.ps1 compiles all sources into a EmbindAsync.js that must be added in main page index.html

4. Run in your browser

PS> ./Run.ps1

References

Embind

Passing a C++ function to a javascript function in emscripten

Damien Buhl - daminetreg - js::bind

Satancito - InsaneCpp

Emscripten - Asyncify returning values

Powershell Core

View on GitHub
GitHub Stars4
CategoryDevelopment
Updated3y ago
Forks0

Languages

C

Security Score

70/100

Audited on Sep 1, 2022

No findings