Skip to content

remove direct dependency on tokio #145

Merged
benbrandt merged 5 commits intoagentclientprotocol:mainfrom
nikomatsakis:rm-tokio
Apr 29, 2026
Merged

remove direct dependency on tokio #145
benbrandt merged 5 commits intoagentclientprotocol:mainfrom
nikomatsakis:rm-tokio

Conversation

@nikomatsakis
Copy link
Copy Markdown
Contributor

This PR removes the agent-client-protocol-tokio directory. It merges that functionality into the main agent-client-protocol crate, using smol instead of tokio for the runtime needs (e.g., communicating with stdin, talking to a process).

I believe the smol crate is more composable.

There is still a dependency on tokio via rmcp. Removing that is possible but more effect so I opted not to do it for now.

cc @benbrandt, what do you think

Replace direct tokio usage with smol-ecosystem crates:
- Stdio: use blocking::Unblock instead of tokio::io::stdin/stdout
- AcpAgent: use async-process instead of tokio::process
- session.rs: use futures::channel::oneshot instead of tokio::sync::oneshot
- Use futures::future::select instead of tokio::select!

tokio/tokio-util remain as deps only for mcp_server/builder.rs where
rmcp requires tokio AsyncRead/AsyncWrite types (rmcp pulls in tokio
transitively regardless).

Remove agent-client-protocol-tokio from workspace and update all
consumers to import from agent-client-protocol directly.
Copy link
Copy Markdown
Member

@benbrandt benbrandt left a comment

Choose a reason for hiding this comment

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

Thanks! 🎉

@benbrandt benbrandt enabled auto-merge (squash) April 29, 2026 07:14
@benbrandt benbrandt disabled auto-merge April 29, 2026 07:14
@benbrandt benbrandt enabled auto-merge (squash) April 29, 2026 07:15
@benbrandt benbrandt merged commit f0705a9 into agentclientprotocol:main Apr 29, 2026
2 checks passed
@acp-release-bot acp-release-bot Bot mentioned this pull request May 1, 2026
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