Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An example for a user-land implementation #24

Open
Bnaya opened this issue May 13, 2024 · 0 comments
Open

An example for a user-land implementation #24

Bnaya opened this issue May 13, 2024 · 0 comments

Comments

@Bnaya
Copy link

Bnaya commented May 13, 2024

A while back I wrote a library that exposes js data types behind a proxy, and uses [Shared]ArrayBuffer as the heap
https://github.com/Bnaya/objectbuffer
The objects are free-form

You can transfer the [Shared]ArrayBuffer to a WebWorker/worker_thread, and with the appropriate locking, you can have shared memory js objects

The memory management is done via some kind of reference counting, and user-triggered free pass
While the library actually works, the reason i didn't really use it, is that strings will never be efficient as far as I can see

@Bnaya Bnaya closed this as completed May 13, 2024
@Bnaya Bnaya changed the title USer Example for a user-land implementation May 13, 2024
@Bnaya Bnaya reopened this May 13, 2024
@Bnaya Bnaya changed the title Example for a user-land implementation An example for a user-land implementation May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant