PackageTrack
Sign in Get early access

objc2-encode

Objective-C type-encoding representation and parsing

4.1.0 84M downloads/mo #896 most downloaded on crates.io madsmtm/objc2

What this package is like to depend on

Last release 2 years ago

no release in 18 months

Ships fairly regularly

a new release about every 4 months

Nearly every release is documented

notes for 7 of 7 stable releases

1 version withdrawn

withdrawn after publishing

5 years old

18 releases · first in 2021

0 releases in the last 12 months

see the full history below

Release timeline

18 releases · Nov 2021 to Jan 2025
2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 18
  1. 4.1.0 22 Jan 2025
    Release notes

    Added

    • Added Encoding::size, which computes the size of the encoded type for the current target.

    Changed

    • Equivalence comparisons now consider Encoding::Class, Encoding::Object and Encoding::Block as equivalent.
    Open source →
  2. 4.0.3 21 May 2024
    Release notes

    Fixed

    • Fixed an issue with publishing using an older version of Cargo that didn't handle the lints.workspace = true Cargo setup properly.
    Open source →
  3. 4.0.2 21 May 2024 withdrawn
    Release notes

    Added

    • Added Encoding::None, which represents encodings where the host compiler (i.e. clang) couldn't generate an encoding for a given type.

      This is useful when working with SIMD types.

    Open source →
  4. 4.0.1 17 Apr 2024
    Release notes

    Changed

    • Build documentation on docs.rs on more Apple platforms.
    Open source →
  5. 4.0.0 03 Dec 2023
    Release notes

    Changed

    • BREAKING: Changed the type of EncodingBox::Struct and EncodingBox::Union to no longer contain an Option.

    Fixed

    • Fixed encoding equivalence between empty structs and unions.
    • Parse (and ignore) extended type information.
    Open source →
  6. 3.0.0 31 Jul 2023
    Release notes

    Fixed

    • Bumped version number to ensure that this crate can be compiled together with code that depends on pre-releases of 2.0.0.
    Open source →
  7. 2.0.0 20 Jun 2023
    Release notes

    Added

    • Improved documentation slightly.
    Open source →
  8. 2.0.0-pre.4 07 Feb 2023 pre-release
    Release notes

    Added

    • Made the crate no_std compatible.
    • Made the crate platform-agnostic.

    Changed

    • BREAKING: Moved the Encode, RefEncode, EncodeArguments, EncodeConvert, OptionEncode to objc2.
    • BREAKING: Encoding::BitField now allows omitting the type using an Option.
    • BREAKING: Changed length field in Encoding::Array from usize to u64 (to be platform-agnostic).

    Fixed

    • Fixed Encoding::BitField encoding parsing.
    Open source →
  9. 2.0.0-pre.3 24 Dec 2022 pre-release
    Release notes

    Added

    • Added EncodingBox for dynamically parsing encodings and creating them on the heap.
    • Added ParseError, a custom type that represents errors during encoding parsing.
    • Added Encoding::equivalent_to_box for comparing Encoding and EncodingBox.
    • Implemented Encode and RefEncode for NonNull<c_void>.
    • Added OptionEncode to help with implementing Encode and RefEncode for Option.

    Changed

    • BREAKING: Verify that the name in Encoding::Struct and Encoding::Union is a valid C identifier.

    Removed

    • BREAKING: Encoding no longer implements Copy, though it is still Clone.
    • BREAKING: Removed Encoding::equivalent_to_start_of_str, since it wasn't really useful.
    Open source →
  10. 2.0.0-pre.2 28 Aug 2022 pre-release
    Release notes

    Added

    • Added EncodeConvert trait to help with correctly handling BOOL/bool.

    Changed

    • BREAKING: Remove the lifetime specifier from Encoding, since the non -'static version was essentially useless.

    Fixed

    • Fixed the encoding output and comparison of structs behind pointers.

    Removed

    • BREAKING: bool (and AtomicBool) no longer implements Encode, since that was difficult to use correctly. See the EncodeConvert trait, or use objc2::runtime::Bool instead.
    Open source →
  11. 2.0.0-pre.1 19 Jul 2022 pre-release
    Release notes

    Added

    • Added Encoding::Atomic.
    • Implement Encode and RefEncode for std::sync::atomic types.

    Changed

    • BREAKING: Renamed Encoding::C_U_LONG to Encoding::C_ULONG.
    Open source →
  12. 2.0.0-pre.0 13 Jun 2022 pre-release
    Release notes

    Added

    • Added Encoding::C_LONG and Encoding::C_U_LONG to help with platform compatibility; use these instead of c_long::ENCODING and c_ulong::ENCODING.
    • Implement Encode and RefEncode for MaybeUninit<T>, where T is properly bound.

    Changed

    • BREAKING: Sealed the EncodeArguments trait.
    • BREAKING: Add type argument to Encoding::BitField.

    Removed

    • BREAKING: Removed PartialEq impl between str and Encoding since it was incorrect (it violated the trait requirements).
    • BREAKING: Removed Encode and RefEncode implementations for Pin since it may not be sound.
    Open source →
  13. 2.0.0-beta.2 03 Jan 2022 pre-release
    Release notes

    Added

    • Implement Hash for Encoding.

    Changed

    • Improved documentation.
    Open source →
  14. 2.0.0-beta.1 22 Dec 2021 pre-release
    Release notes

    Added

    • Encoding::equivalent_to, Encoding::equivalent_to_str and Encoding::equivalent_to_start_of_str methods for more precise comparison semantics.
    • Added Encode and RefEncode implementations for Option function pointers.

    Changed

    • Discourage comparing str with Encoding using PartialEq. This trait impl might get removed in a future version.
    Open source →
  15. 2.0.0-beta.0 22 Nov 2021 pre-release
    Release notes

    Added

    • BREAKING: Add Encoding::LongDouble, Encoding::FloatComplex, Encoding::DoubleComplex and Encoding::LongDoubleComplex.
    • Implement RefEncode for all number types that implement Encode (bool, i8, usize, f32, NonZeroU32, and so on).
    • Implement RefEncode for *const c_void and *mut c_void (allowing void** in C).
    • Implement Encode and RefEncode for Wrapping<T>, where T is properly bound.

    Changed

    • BREAKING: Make Encoding #[non_exhaustive]. This will help us in evolving the API while minimizing further breaking changes.
    • Discourage using bool::ENCODING; use objc2::Bool::ENCODING instead.
    • Discourage using ()::ENCODING for anything other than as a function return type.
    Open source →
  16. 2.0.0-alpha.1 22 Nov 2021 pre-release
    Release notes

    Added

    • Improved documentation.
    • Add RefEncode trait, which represents types whose pointers has an encoding. This means you now only have to implement RefEncode, and not both &Encode and &mut Encode. Additionally, encodings of pointers to pointers (to pointers, and so on) are now supported.
    • Implement Encode for NonZeroX and Option<NonZeroX> integer types.
    • Implement RefEncode for arrays.
    • Implement Encode and RefEncode for (where T is properly bound):
      • ManuallyDrop<T>
      • Pin<T>
      • NonNull<T>
      • Option<NonNull<T>>
    • Add EncodeArguments trait, to represent an ordered group of functions arguments, where each argument has an Objective-C type-encoding. Previously in the objc crate.
    • Implement Encode and RefEncode for some extern "C" fn pointers.

    Removed

    • BREAKING: Removed automatic *const T: Encode and *mut T: Encode impls when when &T: Encode and &mut T: Encode was implemented.

      Implement T: RefEncode instead!

    Open source →
  17. 2.0.0-alpha.0 22 Nov 2021 pre-release
    Release notes

    Added

    • Improved documentation.
    • Support for targets with pointer-width 16
    • Implement Encode for all array lengths using const-generics.
    • Implement Encode for unsized pointer types as well.

    Changed

    • BREAKING: Forked the project, so it is now available under the name objc2-encode.
    • BREAKING: Changed type in Encoding::BitField from u32 to u8.
    • BREAKING: Changed type in Encoding::Array from u32 to usize.
    • BREAKING: Loosen 'static bounds on references implementing Encode.
    Open source →
  18. 1.1.0 19 Nov 2021
    Release notes

    Added

    • Implement Encode for arrays with up to 32 elements.

    Changed

    • Simplify internal encoding comparison.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive