emscripten-core / emscripten-core/emscripten
Embind vectors, sets or maps to be converted to JS Arrays, Sets and Maps
Open
embind
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Why do std::vectors need to be registered in embind and then appear in JS as "vector" types and not as array? This makes them not iterable in for loops or in Angular templates.
Same for maps or unordered_maps could be JS Map.
And set or unordered_set could be JS Set.
This would come really handy as they could be used in JS without knowing they come from C++ and changing the JS code to adapt to some C++ constructs (iteration is probably the first one that comes to mind).
Contributor guide
Assessment
This issue has not been assessed yet.