Tocin defiant refactor#1
Draft
dwerner wants to merge 12 commits into
Draft
Conversation
These planning documents are no longer needed now that the refactor is complete. Part of refactor: monoio+defiant integration
tocin-defiant-build changes: - Move defiant-types from dev-dependencies to dependencies - Required for public API usage examples changes: - Switch from tokio to monoio runtime - Update dependencies for monoio compatibility tocin-health changes: - Update for defiant integration Root Cargo.toml: - Update workspace configuration Part of refactor: monoio+defiant integration
tocin-build changes: - Remove async_trait in favor of associated CallFuture<'arena> type - Change trait from Send+Sync+'static to just 'static - Add arena: &'arena defiant::Arena parameter to all service methods - Remove with_interceptor (requires Send which monoio doesn't provide) - Convert GrpcService::call to use CallFuture instead of async fn tocin runtime changes: - Change BoxError from Box<dyn Error + Send + Sync> to Box<dyn Error> - Add arena parameter to UnaryService trait - Thread arena through server::Grpc::unary() - Export h2 types from codegen for easier access - Comment out Status insertion into Extensions (requires Send+Sync) This adapts tocin for monoio's thread-per-core model which has !Send futures. Part of refactor: monoio+defiant integration
- Use input_has_arena/output_has_arena from Method struct - Conditionally add <'arena> only to messages that need it - Messages with borrowed fields get <'arena> parameter - Messages with only owned fields have no lifetime parameter This fixes type mismatches where codegen was unconditionally adding <'arena> to all message types regardless of whether they needed it. Part of refactor: monoio+defiant integration
- Add Server::bind() and serve() using monoio TcpListener - Add stub Channel and Endpoint types for client (incomplete) - Add transport Error type - Export channel module These provide basic server transport using monoio's async runtime. Client transport is stubbed but not fully implemented. Part of refactor: monoio+defiant integration
- Use monoio::RuntimeBuilder instead of tokio - Add arena parameter to say_hello implementation - Use arena.alloc_str() for response message allocation - Disable client codegen in build.rs (client not yet complete) Example now demonstrates zero-copy arena allocation pattern. Part of refactor: monoio+defiant integration
- Add build.rs for proto code generation - Update lib.rs for new generated service traits - Add generated code with arena-aware types - Add generated module exports Health service now uses defiant messages and arena allocation. Part of refactor: monoio+defiant integration
Codec changes: - Use MessageView::from_buf() instead of Decode::decode() - Returns View types directly (not Builders) - Remove unused Decode import Gitignore changes: - Add context-snapshot.yaml for session management Part of refactor: monoio+defiant integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reworking the tonic base to use defiant