Comments (4)
Maybe not.
A more practical way is to encode your c++ data structure into binary and decode it in the javascript.
from wasm-examples.
Thank for your response.
You know my first problem was how to pass multiple variables in the same function but after some research i saw that is impossible and i wanted to try data structures.
I want to ask you if the encode and decode data structures is the best solution for my first problem or exist another solutions
from wasm-examples.
In my opinion, encode and decode the data in WebAssembly.Memory
is the most efficient way (for now).
However, the Emscripten also provides the Embind
and WebIDL Binder
technology to bind C++ data structures to js, but it relies on extra IDL or js "glue" file to achieve that. It's convenient but seems expensive. Under the hood, I think it still based on encoding and decoding the WebAssembly.Memory
(not confirmed).
from wasm-examples.
Thank you for your quick and helpful response and also for the links.
from wasm-examples.
Related Issues (7)
- 尝试过将OpenGL程序嵌入到Web中吗? HOT 2
- 我运行的时候抱错为这个 怎么办啊 HOT 5
- 关于一系列报错的问题
- 最新版本,编译成wasm报错 HOT 2
- 无法编译rust的示例
- matrix例子中 为什么webAssembly用时比js更长呀 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wasm-examples.