Skip to content

new ASIO host implementation - #1331

Open
LastExceed wants to merge 27 commits into
RustAudio:masterfrom
LastExceed:azo
Open

LastExceed wants to merge 27 commits into
RustAudio:masterfrom
LastExceed:azo

Conversation

@LastExceed

@LastExceed LastExceed commented Aug 19, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1299
Obsoletes #1083

@edwloef

This comment was marked as outdated.

@LastExceed
LastExceed force-pushed the azo branch 2 times, most recently from 9c95154 to b6cc570 Compare August 20, 2026 06:24
@LastExceed
LastExceed changed the base branch from develop to master August 20, 2026 06:25
@LastExceed

This comment was marked as resolved.

@edwloef

edwloef commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

except for maybe oneshot

and closure-ffi. That one in particular is absolutely indispensable.

Ah right, I had missed the cfg(windows) dependencies section. oneshot and tap should probable be moved down there as well, if I'm not mistaken?

@LastExceed

This comment was marked as resolved.

@LastExceed

Copy link
Copy Markdown
Collaborator Author

I moved them to the platform dependencies for now to be consistent with what we currently have, but it might be worth revisiting this in the future as it could get rid of some duplicates. E.g. jack and audio_thread_priority are both specified for windows and linux with the same version, despite being optional in both cases

@LastExceed

This comment was marked as resolved.

@LastExceed
LastExceed force-pushed the azo branch 5 times, most recently from 774c869 to 15346d6 Compare August 26, 2026 14:11
@LastExceed

This comment was marked as outdated.

@Marco-Farruggio

This comment was marked as resolved.

@Marco-Farruggio

Copy link
Copy Markdown
Collaborator

I agree that there are definitely some places where rustfmt is in my opinion making code less readable, keeping a codebase (like cpal) legible and clear is important, but I think just being logical can exceed rustfmt in terms of neatness

@LastExceed

This comment was marked as resolved.

@LastExceed

This comment was marked as outdated.

@LastExceed
LastExceed force-pushed the azo branch 4 times, most recently from 6c43e14 to 39c88b2 Compare September 6, 2026 12:10
@LastExceed

This comment was marked as outdated.

@Marco-Farruggio

Copy link
Copy Markdown
Collaborator

@roderickvd any final thoughts on this? @LastExceed thinks it's ready to merged, and it's something I'd personally like to see :)

Comment thread src/host/asio_new.rs
}

fn id(&self) -> CpalResult<DeviceId> {
self.0.id().pipe(Ok)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I feel that in situations like this .pipe() is unneeded, and loses its value, which is helping long, divergent/chaining bits of code (where it can be extremely usefull). Here it just feels a bit unidiomatic imo

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'm fine with changing it, but:

The idea is to align the the reading order with the logical order of operations (and avoid nesting). Wrapping the value in Ok() is the last operation this expression performs, so I like it being the last lexical token too (for the same reason I also wish Rust had postfix return syntax, but I digress). The conventional style would be Ok(self.0.id()), which makes Ok the first thing instead, which means you'll have to keep it in the back of your head while comprehending the inner expression. In this particular case its quite trivial since the expression is quite simple, but when the inner expression is complex, this can be a mental overhead. The question is, where do we draw the line? How big does the inner expression have to be for the linearity of .pipe() to outweigh the familiarity and brevity of the conventional approach? (I don't have an answer to this)

Anyway, let me know which other occurrences you'd like to have changed (or just commit the changes directly, thats fine too).

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A new ASIO backend implementation

4 participants