内容纲要

wasm js 与 cpp 类型转换

  • null void
  • number int
  • string const char* char*
C++类型 JavaScript类型
void undefined
bool true or false
char number
signed char number
unsigned char number
short number
ungigned short number
int number
unsigned int number
log number
unsigned long number
float number
double number
std::string ArrayBuffer, Uint8Array, Uint8ClampedArray, Int8Array, or String
std::wstring String (UTF-16 code units)
emscripten::val anything

发表评论

电子邮件地址不会被公开。 必填项已用*标注