-
Notifications
You must be signed in to change notification settings - Fork 27
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
Breaking change wish list #72
Labels
Comments
ia0
added a commit
that referenced
this issue
Apr 28, 2024
This new module addresses the following breaking changes of #72: - `static` instead of `const` for pre-defined encodings - Private `Encoding` implementation with `unsafe` constructor - Use `MaybeUninit` internally and expose `_uninit` functions - Use static dispatch instead of dynamic dispatch (fixing #97)
ia0
added a commit
that referenced
this issue
Apr 29, 2024
This new module addresses the following breaking changes of #72: - `static` instead of `const` for pre-defined encodings - Private `Encoding` implementation with `unsafe` constructor - Use `MaybeUninit` internally and expose `_uninit` functions - Use static dispatch instead of dynamic dispatch (fixing #97)
ia0
added a commit
that referenced
this issue
May 1, 2024
This new module addresses the following breaking changes of #72: - `static` instead of `const` for pre-defined encodings - Private `Encoding` implementation with `unsafe` constructor - Use `MaybeUninit` internally and expose `_uninit` functions - Use static dispatch instead of dynamic dispatch (fixing #97)
ia0
added a commit
that referenced
this issue
May 5, 2024
This new module addresses the following breaking changes of #72: - `static` instead of `const` for pre-defined encodings - Private `Encoding` implementation with `unsafe` constructor - Use `MaybeUninit` internally and expose `_uninit` functions - Use static dispatch instead of dynamic dispatch (fixing #97)
ia0
added a commit
that referenced
this issue
May 5, 2024
This new module addresses the following breaking changes of #72: - `static` instead of `const` for pre-defined encodings - Private `Encoding` implementation with `unsafe` constructor - Use `MaybeUninit` internally and expose `_uninit` functions - Use static dispatch instead of dynamic dispatch (fixing #97)
ia0
added a commit
that referenced
this issue
May 5, 2024
This new module addresses the following breaking changes of #72: - `static` instead of `const` for pre-defined encodings - Private `Encoding` implementation with `unsafe` constructor - Use `MaybeUninit` internally and expose `_uninit` functions - Use static dispatch instead of dynamic dispatch (fixing #97)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue lists breaking changes that could be worth doing. Since they would bump the major version, doing as much of them simultaneously would be best.
static
instead ofconst
Using
const
prevents users to take long-term references, which is needed forEncoder
. The constants should instead be statics.const fn
This crate is mostly made of pure terminating functions (e.g.
encode_len()
,encode_mut()
,decode_len()
, anddecode_mut()
). Those functions should beconst fn
. This would replace thedata-encoding-macro
library which is currently working around theconst fn
limitations of Rust.This is blocked by
const fn
support in Rust: meta tracking issue.Private
Encoding
implementationIt should now be possible to make the
Encoding
implementation private and provide anunsafe const fn
fordata-encoding-macro
to use.MaybeUninit
Most output parameters are not read from but currently use
&mut [u8]
which requires them to be initialized. Those functions could instead take&mut [MaybeUninit<u8>]
.This is mostly blocked by
maybe_uninit_slice
.MSRV
Even if not necessary, bumping to the latest stable might give access to features that may be useful for future minor or patch versions. This is strictly speaking not a breaking change to bump MSRV (discussion), but it's nice to do it during a major bump. By discussion in #77 it would be nice to have the MSRV at rustc in Debian oldstable. This should cover most common distributions. Note also the trick to use
syn = ">= 2, < 4"
when multiple major versions are supported for a dependency.Expose the polymorphic implementation
Currently only the type-erased API with internal dispatch is exposed. This may prevent dead-code elimination to trigger if encodings are not statically known, resulting in bigger binary size. As an alternative, the internal polymorphic API could be exposed.
This might be blocked by good const generics support in Rust.
The text was updated successfully, but these errors were encountered: