File size: 286 Bytes
00df61d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <string>
#include <emscripten/emscripten.h>
#include <emscripten/bind.h>

using namespace emscripten;

int main() {
  EM_ASM(out(Module.getString()));
}

std::string getString() {
  return "Hello, world";
}

EMSCRIPTEN_BINDINGS(typeOf) {
  function("getString", &getString);
}