-
Notifications
You must be signed in to change notification settings - Fork 1.5k
c-api: component-model: Resource table, WASI #11055
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
c-api: component-model: Resource table, WASI #11055
Conversation
For
Right now
This has tripped me up in the past as well, I think it might be reasonable to add |
Where should I place this? Maybe And how should the naming convention be? Similar to how it is in
Seems like a nice solution, I think I'll try that in a next PR? |
I've long wanted to move |
Does that look correct?
Should I do that also here? Would that include adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does that look correct?
Looks good! Just one minor rename, and with some comments in the headers for the new functions looks good. Mind adding a test or two as well? (doesn't need to be too too fancy)
I've long wanted to move wasi.h and scope it under the "wasmtime" namespace
Should I do that also here? Would that include adding wasmtime_wasip1_ prefix to everything?
Nah let's save that for later. At this point it's probably best to just not touch it and achieve these goals with the updates going forward. I don't think there's any real need to rename the preexisting APIs at this time.
I've gotten quite stuck on how to do resources, so I decided to try WASI first.
Some things I'm unsure about:
Option
and thenexpect()
in the WASI traits, or is the default context fine?wasmtime_context_set_wasi_p2()
?On resources, I think I'm getting stuck on
ResourceTypeKind::Host
usingTypeId
.Would all the resources use a
CApiResource
type on the rust side, and then use a string discriminant, or something like that?Do you have any other ideas?