Skip to content

v0.22.0

Compare
Choose a tag to compare
@joseluis joseluis released this 13 Jan 12:25

Added

New features & flags

  • new features for:
    • code: code, error, _unroll, _unroll_128, _unroll_256, _unroll_512, _unroll_1024, _unroll_2048.
    • data: hash.
    • doc: _docsrs[_stable]_nodep.
    • num: alg, geom, prim, cast, join, split, unit, wave, _cmp_f16, _cmp_f128, _float_f16, _float_f128.
    • media media, safe_media, audio, color, draw, font, image, midi.
    • sys: time, linux, dep_linux, unsafe_syscall.
    • text: ascii, fmt, str, _char7, _char8, _char16.
    • nightly: nightly_alloc, nightly_autodiff, nightly_bigint, nightly_float, nightly_stable_next1, nightly_stable_next2, nightly_stable_later.
    • safety: safe_audio, safe_color, safe_draw, safe_ffi, safe_font, safe_image, safe_io, safe_layout, safe_ui, safest, unsafe_async.
    • ui: ui, layout.
    • other: alloc_deps, lang, windows, __force_miri_dst.
  • new cfg flags: cargo_primary_package, , _*··.

New items

  • new structs:
    • Interval, Pnm.
    • new namespaces: Alloc, Arch, ByteSearch, Char, Env, Mem, Ptr, Str.
    • new standalone error types: FailedErrorConversion, DataNotEnough, NotImplemented, NotSupported, ElementNotFound, InvalidAxisLength, KeyAlreadyExists, MismatchedCapacity, MismatchedDimensions, MismatchedIndices, NodeEmpty, NodeLinkNotSet, NodeLinkNotUnique, NotEnoughElements, NotEnoughSpace, IndexOutOfBounds, DataOverflow, PartiallyAdded, InvalidChar, InvalidUtf8, SystemTimeError.
    • new composite error types: NotAvailable, DataNotEnough, MismatchedBounds, PartialSpace.
    • False, True, UnitBi, UnitSi.
    • HasherPengy.
    • Lgc16.
    • TimeSplit.
    • TypeResource.
    • WaveletHaar, WaveletUnitVec.
  • new aliases:
    • AllocMapFx, AllocSetFx, FmtResult, NoTime.
    • MediaResult, AudioResult, ColorResult, DrawResult,FontResult, ImageResult.
    • UiResult, LayoutResult.
    • re-exported primitives: char.
    • TimeSplitYearNano, TimeSplitYearDay, TimeSplitYearSec, TimeSplitHourSec, TimeSplitHourNano, TimeSplitMilliNano.
  • new enums:
    • CompressionMode, EncodingMode, WaveletUnitRole.
    • AllError, AllErrorKind, MediaError, ColorError, AudioError, DrawError, FontError, ImageError, UiError, LayoutError.
  • new enum variants:
    • DataError::ElementNotFound.
  • new traits:
    • ColorBase, ExtCellOption, ExtError, ExtOptRes, ExtPath, ExtThread, MemPod, TypeResourced, Unit.
    • WaveletCompressionVec, WaveletTransformVec.
  • new associated methods and constants for:
    • Array: from_fn, contains_[from|to|between], as_bare_mut_slice, get[_mut].
    • Array, when storing Option<T>.
    • Array2d: cap_col, cap_row, cap_major, cap_minor, num_major, num_minor.
    • BareBox.
    • ExtAny method type_id.
    • Float and ExtFloat:
      • FRAC_1_SQRT_2PI.
      • eval_poly to evaluate polynomials.
      • for calculus: derivative, integrate, partial_derivative_[x|y].
    • Float and ExtFloatConst consts: LOW_MARGIN, MEDIUM_MARGIN, HIGH_MARGIN.
    • Graph methods: edge_exists_unchecked, edge_remove.
    • NonValue*: is_max, is_min, [checked|strict|saturating|wrapping]_[add|sub].
    • Slice: eq, from_mut, from_ref, from_raw_parts, from_raw_parts_mut, range[_mut][_checked], range_from[_mut][_checked], range_to[_mut][_checked], take_first[_mut][_checked], take_last[_mut][_checked], take_omit_last[_mut][_checked].
    • UnicodeScalar & char* types: MIN.
  • new macros:
    • capture_first!, capture_last!, capture_tail_tuple!, const_bool!, field_of!, id_seq!, impl_non_value!, impl_trait!, include_from!, mod_from!, str!, type_marker!, type_resource!, unroll.
    • private: doc_availability!, impl_error, EMOJI_*, TAG_*.
  • new vendored items
    • structs: CacheAlign, ConstList, FatPtr, IdPinBox, IdPin, VecChunk.
    • macros: cfg_if!, const_assert!.
    • traits: ConstBool.
  • new optional dependencies:
    • allocator-api2, bumpalo, crossterm, jiff, js-sys, kira, midir, nc, pyo3, rayon, regex-lite, rkyv, rodio, rustix, safe_arch, serde, stringzilla, symphonia, sysinfo, tinyaudio, tokio, tracing, wasm-bindgen, web-sys, winnow.
  • new re-exported:
    • items from: alloc::alloc,core::{cell, num, ops, result}, std::{backtrace, fmt, path}.
    • fns: array_from_fn, array_from_mut, array_from_ref.
    • macros:
      • assert_unchecked!, autodiff, compile_error!, concat, enumint!, format!, format_args!, option_env!, stringify, thread_local!, write!, writeln!.
      • wrapped: env!, as env_!, vec! as vec_!.
    • structs:
      • NonZero, Saturating, Wrapping, OsStr, OsString.
      • HashMapEntry and BTreeMapEntry.
      • HashMap and BTreeMap from std if hashbrown is disabled.
      • FromStr, IterChars.
    • crate items from multiple related modules, like errors and strings.
  • new modules: num::alg, sys::sound, media::{audio, color, draw, font, image, layout}, phys, ui.
  • new sys::os::linux module and example linux.
  • new NonValue* constants MAX, MIN.
  • new lints.

Examples, utilities, manifest, files

  • new examples:
    • id_pin.
    • id_seq and type ExampleIdSeqUsize.
    • enumint and type ExampleEnumIntU8.
  • manifest:
    • add patches section.
    • add table of contents.
    • add profiles: dev-lto, release-lto.
  • new .clippy.toml configuration file.
  • new github workflows: get_errno.yml, get_syscall.yml.
  • new scripts in utils/: cargo-native, manifest.sh, release_dates.rs, get_errno.sh, get_syscall.sh, docs_coverage.sh, docs_items.rs.
  • new convenience fn: manifest_dir in build::utils.
  • hide no_inline items re-exports.
  • new file DOCS/VENDORED_rustdoc.md
  • show docs for the build scripts (private).
  • add system of internal structural modules.
  • rustdoc html header:
    • load katexextensions mchem and copy-tex.
    • trust \href commands.
    • move to config/.
  • new directory config/.
    • put here a copy of Cargo.toml::dep_all.

Removed

  • remove custom no_std Error definition.
  • remove items: NeverOk, NeverErr, HasherFx32, HasherFx64.
  • remove types: char24, char32, InRange*, NonRange*, HourMilliSplit, SecNanoSplit, YearSecSplit.
  • remove aliases of text-related types.
  • remove features: _default, _max, _non_value_*, _in_range, num_geom, unsafe_const.
  • remove standalone char_* fns (namespaced in Char).
  • remove standalone fn hash_pengy (made part of HasherPengy).
  • remove most re-exported fns from std::mem (namespaced in Mem).
  • remove re-exported fns from std::ptr (namespaced in Ptr).
  • remove convenience fn: out_dir from the build script.
  • disable Graph*, Node*, and NodeIndex* types.
  • remove Float::const_abs.

Changed

Misc.

  • bump rust version to 1.83.0.
  • start using core::error::Error.

Features & flags

  • rename features:
    • unsafe_dyn to unsafe_layout.
    • nightly_stabilized to nightly_stable.
    • _[max|min]_docs to _docs_[max|min], _docsrs_max to _docsrs.
    • dep_linux to linux_deps, dep_text to text_deps, dep_work to work_deps.
  • rename compilation flags:
    • _some_* to _*··.
    • _int_i_· to _int_i··, _int_u_· to _int_u··, _string_u_· to _string_u··.
  • modify how features _non_value_u8, _non_value_u16 are enabled for Char* types.
  • feature gate methods returning DataResult in: Array, Array2d, ArrayUninit, Bitwise, BitOps.
  • show build env variables if __dbg feature is enabled.

Items

  • structs:
    • make data::dst types use MemPod instead of bytemuck::Pod.
    • rename:
      • Also to Tap, Apply to Chain.
      • COLOR to Color.
      • Color to ColorBase.
      • GcdExt to GcdResult.
      • AllocMap to HashMap, AllocSet to HashSet.
      • AllocOrdMap to BTreeMap, AllocOrdSet to BTreeSet.
      • AllocPrioQueue to BinaryHeap.
      • AllocLinkedList to LinkedList.
      • Dst* types const-generic N to CAP.
      • sys::io items by prefixing them with Io.
      • Egc to Grapheme, EgcString to GraphemeString.
      • EgcNonul to GraphemeNonul, EgcU8 to GraphemeU8.
      • UninitArray to ArrayUninit.
  • Compare
    • make Compare<usize> always compiled.
    • implement for f16 and 128.
  • functions and constant:
    • Graph::edge_exists no loger panics.
    • rename:
      • Array::len to capacity.
      • mem_* prefixed fns as Mem methods.
      • ptr_* prefixed fns as Ptr methods.
    • make const most of the Angle methods.
    • make const all the Float methods that were previously feature-gated, and add:
      eval_poly, factorial, mul_add_fallback, scale, lerp, ln*_series, log[10|2]_series.
    • make const versions of the following Float methods:
      clamp_nan, fisr, hypot_fisr, max_nan, min_nan, cbrt_nr, sqrt_nr, hypot_nr, rem_euclid, *_series, *_series_terms*.
    • add additional const methods: const_floor, const_ceil, const_round, const_round_ties_away, const_round_ties_even, const_round_ties_odd, const_trunc, const_fract, const_split, const_signum, const_copysign, const_clamp, const_min, const_max, const_powi.
    • improve precision of ExtFloatConst constants from 35 to 80 decimals.
    • remove all inline attributes for most functions
  • macros:
    • update cdbg! to support a single @.
    • update reexport! to support receiving an optional tag argument.
    • rename mem_size_of_expr! to size_of_expr!.
    • rename re-wrapped macros to avoid prelude collision when glob importing:
      • envenv_, panicpanic_, vecvec_.
  • modules:
    • make modules public: data::serde, sys::arch, text::fmt.
    • rename:
      • num::geom::algebra to num::algebra::linear.
      • exec to work, and related features.
      • mem to sys::mem.
      • sys::ffi to `ffi.
      • time to phys::time.
      • _alloc & _std inside _dep.
      • _dep::_core to _core.
      • _deps to _dep.
      • _lib* by removing the lib prefix.
  • traits:
    • impl Num for niche types.
  • dependencies:
    • make bytemuck an optional dependency.

Examples, utilities, manifest, files

  • rename DOCS/DERIVED.md to VENDORED.md.
  • rename the tools directory to utils.
  • simplify aliases for cargo-asm.
  • refactor the build script.

Fixed

  • reduce noise from required features on methods from Divisor, Int, Float, Frac.
  • make utils/check.rs not compile with all_dep when cross-compiling certain arches.
  • hide public macros from the crate root when cfg(cargo_primary_package).
  • fix build script utility call paths, add missing _tuple* features.
  • fix bitfield and enumset being able to be called from the root.
  • several fixes for linux syscalls on multiple architectures.
  • simplify system of documentable & testable examples.
  • fix reexported fns: fmt_format, fmt_write.
  • fix f64::NR_TOLERANCE from 1e-14 to 1e-12.
  • fix a few tests and examples.
  • fix RcWeak re-export.
  • fix HashSetFx alias.

Full Changelog: v0.21.2...v0.22.0