PSA: Slight change to FIDL C++ wire bindings

8 views
Skip to first unread message

Ian McKellar

unread,
Sep 1, 2022, 1:36:44 PM9/1/22
to fidl-dev
If you don't use the FIDL C++ wire bindings (FKA llcpp) you can hit delete right now.

We're working on getting the new C++ bindings into the SDK. It's almost there but we're finishing polishing up a few last things.

This week I landed two changes. One is that instead of having a type fidl::WireRequest<Protocol::Method> to represent the top-level object in FIDL request messages we just use the underlying type directly. This should be basically invisible but it removes some indirection and should make it a lot simpler to work out what's actually going on. You can still use fidl::WireRequest<Protocol::Method> to refer to the request object for a given method but this is now just an alias for the actual type not a wrapper.

The other actually changes the API. Previously if you had a method that had no request arguments (eg: GetCount() -> (uint32 count)) when implementing a wire server you'd have an argument representing the request that would contain nothing:
  void GetCount(GetCountRequestView request, GetCountCompleter& completer) { ... }
We dropped that argument because it served no purpose, carried no information and was just extra noise:
  void GetCount(GetCountCompleter& completer) { ... }
All in-tree uses have been updated.

There will be a few more of these kinds of changes coming over the next few weeks.

Ian
Reply all
Reply to author
Forward
0 new messages