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

Story for refs? #3

Open
dead-claudia opened this issue Nov 1, 2022 · 2 comments
Open

Story for refs? #3

dead-claudia opened this issue Nov 1, 2022 · 2 comments

Comments

@dead-claudia
Copy link

Refs have a similar issue to linear memory: there's a non-freeable linear memory and there's a WIP GC proposal that entirely offloads the memory management to the runtime. Where this seeks to provide a way to manage blocks of linear-like memory, a similar story would be very useful for refs for embedded users (where memory constraints may render GC impractical) and WASI server writers (where scaling based on memory usage is very desirable).

Note: I'm not recommending any particular API for this (much less mmap-like APIs in particular), just that it's a problem space that should be looked into.

@dtig
Copy link
Member

dtig commented Nov 21, 2022

Thanks for filing this issue, I'm not very familiar with WASI server writers, but curious if you'd be able to go into details of what would be the most useful in that space that this proposal might address?

@dead-claudia
Copy link
Author

@dtig I'm not aware of any major production WASI-based servers currently, but it is a possibility I have great interest in, since it offers a way to cheaply sandbox them to systemically eliminate a number of common vulnerabilities with them (notably, RCEs). A cursory search has shown I'm not the only one interested in this space, though.

This proposal already addresses the concern of memory management, which is particularly helpful for caching. Funcref tables of course generally would remain static, but externrefs are useful (and may be necessary the way WASI's design is going) for managing references to external resources, and it'd be nice if these could scale with the program's general memory usage as well.

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

2 participants