Low overhead Rust implementation of time-related concepts

Overview

It's Rust time!

Low overhead implementation of time-related concepts.

Who is time for?

For applications where simplicity and low-overhead are more important than precision, safety, and time zone support.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Comments
  • Bump Swatinem/rust-cache from 1 to 2

    Bump Swatinem/rust-cache from 1 to 2

    Bumps Swatinem/rust-cache from 1 to 2.

    Release notes

    Sourced from Swatinem/rust-cache's releases.

    v2.0.0

    • The action code was refactored to allow for caching multiple workspaces and different target directory layouts.
    • The working-directory and target-dir input options were replaced by a single workspaces option that has the form of $workspace -> $target.
    • Support for considering env-vars as part of the cache key.
    • The sharedKey input option was renamed to shared-key for consistency.

    v1.4.0

    • Clean both debug and release target directories.

    v1.3.0

    • Use Rust toolchain file as additional cache key.
    • Allow for a configurable target-dir.

    v1.2.0

    • Cache ~/.cargo/bin.
    • Support for custom $CARGO_HOME.
    • Add a cache-hit output.
    • Add a new sharedKey option that overrides the automatic job-name based key.

    v1.1.0

    • Add a new working-directory input.
    • Support caching git dependencies.
    • Lots of other improvements.

    v1.0.1

    • Improved logging output.
    • Make sure to consider all-features dependencies when pruning.
    • Work around macOS cache corruption.
    • Remove git-db cache for now.
    Changelog

    Sourced from Swatinem/rust-cache's changelog.

    Changelog

    2.2.0

    • Add new save-if option to always restore, but only conditionally save the cache.

    2.1.0

    • Only hash Cargo.{lock,toml} files in the configured workspace directories.

    2.0.2

    • Avoid calling cargo metadata on pre-cleanup.
    • Added prefix-key, cache-directories and cache-targets options.

    2.0.1

    • Primarily just updating dependencies to fix GitHub deprecation notices.

    2.0.0

    • The action code was refactored to allow for caching multiple workspaces and different target directory layouts.
    • The working-directory and target-dir input options were replaced by a single workspaces option that has the form of $workspace -> $target.
    • Support for considering env-vars as part of the cache key.
    • The sharedKey input option was renamed to shared-key for consistency.

    1.4.0

    • Clean both debug and release target directories.

    1.3.0

    • Use Rust toolchain file as additional cache key.
    • Allow for a configurable target-dir.

    1.2.0

    • Cache ~/.cargo/bin.
    • Support for custom $CARGO_HOME.
    • Add a cache-hit output.
    • Add a new sharedKey option that overrides the automatic job-name based key.

    1.1.0

    • Add a new working-directory input.
    • Support caching git dependencies.
    • Lots of other improvements.

    ... (truncated)

    Commits

    Dependabot compatibility score

    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 rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will 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 version will 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 dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 1
  • Change internal representation to i64

    Change internal representation to i64

    This is a proposal to change the internal representation of both Time and Duration to i64. Not using usize/isize anymore fixes a bug as the the library didn't work correctly on non-64 bits platforms. The advantage of a uniform underlying type is that it eliminates many edge cases when converting between the types.

    This PR has further increased clippy's strictness, which can be a very valuable safeguard, especially regarding casting.

    An effect is that Time can now represent negative values. This can be used to represent values before 1970-01-01 or it could be used to count down to some arbitrary deadline (e.g. rocket launch in T-1h).

    This PR does not yet fix / add test cases for negative Time values, such as the rounding functions. This should be addressed separately in follow-up PRs.

    release:minor 
    opened by rinde 0
  • remove impls for borrowed types

    remove impls for borrowed types

    The implementations of traits with a borrowed type are redundant and inconsistently applied. From now on, instead of writing

    let some_num: &f64 = ..;
    f64::from(some_num)
    

    we can simply dereference the number:

    let some_num: &f64 = ..;
    f64::from(*some_num)
    
    release:minor 
    opened by rinde 0
  • Fix overflow checks

    Fix overflow checks

    • Fixes overflow checks in:
      • AddAssign<Duration> for Time
      • Add<Duration> for Time
      • Sub<Duration> for Time
    • Adds implementation for SubAssign<Duration> for Time
    • Fixes overflow checks and allows usage of large time instances for Sub<Time> for Time
    release:minor 
    opened by rinde 0
  • Check semver of PR

    Check semver of PR

    Checks whether the version is bumped correctly. Will fail when breaking changes are introduced in a PR and the major version number hasn't been bumped.

    This code should work but can only be tested once it's merged to main

    opened by rinde 0
  • Adds `impl TryFrom<Duration> for Time`

    Adds `impl TryFrom for Time`

    Adds impl TryFrom<Duration> for Time. This is especially useful for testing.

    Alternatively we could also provide a impl From as part of some testing feature that panics for negative durations. If we go this route I suggest to do this in a separate PR, as there is other "testing" functions that could follow the same pattern.

    opened by jankeu 0
  • Improve operator impls

    Improve operator impls

    Adds a compile-checked overview of the operator support in the library. Adds missing operator implementations.

    This overview serves both as documentation as well as an insurance policy for keeping the implementations consistent with the documentation.

    opened by rinde 0
Releases(0.4.0)
  • 0.4.0(Mar 22, 2023)

    Version 0.4.0

    Commits

    • [da5b4552] Merge pull request #27 from moia-oss/change-internal-representation-to-i64
    • [52571322] fix bug in format
    • [8a7c2a06] add more lints
    • [0db720a5] increase clippy strictness
    • [c2f69ca6] Merge branch 'main' into change-internal-representation-to-i64
    • [dbb0ecf3] improve casting safety
    • [f1dd7aa4] Release 0.3.2 [skip ci]
    Source code(tar.gz)
    Source code(zip)
  • 0.3.2(Mar 21, 2023)

    Version 0.3.2

    Commits

    • [373f40f1] Merge pull request #26 from moia-oss/increase-clippy-strictness
    • [e29dc518] Merge branch 'main' into increase-clippy-strictness
    • [53741bda] Release 0.3.1 [skip ci]
    Source code(tar.gz)
    Source code(zip)
  • 0.3.1(Mar 21, 2023)

    Version 0.3.1

    Commits

    • [6aaff668] Merge pull request #25 from moia-oss/add-caching-to-semver-check
    • [cfcbe041] Merge branch 'main' into add-caching-to-semver-check
    • [5f52e087] Release 0.3.0 [skip ci]
    Source code(tar.gz)
    Source code(zip)
  • 0.3.0(Mar 21, 2023)

    Version 0.3.0

    Commits

    • [675985ab] Merge pull request #22 from moia-oss/fix-duration-add
    • [cbcb6296] Merge branch 'main' into fix-duration-add
    • [86ebf9eb] Release 0.2.1 [skip ci]
    Source code(tar.gz)
    Source code(zip)
  • 0.2.1(Mar 21, 2023)

    Version 0.2.1

    Commits

    • [b08e691e] Merge pull request #24 from moia-oss/bump-rust-to-1.68
    • [1cc6c4a4] bump rust to 1.68
    • [82397f73] Release 0.2.0 [skip ci]
    Source code(tar.gz)
    Source code(zip)
  • 0.2.0(Mar 21, 2023)

    Version 0.2.0

    Commits

    • [837e7230] Merge pull request #23 from moia-oss/remove-impls-for-borrowed-types
    • [69ae4338] remove impls for borrowed types
    • [5063aa10] Release 0.1.11 [skip ci]
    Source code(tar.gz)
    Source code(zip)
  • 0.1.11(Mar 6, 2023)

    Version 0.1.11

    Commits

    • [1600dfc7] Merge pull request #20 from moia-oss/check-semver-on-pr
    • [88c769c3] create temporary commit
    • [363653b9] change version prefix
    • [34c5ec83] add checkout
    • [fd911308] fix indentation
    • [6a397abd] fix action
    • [5af48aa3] Check semver of PR
    • [a33e0e0c] Release 0.1.10 [skip ci]
    Source code(tar.gz)
    Source code(zip)
  • 0.1.10(Feb 17, 2023)

    Version 0.1.10

    Commits

    • [776944ca] Merge pull request #19 from moia-oss/bump-nightly2
    • [38d4275d] Merge branch 'main' into bump-nightly2
    • [3124e572] Release 0.1.9 [skip ci]
    • [d90b8522] Merge branch 'main' into bump-nightly2
    Source code(tar.gz)
    Source code(zip)
  • 0.1.9(Feb 17, 2023)

    Version 0.1.9

    Commits

    • [5178cb6d] Merge pull request #17 from moia-oss/add-time-try-from-duration
    • [866fb68b] use fn to access millis
    • [27386066] add Time TryFrom Duration
    • [006cdb73] Release 0.1.8 [skip ci]
    Source code(tar.gz)
    Source code(zip)
  • 0.1.8(Feb 16, 2023)

    Version 0.1.8

    Commits

    • [e7ed9ef8] Merge pull request #16 from moia-oss/add-from-epoch
    • [40113368] rename fn
    • [27e6ad3d] Release 0.1.7 [skip ci]
    Source code(tar.gz)
    Source code(zip)
  • 0.1.7(Feb 14, 2023)

    Version 0.1.7

    Commits

    • [42451e25] Merge pull request #15 from moia-oss/publish-fix-skip-ci
    • [061674a3] Add skip-ci to main push in publish job
    • [aa88d024] Release 0.1.6
    Source code(tar.gz)
    Source code(zip)
  • 0.1.6(Feb 14, 2023)

  • 0.1.5(Feb 14, 2023)

  • 0.1.4(Feb 14, 2023)

  • 0.1.3(Feb 14, 2023)

  • 0.1.2(Feb 14, 2023)

    Version 0.1.2

    Commits

    • [e4a18389] Merge pull request #14 from moia-oss/Felerius-patch-1
    • [a4ed1a1c] Downgrade Cargo.toml to match Github releases
    • [1bee6e03] Merge pull request #13 from moia-oss/fix-publish-pipeline-again
    • [5eead0f1] Fix Cargo.toml
    • [384efaee] Fix publish.yaml again
    • [0ffa12bd] Release
    • [2d566b7b] Merge pull request #12 from moia-oss/fix-publish-pipeline
    • [62a909d4] Fix publish.yaml
    • [571e6e3a] Fix broken Cargo.toml
    • [5a33513a] Release
    • [26127b33] Release 0.1.1
    Source code(tar.gz)
    Source code(zip)
  • 0.1.1(Feb 14, 2023)

    Version 0.1.1

    Commits

    • [c16f2682] Merge pull request #11 from moia-oss/fix-cargo-toml-update-from-publish
    • [bca9d27e] Fix Cargo.toml update from publish.yaml
    • [450ec686] Merge pull request #10 from moia-oss/add-release-pipeline
    • [2e0155a3] Fix email address
    • [e494fa48] Use cargo token from github secrets
    • [9ba94305] Add release pipeline
    • [86137c29] Merge pull request #8 from moia-oss/documentation-link-in-cargo-toml
    • [92150a9b] Merge branch 'main' into documentation-link-in-cargo-toml
    • [0aa16371] Merge pull request #9 from moia-oss/Felerius-patch-1
    • [75cb5e15] Fix nightly version in pr.yaml
    • [7ee26b12] Add documentation link to Cargo.toml
    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Feb 13, 2023)

Owner
MOIA GmbH - Open Source
MOIA GmbH - Open Source
82 fun and easy to use, lightweight, spinners for Rust, with minimal overhead.

Spinners for Rust 82 fun and easy to use, lightweight, spinners for Rust, with minimal overhead, all the way from simple dots, to fun emoji based "spi

Juliette Cordor 2 May 17, 2022
Curated list of awesome projects and resources related to Rust and computer security

Awesome Rust Security Curated list of awesome projects and resources related to Rust and computer security Table of Contents Tools Web and Cloud Secur

Alan 131 Jan 1, 2023
Calculation of Wigner symbols and related constants

Calculation of Wigner symbols and related constants This crate computes Wigner 3j coefficients and Clebsch-Gordan coefficients in pure Rust. The calcu

Guillaume Fraux 3 Jan 19, 2022
A library providing helpers for various StarkNet fees related tasks.

?? How Much ? ?? Table of Contents About Getting Started Prerequisites Installation Usage Estimate fees on network Authors & contributors Security Lic

Abdel @ StarkWare 4 Dec 15, 2022
A server software designed for fetching Minecraft and Minecraft-related metadata

Minecraft Metadata Server A server software designed for fetching Minecraft and Minecraft-related metadata (such as Forge, Fabric, Quilt and Liteloade

Prism Launcher 11 Jan 19, 2023
A backend server and client for Norg related applications.

Norgopolis Norgopolis is a lightweight communication, launcher and utility services client for the Neorg rust-native modules ecosystem on Desktop. It

Neorg 10 May 27, 2023
belt is a command line app that can show your time from a list of selected time zones

A CLI app to show your time from a list of selected time zones, and a rust lib to parse dates in string formats that are commonly used.

Rollie Ma 23 Nov 4, 2022
Deadliner helps you keep track of the time left for your deadline by dynamically updating the wallpaper of your desktop with the time left.

Deadliner Watch the YouTube video What's Deadliner? Deadliner is a cross-platform desktop application for setting deadline for a project and keeping t

Deadliner 34 Dec 16, 2022
Helps you keep track of time for team members across different time zones & DST changes

Teamdate Helps you keep track of time for team members across different timezones and other daylight saving changes based off their location. Because

Alex Snaps 7 Jan 9, 2023
Low-level Rust library for implementing terminal command line interface, like in embedded systems.

Terminal CLI Need to build an interactive command prompt, with commands, properties and with full autocomplete? This is for you. Example, output only

HashMismatch 47 Nov 25, 2022
A low-level ncurses wrapper for Rust

ncurses-rs This is a very thin wrapper around the ncurses TUI lib. NOTE: The ncurses lib is terribly unsafe and ncurses-rs is only the lightest wrappe

Jeaye Wilkerson 628 Jan 7, 2023
Verified Rust for low-level systems code

See Goals for a brief description of the project's goals. Building the project The main project source is in source. tools contains scripts for settin

Secure Foundations Lab 95 Dec 27, 2022
F-Fetch targets low systems. Written in Rust. It's very simple, designed so you can pick it up and replace it.

F-Fetch F-Fetch targets low systems. Written in Rust. It's very simple, designed so you can pick it up and replace it. First Look ~/.config/ffetch/con

cd 3 Jul 10, 2023
Rust low-level minimalist APNG writer and PNG reader with just a few dependencies with all possible formats coverage (including HDR).

project Wiki https://github.com/js29a/micro_png/wiki at glance use micro_png::*; fn main() { // load an image let image = read_png("tmp/test.

jacek SQ6KBQ 8 Aug 30, 2023
A new pure-Rust library for cross-platform low-level access to USB devices.

nusb A new pure-Rust library for cross-platform low-level access to USB devices. Documentation Compared to rusb and libusb Pure Rust, no dependency on

Kevin Mehall 23 Oct 30, 2023
Tool to draw low-resolution graphs in terminal

lowcharts Tool to draw low-resolution graphs in terminal. lowcharts is meant to be used in those scenarios where we have numerical data in text files

juanleon lahoz 114 Dec 31, 2022
A low-level MVCC file format for storing blobs.

Sediment This repository isn't ready for public consumption. It just reached a stage where I wanted to start sharing ideas with others as well as usin

Khonsu Labs 24 Jan 8, 2023
Unopinionated low level API bindings focused on soundness, safety, and stronger types over raw FFI.

?? firehazard ?? Create a fire hazard by locking down your (Microsoft) Windows so nobody can escape (your security sandbox.) Unopinionated low level A

null 5 Nov 17, 2022
Simple low-level web server to serve file uploads with some shell scripting-friendly features

http_file_uploader Simple low-level web server to serve file uploads with some shell scripting-friendly features. A bridge between Web's multipart/for

Vitaly Shukela 2 Oct 27, 2022