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

How to Add custom function along with wasi #4595

Open
newNcy opened this issue Apr 23, 2024 · 3 comments
Open

How to Add custom function along with wasi #4595

newNcy opened this issue Apr 23, 2024 · 3 comments
Labels
❓ question I've a question!

Comments

@newNcy
Copy link

newNcy commented Apr 23, 2024

Summary

after add a custom import function in wasm, the c-api wasi_get_imports will failed to resolve that import

Additional details

Provide any additional details here.

@newNcy newNcy added the ❓ question I've a question! label Apr 23, 2024
@syrusakbary
Copy link
Member

This should be trivial to do, but unfortunately it is not, mainly due to WASI imports require to be clonable/usable across different threads.
We may need to add a way to generate imports easily for WASI, and/or make the imports Send/Sync for WASI.

So far we haven't found an elegant solution for this, but will post once we do.

@newNcy
Copy link
Author

newNcy commented Apr 23, 2024

This should be trivial to do, but unfortunately it is not, mainly due to WASI imports require to be clonable/usable across different threads. We may need to add a way to generate imports easily for WASI, and/or make the imports Send/Sync for WASI.

So far we haven't found an elegant solution for this, but will post once we do.

so what i need to do for that purpose

@newNcy
Copy link
Author

newNcy commented Apr 23, 2024

Why can't we just generate what wasi has and let the developer define the rest?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓ question I've a question!
Projects
None yet
Development

No branches or pull requests

2 participants