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

Multiple calls to pack? #9

Open
kesmit13 opened this issue Feb 7, 2023 · 3 comments
Open

Multiple calls to pack? #9

kesmit13 opened this issue Feb 7, 2023 · 3 comments

Comments

@kesmit13
Copy link

kesmit13 commented Feb 7, 2023

Is it possible to allow multiple calls to wasi-vfs pack? We'd like to add some files to a wasm module as a "standard library", but then add other directories later on with subsequent calls. It appears as though if you do that now, you only get the result of the final call.

@kateinoigakukun
Copy link
Owner

I think you are mapping the same directory twice. See https://github.com/kateinoigakukun/wasi-vfs/tree/main/tests/run-make/pack-twice for the multiple call example.

@kesmit13
Copy link
Author

kesmit13 commented Feb 8, 2023

Hmm, I'm not having any luck with this. If I run the following, it works as expected:

# Add standard library modules
wasi-vfs pack udf-quickjs.wasm --mapdir "/app::./app" --mapdir "/lib::./lib" --output udf-quickjs.wasm

However, if I split it into two commands, I only get the first one:

# Add standard library modules
wasi-vfs pack udf-quickjs.wasm --mapdir "/lib::./lib" --output udf-quickjs.wasm

# Add customer code modules
wasi-vfs pack udf-quickjs.wasm --mapdir "/app::./app" --output udf-quickjs.wasm

@kesmit13
Copy link
Author

kesmit13 commented Feb 8, 2023

Wait a second, things just got weird. If I reverse the order of the pack commands so that /app is first and /lib is second, it does work...

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