-
Notifications
You must be signed in to change notification settings - Fork 13
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
Switch to wit-bindgen 0.34 #44
Conversation
Signed-off-by: itowlson <[email protected]>
Context: the motivation for moving to 0.34 is that (in my project where I need to use 0.34) I want to write:
and this fails against SDK 3.1 with "no method named |
I wouldn't worry about this. It's just a superficial renaming with the same semantics as before. Spin's bindgen is from I think the way forward here will be to update the WIT files as necessary to use the new names -- first here, and then also in Spin when the time comes. That should have no effect on the generated code AFAIK.
Yeah, there was a period after we added resource support to |
Signed-off-by: Joel Dice <[email protected]>
Signed-off-by: Joel Dice <[email protected]>
I've pushed a couple of updates; things are looking good now. |
@itowlson, this looks great! is this ready for review and a :lgtm: ? |
@fibonacci1729 I think so, now that Joel has kindly sorted out the macro side of things. It's a bit hard to assess whether there are any subtle breaking changes that the examples don't pick up though... |
I've been using wit-bindgen 0.34 in a codegen project because it supports local packages and 0.16 does not. Unfortunately this makes the codegen project unable to map WIT types to SDK types (via
with
) because the internal APIs are different between the two.This PR captures an experiment in migrating the SDK to 0.34. It mostly didn't seem to change any surfaces except:
floatXX
tofXX
. This freaked me out a bit. Those WIT files are what we use in Spin - I don't want to fork them. And Spin gets its bindgen from a recent version of wasmtime, which acceepts thefloat
syntax, so why is wit-bindgen objecting to it? Or was I misunderstanding the errors here?http_component
/redis_component
macros now give errors. It currently emitsexports { "wasi:http/incoming-handler": Spin }
(then declares aSpin
struct, but now you are meant to express the export via a separateexport!
macro I think. This should be a routine fix but it was beyond me I'm afraid - sorry.Anyway this is not a usable PR as stands but I'm sharing it so folks can see what the potential issues are.
cc @michelleN @fibonacci1729 and @dicej for giant SDK brains