HaxeFoundation / HaxeFoundation/hxcpp

Embind

Open
#713 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
330
Forks
227
Avg merge
2d 16h
Merged PRs (30d)
18

Description

Embind is used to bind C++ functions and classes to JavaScript, so that the compiled code can be used in a natural way by “normal” JavaScript.
According to this documentation how can i use Embind in my Haxe code ?
https://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/embind.html

```cpp
#include

using namespace emscripten;

float lerp(float a, float b, float t) {
return (1 - t) * a + t * b;
}

EMSCRIPTEN_BINDINGS(my_module) {
function("lerp", &lerp);
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.