Comments (3)
A new example showing how to actual use the memory could be interesting for sure.
We have to be careful though, mixing two allocators (one on each side) will most likely lead to problems, so we have several possibilities:
- Have the same allocator on both sides
- Have just one allocator and the other side has to call into it (as we currently do with the allocator in Rust)
- Don't allocate on the Rust side, then we can just put stuff into memory once and Rust can use it
For the example I can go with option 3 for now.
from hellorust.
Sounds good!
By option (3) you basically mean the creation of the Memory
object and using it for storing objects, and then passing pointers to it (indexes) to the Rust code, right?
BTW, I'm not even sure if the option (1) is possible at the moment. Most likely the allocators will differ.
from hellorust.
Regarding (3): Yup, just put in some data, pass it as a pointer and let Rust construct the object, but not deallocate anything.
Option (1) is surely possible as long as both sides are absolutely identical (then again a minimal dumb allocator is not too hard to write, I do have such an example around as well)
from hellorust.
Related Issues (13)
- Post: size comparison
- Integer overflow in factorial demo HOT 2
- Vector element type in alloc function is unspecified HOT 2
- base64 in rust vs browser's built-in HOT 5
- Faults in the setup/wasm-target guide HOT 1
- loaders loader loaders
- Sha1 demo is broken HOT 1
- Two additional examples: pinky & wasm-astar
- Demos should use extern fn? HOT 1
- License? HOT 2
- Hellorust should be CC0 licensed. HOT 5
- Adding a couple of talks here HOT 2
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 hellorust.