aboutsummaryrefslogtreecommitdiff
path: root/demos/scons-embind/foo.cpp
blob: 61be501a08f2881a1bb6e0622d3c8cda394caf49 (plain)
1
2
3
4
5
6
7
8
9
10
11
#include <stdio.h>
#include <emscripten/bind.h>

void print_some_stuff(int a, float b, const std::string& s) {
    printf("print_some_stuff: %d, %f, %s\n", a, b, s.c_str());
}

EMSCRIPTEN_BINDINGS(foo) {
    emscripten::function("print_some_stuff", &print_some_stuff);
}