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

Resource Access #11

Open
ErikMcClure opened this issue Sep 19, 2018 · 0 comments
Open

Resource Access #11

ErikMcClure opened this issue Sep 19, 2018 · 0 comments

Comments

@ErikMcClure
Copy link

In line with how EXE formats work, it would be useful if we could declare a custom section that is exposed as a read-only memory section to a webassembly module. The runtime could then memory-map the WASM file contents into an address space accessible by webassembly to efficiently represent the data.

Because this would store arbitrary binary data, the contents of the read-only memory store could be anything, including some sort of tiny zipfile format to recreate an entire miniature read-only filesystem within the WASM module. An example syntax would be using file://foo to refer to file foo in the embedded zipfile.

It would technically be possible to make this memory write-able or even extensible, but this might be a bad idea, because it then state is being stored inside the .wasm file, which breaks statelessness assumptions and basically everything else.

Under the hood, this feature is dependent on multiple memories, and would likely be related to standard optimizations looking for read-only memories that would be declared inside the EXE itself when compiled.

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