Skip to content

Using capnproto with fd's as capabilities #204

Open
@gilhooleyd

Description

@gilhooleyd

Hello!

I'm just starting to use capnproto for a hobby project and I really like it so far. I have some questions about things that aren't documented as much.

Background:
I'm interested in writing a more capability-based OS, and CapProto seems like a great candidate for the IPC.
I want to get the groundwork down in Unix though, and so I'm currently using UnixDomain sockets as a way to have bi-directional sockets that can pass both data and capabilities (unix fd's).

Question:

Is it possible to specify a "capability" like a unix Fd in the capnproto schema?
How then does the generated code pass these Fd's?
It looks like I can pass my own implementations for InputStream, OutputStream to twoparty::Vatnework, but the Fd's need to be treated separately from the other data.
Should I be looking lower in the code than twoparty? I tried looking at ClientHook and the underlying capproto::Capabilities, but it didn't seem obvious where this could be implemented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions