-
Notifications
You must be signed in to change notification settings - Fork 3
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
Logical channels + streaming encoders #66
Open
sgwilym
wants to merge
119
commits into
main
Choose a base branch
from
logical_channels
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
…h-decoding Implement some silly optimisations
Encoding fuzz test housekeeping
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.
This PR contains several new implementations and refactorings in pursuit of the following:
There are also several new crates with applications outside of Willow.
New crates
Several new crates appeared! These will gradually be moved to their own repositories as we complete their documentation and prepare them for public release.
ufotofu_codec
A new family of traits for (streaming) encoding and decoding of values to and from bytestrings using ufotofu.
Absolute encoding traits
Traits for encoding and decoding values in isolation.
Encodable
andDecodable
convert between the domain of encodable values and the domain of finite bytestrings.DecodableCanonic
allows working with canonic subsets of an encoding relation, i.e., encodings where there is a one-to-one correspondence between values and codes.EncodableKnownSize
describes how to compute the size of encoding without actually performing the encodingEncodableSync
andDecodableSync
allow synchronous encoding/decoding.Relative Encoding traits
Corresponding traits for encoding and decoding values relative to some value we have prior knowledge of:
RelativeEncodable
andRelativeDecodable
RelativeDecodableCanonic
RelativeEncodableKnownSize
RelativeEncodableSync
andRelativeDecodableSync
There are also some nice new fuzz testing macros which can be used to property test implementations of these traits, e.g.
fuzz_absolute_all!
andfuzz_relative_all!
.ufotofu_codec_endian
Endian-aware fixed-width integer codecs for ufotofu_codec, e.g.
U8BE
,U64LE
, etc.compact_u64
Compact encoding for unsigned 64-bit integers. This builds upon our prior concept of compact widths used in many Willow encodings.
lcmux
An implementation of LCMUX, a new protocol for resource control and multiplexing based on logical channels. The specification of LCMUX can be found here: https://macromania-25vs0z0b0phr.deno.dev/specs/resource-control/index.html#sec_lcmux
wb_async_utils
A crate of handy async utilities.
Mutex
, An awaitable, single-threaded mutexOnceCell
, an optional value that can be set toSome
at most once, and which allows to.await
that time.Rw
, an awaitable, single-threaded read-write lock.TakeCell
, an async cell akin toOption
whose value can only be accessed by an asynctake
method that non-blocks while the cell is empty.MPMC
, a multi-producer multi-consumer channel with an UFOTOFU-based interface.Improvements
Path
sync_with_peer
.Deprecations