Skip to content

v0.23.0

Latest
Compare
Choose a tag to compare
@joseluis joseluis released this 02 Apr 10:59

Added

  • new features:
    • lang: glsl, js.
    • num: linear, metric, shape.
    • ui: desk, term, web.
    • capability: _maxest, _value_all, _value[8|16|32|64|128|256|512|1024].
    • safety: unsafe_ffi.
  • new flags: ffi··, geom··.
  • new traits:
    • data:
      • codec: Decodable, Encodable, EncodabeLen.
      • table: DataValue[Copy], DataType[Copy], DataRaw[Copy].
    • num: NumConst.
    • sys: AppEnv, ExtLog.
    • ui: MiniquadEventHandlerExt, UiService.
    • work: ExtProcess.
  • new consts:
    • media::font: FONT_3_3, FONT_3_5, FONT_5_6.
    • sys::os::linux (namespaced): LiNUX_EXIT, LINUX_O_FLAGS, LINUX_S_IFMT, LINUX_SEEK, LINUX_F_CMD.
    • Float|FloatConst: EXPONENT_BIAS, EXPONENT_BITS, SIGNIFICANT_BITS.
    • AngleDirection::{CounterClockwise, CCW, RightHandRule, RHR, Clockwise, CW, LeftHandRule, LHR}.
  • new types:
    • code: Enum, ScopeGuard, TimeError, Timeout.
    • data: ArrayFrom, NoData.
      • codec: CodecBe, CodecLe, CodecIf, CodecJoin, CodecFlags, CodecLen, CodecLenValue.
        • radix Base, Crockford, Rfc4648, Rfc4648Hex.
      • key: StaticMapEntry.
      • table: DataValue*, DataType*, DataRaw*.
    • lang: g_*, js_*, JsEventKind, JsEventMouse, JsEventPointer, JsInstant, JsKeyLocation, JsPermission, JsPermissionState, JsTextMetrics, JsTextMetricsFull, JsTimeout, JsWorker, JsWorkerError, JsWorkerJob.
    • media: BitmapFont, Sixel, Dither, PixelFormat, SixelError, SixelMean, SixelQuality, SixelSplit.
    • num:
      • geom:
        • linear: Matrix.
        • metric: Distance, Orientation, Position, Region, Stride, RegionStrided.
      • quant: Cycle, CycleCount, Ratio.
    • phys: TimeDelta, TimeGranularity, TimeSource, TimeSourceFake.
    • sys:
      • env::app: AppApple, AppConfig, AppWindows, AppUnix, AppXdg,
      • io: IoEmpty, IoRepeat.
      • log: LogConfig.
      • mem: Current, CurrentGuard, SpinLock, SpinLockGuard.
      • os::linux: LinuxError, LinuxResult, LinuxSiginfo, LinuxStat.
    • ui: UiCap, UiCapImage, UiCapInput, UiCapSound, UiCapSystem, UiCapWindow.
      • event: EventButton, EventButtonState, EventMouse, EventPointer, EventPointerType, EventTimestamp, EventKey,
        • key: KeyAlpha, KeyMedia, KeyMod, KeyMods, KeyPad, KeyState.
      • back: CrosstermService, MiniquadPixels, MiniquadService.
      • front::term: TermSize.
    • namespaces: Ansi, Fmt, Fs, FsPath, Io, Iter, Js, Linux, Log, Panic.
  • new macros:
    • define_static_map!, is, methods_as_fns!.
    • join!, js_reexport, maybe!, miniquad!, xorshift_custom!.
    • ansi!, os_print, os_println, os_eprint, os_eprintln.
    • linux_entry, set_panic_handler!.
  • new modules:
    • data: {codec::{self, crypto, radix}, list, key, table, uid}.
    • lang: {dsl, ffi::{self, c, glsl}, i18n, ling::{art, nat}}.
    • media: {image::sixel, video}.
    • num: {geom::metric, ord, quant}.
    • phys: {bio, chem, elec, mech, unit}.
    • sys: {log, net, fs}.
    • ui: {back::{self, crossterm, miniquad}, front}.
    • work: sync::mpsc.
  • new macro arms:
    • format_buf!: ?.
    • str!: ip_addr.
    • unwrap!: ok_err, *_guaranteed_or_ub.
  • new methods:
    • Char: len_utf8, code_len_utf8[_unchecked],code_to_utf8_bytes[_unchecked], [code_]to_ascii_str[_unchecked], is_valid, to_ascii_fold[_unchecked], utf8_bytes_to_code[_unchecked], utf8_len[_checked].
    • Env::*.
    • ExtAny: type_hash, type_hash_with.
    • ExtFloat: sqrt_nr.
    • ExtFuture: pending, poll_fn, ready.
    • ExtThread: sleep_ms, sleep_us, sleep_ns.
    • Float: midpoint, recip, sqrt_hybrid, to_degrees, to_radians.
    • HasherFx: hash_bytes_with_seed.
    • IoError: other.
    • Linux syscalls: sys_[open|close|lseek|dup|dup2|fcntl|stat|fstat|getdents|pipe|pipe2].
    • Slice: copy_from_slice, <u8>::copy_array, <u8>::copy_array_at, <u8>::copied_array_at, <u8>::to_array.
    • Str: __utf8_bytes_to_str.
    • prngs: from_state, inner_state.
  • new variants:
    • IoErrorKind: OutOfMemory, FilesystemLoop, FilesystemQuotaExceeded, CrossesDevices, InvalidFilename, InProgress.
  • new re-exports:
    • core: any::type_name as any_type_name,
    • lang: c_void.
    • std:
      • alloc::System as SystemAlloc.
      • env: *.
      • io: IoEmpty, IoIntoInnerError, IoRepeat, Std[err|in|out][Lock].
      • panic: PanicHookInfo.
      • process: *.
      • sync: LazyLock, mpsc::*.
    • log: *.
  • new optional dependencies: ffmpeg-the-third, fltk, flume, fontdue, gilrs, image, itertools, orion, ring, sdl2, sdl3, simdutf8, toml_edit, ureq.
  • new profile: wasm.
  • new example: js_web_api.
  • add musl architectures to check.rs script.
  • add docs for monitored nightly features and for disabled dependencies.
  • add more doc tags: TAG_[FAKE|FFI|FMT|GEOM|NO|NUM|QUANT|RAND|TEXT|TIME].
  • add more compile targets for docs.rs.

Removed

  • remove standalone re-exported fns from std::{fmt, iter}.
  • remove items:
    • sys::os::linux: LinuxTerminal, LinuxTerminalSize.
  • remove standalone fns:
    • io: io_*.
    • panic: panic_*.
    • sys::os::linux: linux_*.
    • text: crate_root, crate_root_string.
    • work: future_block, future_pending, future_ready.
  • remove methods:
    • Float: const_round_ties_odd.
  • remove private variant IoErrorKind::Uncategorized.
  • remove features: linux_deps, unsafe_async.
  • remove modules:
    • data::collections.
    • num::alg.
  • disable optional dependencies: fltk, js-sys, nc, ring, rustix, rkyv, tinyaudio, tracing, wasm-bindgen, web-sys.
  • deprecate:
    • iif!.
    • Char::len_to_utf8.
    • Float::{const_[clamp|max|min|signum|copysign]}.

Changed

  • bump MSRV to 1.85.0.
  • rename features:
    • _docs_max to _max, _docs_min to _docs, _string_* to _str_*.
  • change features into cfg flags:
    • nightly, [nightly_[allocator|autodiff|bigint|coro|doc|float|simd|stable|stable_[next1|next2|later].
  • rename flags:
    • prim··· flag to prim··, _str* to _str*.
  • rename/move modules:
    • code::result::{error, panic} inside code.
    • data::collections::{array, destaque, list, stack, vec} inside data::list.
    • data::{bit, hash, serde} inside data::codec.
    • data::error inside code::error, make private.
    • num::cmp to num::ord.
    • num::alg::linear to num::geom::linear.
    • num::geom::shape::{angle, extent} inside num::geom::metric.
    • num::wave to phys::wave.
    • sys::path inside sys::fs, make private.
    • work::async to work::future.
  • rename/move items:
    • ExtFloatConst to FloatConst.
    • LoggerConfig to LogConfig.
    • TextWrite trait to FmtWrite.
    • Coro to CoroWorker, CoroYield to CoroWork, CoroRun to CoroManager.
    • re-exports: Layout to MemLayout, LayoutError to MemLayoutError.
    • impl_error! to define_error!.
  • rename examples:
    • coro_run to coro_manager.
  • rename variants:
    • AngleDirection: CounterClockwise to Positive, Clockwise to Negative.
  • rename/move fns/methods:
    • from prngs: next_state method to peek_next_state.
    • fmt_write, fmt_format and format_buf_args to Fmt::{write, format, format_buf, respectively.
    • bytes_from_bits fn to Mem::bytes_from_bits.
    • ExtThread::parallelism to available_parallelism.
  • deprecate fns/methods:
    • Char: utf8_2bytes_len, utf8_3bytes_len, utf8_4bytes_len.
  • modify methods:
    • LinuxSigaction: new method has an additional restorer argument.
  • remove feature-gates:
    • hash for: FxHasher.
    • io for: IoError, IoErrorKind, IoRead, IoWrite, IoBytes, IoChain, IoTake.
    • rand for: Xorshift128p.
    • str for: Str.
  • auto-enable features:
    • str: when enabling _str_u*.
  • make customizable: XorShift[16|32|64].
  • make const methods:
    • Float: clamp, copysign, div_euclid, max, min, min_total, round_ties_odd, signum.
    • IoBufReader: buffer, capacity, get_ref, get_mut, new.
    • IoChain: get_ref, get_mut, new.
    • IoCursor: get_ref, get_mut, new, position, set_position.
    • Mem: swap.
    • Ptr: copy, copy_nonoverlapping, replace, write, write_bytes, write_unaligned.
  • change attributes:
    • mark Float and Sign as must_use.
  • derive Copy for Lgc16.
  • update str! macro docs, tests and syntax: remove : suffix.
  • make modules public:
    • data::error.
    • num::geom::shape.
    • sys::env.
    • work::{future, process, sync::atomic}.
  • change msvc windows target for gnu.
  • update scripts:
    • utils/check.rs:
      • add target components for the nightly toolchain.
      • add new fn run_cargo_with_env, sharing most of the logic with run_cargo.
      • enable __dbg feature & -Ctarget-cpu=native.
    • build/features.rs: support cfg flags auto-enabling other flags. Improve docs.
  • improve the .rustfmt.toml config file.
  • improve the docs for vendored items.

Fixed

  • improve build script debug output.
  • make array_init use absolute paths internally.
  • enable nightly features depending on alloc and std.
  • fix and improve Float methods: [cos|sin|tan]_series.
  • feature-gate:
    • ExtFuture::block.
    • namespaced re-exported unsafe methods with unsafe··.
  • refactor rustdoc-header.html to be modular, more efficient and versatile.
  • compile in docs.rs with cpu-native flag.

Full Changelog: v0.22.1...v0.23.0