Bump time from 0.3.44 to 0.3.47 (#2424)
Bumps time from 0.3.44 to 0.3.47.
Release notes
Sourced from time's releases.
v0.3.47
See the changelog for details.
v0.3.46
See the changelog for details.
v0.3.45
See the changelog for details.
Changelog
Sourced from time's changelog.
0.3.47 [2026-02-05]
Security
The possibility of a stack exhaustion denial of service attack when parsing RFC 2822 has been eliminated. Previously, it was possible to craft input that would cause unbounded recursion. Now, the depth of the recursion is tracked, causing an error to be returned if it exceeds a reasonable limit.
This attack vector requires parsing user-provided input, with any type, using the RFC 2822 format.
Compatibility
- Attempting to format a value with a well-known format (i.e. RFC 3339, RFC 2822, or ISO 8601) will error at compile time if the type being formatted does not provide sufficient information. This would previously fail at runtime. Similarly, attempting to format a value with ISO 8601 that is only configured for parsing (i.e.
Iso8601::PARSING) will error at compile time.Added
- Builder methods for format description modifiers, eliminating the need for verbose initialization when done manually.
date!(2026-W01-2)is now supported. Previously, a space was required betweenWand01.[end]now has atrailing_inputmodifier which can either beprohibit(the default) ordiscard. When it isdiscard, all remaining input is ignored. Note that if there are components after[end], they will still attempt to be parsed, likely resulting in an error.Changed
- More performance gains when parsing.
Fixed
- If manually formatting a value, the number of bytes written was one short for some components. This has been fixed such that the number of bytes written is always correct.
- The possibility of integer overflow when parsing an owned format description has been effectively eliminated. This would previously wrap when overflow checks were disabled. Instead of storing the depth as
u8, it is stored asu32. This would require multiple gigabytes of nested input to overflow, at which point we've got other problems and trivial mitigations are available by downstream users.0.3.46 [2026-01-23]
Added
- All possible panics are now documented for the relevant methods.
- The need to use
#[serde(default)]when using customserdeformats is documented. This applies only when deserializing anOption<T>.Duration::nanoseconds_i128has been made public, mirroringstd::time::Duration::from_nanos_u128.... (truncated)
Commits
d5144cdv0.3.47 releasef6206b0Guard against integer overflow in release mode1c63dc7Avoid denial of service when parsing Rfc28225940df6Add builder methods to avoid verbose construction00881a4Manually format macros everywherebb723b6Addtrailing_inputmodifier toend31c4f8ePermitW12indate!macro490a17bMark error paths in well-known formats as cold6cb1896OptimizeRfc2822parsing6d264d5Remove erroneous#[inline(never)]attributes- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don’t alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.Signed-off-by: dependabot[bot] support@github.com Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
A data-first Rust-native UI toolkit.
Druid was an experimental Rust-native UI toolkit. Its main goal was to offer a polished user experience. There were many factors to this goal, including performance, a rich palette of interactions (hence a widget library to support them), and playing well with the native platform. See the goals section for more details.
We did periodic releases of Druid on crates.io. All changes were documented in the changelog.
For an overview of some key concepts, see the incomplete Druid book.
Project status
UNMAINTAINED
The Druid project has been discontinued.
New development effort moved on to Xilem, which has a lot of fundamental changes to allow for a wider variety of applications with better performance, but it also heavily inherits from Druid. We see Xilem as the future of Druid.
Druid is reasonably usable for some subset of applications and has a significant testing history, which ensures some stability and correctness. However, there will not be any new features or bug fixes coming to Druid. As such we don’t recommend using Druid for brand new applications. If you insist, then at least make sure your application doesn’t require a feature that Druid doesn’t have, e.g. accessibility or 3D support.
Contributions
As the Druid project has been discontinued, we will not be accepting any more contributions.
Please take a look at some of our other projects instead, especially the Druid successor Xilem.
Example
Here’s a simple counter example app:
Check out the the examples folder for a more comprehensive demonstration of Druid’s existing functionality and widgets. Check druid_widget_nursery for more widgets.
Screenshots
Using Druid
An explicit goal of Druid was to be easy to build. Druid is available on crates.io and should work as a lone dependency (it re-exports all the parts of
druid-shell,piet, andkurbothat you’ll need):Platform notes
Linux
On Linux, Druid requires gtk+3; see GTK installation page. (On ubuntu-based distro, running
sudo apt-get install libgtk-3-devfrom the terminal will do the job.)OpenBSD
On OpenBSD, Druid requires gtk+3; install from packages:
Alternatively, there is an X11 backend available, although it is currently missing quite a few features. You can try it out with
--features=x11.Goals
Druid’s goal was to make it easy to write and deploy high quality desktop applications with a smooth and polished user experience on all common platforms. In order to achieve this we strived for a variety of things:
Non-Goals
In order to fulfill those goals, we couldn’t support every use case. Luckily the Rust community is working on a variety of different libraries with different goals, so here are some of Druid’s non-goals and possible alternatives that can offer those capabilities:
Druid was just one of many ongoing Rust-native GUI experiments.
Concepts
druid-shell
The Druid toolkit uses
druid-shellfor a platform-abstracting application shell.druid-shellis responsible for starting a native platform runloop, listening to events, converting them into a platform-agnostic representation, and calling a user-provided handler with them.While
druid-shellwas being developed with the Druid toolkit in mind, it was intended to be general enough that it could be reused by other projects interested in experimenting with Rust GUI. Thedruid-shellcrate includes a couple of non-druidexamples.piet
Druid relies on the Piet library for drawing and text layout. Piet is a 2D graphics abstraction with multiple backends:
piet-direct2d,piet-coregraphics,piet-cairo,piet-web, andpiet-svgare currently available. In terms of Druid platform support via Piet, macOS usespiet-coregraphics, Linux/OpenBSD/FreeBSD usepiet-cairo, Windows usespiet-direct2d, and web usespiet-web.widgets
Widgets in Druid (text boxes, buttons, layout components, etc.) are objects which implement the Widget trait. The trait is parametrized by a type (
T) for associated data. All trait methods (event,lifecycle,update,paint, andlayout) are provided with access to this data, and in the case ofeventthe reference is mutable, so that events can directly update the data.Whenever the application data changes, the framework traverses the widget hierarchy with an
updatemethod.All the widget trait methods are provided with a corresponding context (EventCtx, LifeCycleCtx, UpdateCtx, LayoutCtx, PaintCtx). The widget can request things and cause actions by calling methods on that context.
In addition, all trait methods are provided with an environment
Env, which includes the current theme parameters (colors, dimensions, etc.).Druid provides a number of basic utility and layout widgets and it’s easy to implement your own. You can also compose widgets into new widgets:
layout
Druid’s layout protocol was strongly inspired by Flutter’s box layout model. In Druid, widgets are passed a
BoxConstraintthat provides them a minimum and maximum size for layout. Widgets are also responsible for computing appropriate constraints for their children if applicable.data
Druid uses a Data trait to represent value types. These should be cheap to compare and cheap to clone.
In general, you can use
deriveto generate aDataimpl for your types.lens
The Lens datatype gives access to a part of a larger data structure. Like
Data, this can be derived. Derived lenses are accessed as associated constants with the same name as the field.To use the lens, wrap your widget with
LensWrap(note the conversion of CamelCase to snake_case):Alternatively, lenses for structs, tuples, and indexable containers can be constructed on-demand with the
lensmacro:This is particularly useful when working with types defined in another crate.
Authors
The main authors are Raph Levien and Colin Rofls, with much support from an active and friendly community. See the AUTHORS file for more.