I find I'm trying to serve a Directory for a test I'm writing and I've never had occasion to look at doing this from the start. Is there a recommended library or example to do this? I'm writing in Rust, so I'm guessing
this VFS lib is what I want. If that is the case I'm wondering if there is a map for what I need to plug together to create a thing that actually speaks the FIDL directory protocol.
I'm sure if I rummage around I'll find examples in the codebase of doing just what I'm asking, but my impression is there has been a fair deal of flux on the "right" way of doing this and I'm not sure I'd stumble on this "right" path.
My guess is that I need to implement the
Directory trait and then hand that to
BaseConnection::new? But then I think I'd want to hand this to something which also takes the server end of a FIDL Directory channel and gives me a future that listens for requests on the channel. Does that seem about right?
Cheers,
Justin