Skip to content
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.

Package data files #195

Open
whitequark opened this issue Jun 25, 2020 · 1 comment
Open

Package data files #195

whitequark opened this issue Jun 25, 2020 · 1 comment

Comments

@whitequark
Copy link

whitequark commented Jun 25, 2020

Motivation

I've published many of the FOSS FPGA tools as WebAssembly-based PyPI packages in the YoWASP project. All of these tools require data files located in the filesystem, and it is impractical to adjust their code to read file data embedded directly in the binary. Because of this, they are currently distributed together with a small Python stub that sets up the preopens.

I'd like to distribute these tools via WAPM too.

Proposed solution

It would be great if WAPM made it possible to provide data files as a part of the package. These files would be mounted in a location accessible only to the package itself, preopened automatically.

Alternatives

Some kind of WASI interposer that allows embedding data files in the WASM file without requiring any changes to the source would also work.

@proohit
Copy link

proohit commented May 19, 2021

I have a similar use-case where I want to publish a WASI/WASM alongside it's glue code as some kind of WASM library. That way, I could publish a WAPM package and use it from different projects using their corresponding glue code, all via WAPM. AFAIS, WAPM only accepts a single source file, but that doesn't allow me to publish glue code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants