Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stream support #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

kruss
Copy link
Collaborator

@kruss kruss commented Feb 13, 2025

This PR implements #34 as a new feature 'stream', cleans up the already existing feature names to be more consistent in naming and increases the crate version to '0.20.0'.

@kruss kruss force-pushed the add_stream_support branch from b98ffb7 to e45f2dd Compare February 13, 2025 08:33
@kruss kruss requested a review from marcmo February 13, 2025 08:37
@kruss kruss force-pushed the add_stream_support branch 2 times, most recently from ddce203 to 46f3258 Compare February 13, 2025 09:01
@kruss kruss force-pushed the add_stream_support branch from 46f3258 to 6367c20 Compare February 13, 2025 09:13
let (_, header) = dlt_standard_header(&header_buf[storage_len..])?;

let message_len = storage_len + header.overall_length() as usize;
let mut message_buf = vec![0u8; message_len];
Copy link
Member

Choose a reason for hiding this comment

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

better if we reuse the memory instead of allocating new memory on each call

Comment on lines +25 to +27
tokio = { version = "1", features = ["full"], optional = true }
tokio-stream = { version = "0.1", optional = true }
tokio-util = { version = "0.7", optional = true }
Copy link
Member

Choose a reason for hiding this comment

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

not needed. only tokio is currently neede for your tests

Copy link
Member

@marcmo marcmo left a comment

Choose a reason for hiding this comment

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

looks quite good!
let's investigate if we can add support for
https://rust-lang.github.io/async-book/05_streams/01_chapter.html
by implementing it ourselves.

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