maple3142 / maple3142/wasm-jseval
how to pass arrays and/or typed arrays as arguments?
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 241
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
if I modify the example to call the function with smth like `[1]` and call `JSON.stringify` inside - I can see the parameter gets converted to `{"0":1}`. Same goes for typed arrays.
How can I pass arrays, specifically typedarrays? Or, where do I start to add this functionality?
The idea is to pass a typed array which the function can modify without creating a ton of new objects
Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file, test, or entry point is identified in the issue. Start by locating the argument-conversion path for JavaScript arrays and typed arrays, then determine how mutable typed-array data should cross the WebAssembly boundary without unnecessary object creation; done means a documented working call and coverage for both array types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, javascript, wasm
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100