Skip to content

Expose Tailcat through a cancellable C-compatible shared library API - #130

Open
vvuk wants to merge 1 commit into
tailscale:mainfrom
vvuk:vlad/c-api
Open

vvuk wants to merge 1 commit into
tailscale:mainfrom
vvuk:vlad/c-api

Conversation

@vvuk

@vvuk vvuk commented Sep 22, 2026

Copy link
Copy Markdown

Yes, another C API; I became aware of #64 and #6 but I think there are two improvements here that aren't in either of those:

  1. Cancellation/deadline tokens. This API allows any operation to be cancelled from another thread.
  2. Per-operation error message returns; makes the API slightly more verbose, but ensures that errors can be connected to the operation that caused them.

I'm using this to implement a python wrapper for tailcat, as well as a httpx/httpcore transport (which I'm happy to put in here, but I think it's probably better served as a separate repo/library, like other language wrappers?)

Written mostly by Astra and a bit with Fable, reviewed by me.

- run: go test -count=1 -timeout 600s ./...
- run: go vet ./...
- name: build libtailcat and run its C smoke test
if: runner.os != 'Windows'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no Windows support, eh? That was the other thing tempering my enthusiasm for the other PRs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants