Commit Graph

117 Commits

Author SHA1 Message Date
Brandon W Maister 5ca6ff5afc Make it harder to accidentally use private features
In particular if built with `--all-features` or `features = "all"` we don't
want to accidentally make it look like `YearFlags` are something that people
should use. So: hide it from docs and put it behind a dunder.
2019-12-23 13:26:05 -05:00
Brandon W Maister 4f73f9423b Make criterion a dev dependency
It's much less risky than making it an optional dependency, even if it does
mean that everyone working on chrono has to compile it.
2019-12-23 12:51:11 -05:00
Brandon W Maister a5e2796931 Change docs and playground features so that it compiles
All features includes some things that are nightly only.

Fixes #373
2019-12-13 11:10:49 -08:00
Brandon W Maister 495243ae3c
Merge pull request #369 from quodlibetor/finish-criterion
Finish moving all benchmarks to criterion
2019-11-30 19:45:37 -05:00
Brandon W Maister d0dbc61b69 Make criterion an optional dependency
So that it doesn't slow down every user's builds and and CI
2019-11-30 18:40:28 -05:00
Brandon W Maister 4f1c35827f Finish moving all benchmarks to criterion
I didn't delete some, apparently, and an internal struct had to be made public
to get its benchmark to work.
2019-11-30 18:11:03 -05:00
Brandon W Maister 19dd051d22
Merge pull request #365 from coolreader18/fix-wasi
Add support for compilation on wasm32-wasi
2019-11-29 15:03:27 -05:00
coolreader18 c5973277e7
Don't do wasmbind on wasi 2019-11-26 23:57:51 -06:00
Brandon W Maister 80da04381c add serialization benchmark 2019-11-24 15:05:47 -05:00
Brandon W Maister 8de2cc375f switch to using criterion for benchmarks
It has a ton of great features[1], including stronger statistical signifance
tests, making comparisons to previous or baseline runs, nice plots, and being
able to be run on stable.

1: https://bheisler.github.io/criterion.rs/book/
2019-11-24 13:51:27 -05:00
Brandon W Maister 670561b4c1 Prepare for and Bump Chrono version to 0.4.10 2019-11-23 19:19:04 -05:00
Michal Srb db8784f97c Fix existing benchmarks
The #[cfg(bench)] attribute does not exist and is always false. Lets
define a feature "bench" which can be used to enable benchmarks when
building with nightly.
2019-11-23 23:34:59 +01:00
Brandon W Maister ffcd0f9c19 put bincode back to the version used for testing 2019-09-20 11:02:00 -04:00
Brandon W Maister a09f9ba2a8 Test against serde with no features in both std and no-std 2019-09-20 10:50:28 -04:00
Brandon W Maister e5bbc94c3b First pass at making "alloc" its own feature
Part of this means that we don't actually need to allocate to write to Serde
any more, which is a win in its own right.
2019-09-15 20:45:49 -04:00
Brandon W Maister 4027bbb66d Rename serde-1 back to serde 2019-09-13 14:49:41 -04:00
Christopher Serr e62a054cd9 Introduce an `alloc` feature 2019-09-09 13:51:10 +02:00
Christopher Serr 9dc91f78ed Implement Support for no_std
This adds a new `std` feature to chrono that is enabled by default. By
deactivating this feature via `default-features = false` you can now use
chrono in applications that don't use the standard library. The `serde`
feature is supported as well.

Resolves #336
2019-09-07 12:12:49 +02:00
Brandon W Maister be93229271 Bump Chrono version to 0.4.9 2019-09-03 22:30:39 -04:00
Brandon W Maister 2839d8d7db Put wasm-bindgen and js-sys behind a wasm-bindgen feature gate
Fixes #334
2019-09-03 09:05:15 -04:00
Brandon W Maister a70c5cdc79 Bump Chrono version to 0.4.8 2019-08-31 15:26:32 -04:00
eV cc073a650f remove cargo web / compile time error 2019-08-22 08:09:56 +00:00
eV f21b1fbf21 Fix emscripten and guard against cargo test + wasm32-unknown-unknown 2019-08-16 22:46:10 +00:00
eV 5d38faeb40 fix local timezone, add tests 2019-08-16 09:35:56 +00:00
Joey Ezechiels 8bfaca9f9b Add {Utc,Local}::now() constructor versions for the `wasm32` arch
While likely providing only incomplete support for WebAssembly, this
commit opens up chrono for use on the wasm32 architecture.
2019-08-16 07:46:02 +00:00
Brandon W Maister d8c68f6bd0 Bump Chrono version to 0.4.7 2019-06-24 20:56:40 -04:00
Guillaume Gomez b7003373f2 Add doc-comment to test README examples and fix README examples 2019-04-30 23:29:57 +02:00
Brandon W Maister 95bf861ceb Disable libc default features so it builds on rust 1.13 2019-03-31 19:03:18 -04:00
Igor Gnatenko 5f74978778
exclude CI files from crates.io 2018-10-31 12:11:46 +01:00
Brandon W Maister 94b43fa2e8 Bump Chrono version to 0.4.6 2018-08-25 16:47:10 -04:00
Finkelman 701d36536b bump rustc-serialize to a vertion that builds on modern rust 2018-08-18 15:29:48 -04:00
Eh2406 5fc6edd928 bump time to use winapi 0.3 2018-08-17 19:00:37 -04:00
Brandon W Maister 8fceba82f4 Bump Chrono version to 0.4.5 2018-07-28 17:12:03 -04:00
David Wood b57e815da7
Enable all features on Rust Playground. 2018-07-21 19:24:24 +01:00
Brandon W Maister 237042365e Update for 0.4.4 2018-06-23 17:32:44 -04:00
Brandon W Maister 0ef8c5cc83 Bump Chrono Version to 0.4.3 2018-06-10 21:36:36 -04:00
Brandon W Maister 97dbfd02ab Bump version for 0.4.2 release 2018-04-07 17:51:56 -04:00
Jethro Beekman 5e68c60bb2 Add clock feature 2018-04-02 08:35:27 -07:00
Brandon W Maister 1ddc67ce11 Bump version to 0.4.1 2018-03-26 22:58:57 -04:00
Josh Stone 8f90f405d5 Use no_std-compatible num dependencies
Rather than the `num` meta-crate, use `num-integer` and `num-traits`
without default features to make them `#[no_std]`.  `num-iter` is
just a dev-dependency now for a few test cases.

The only public change is the `impl FromPrimitive for Weekday`, but this
is still the same exact trait that `num` re-exports, so this is not a
breaking change.
2018-02-23 00:07:16 -08:00
Yong Wen Chua d5aeae0a4d Add metadata to include all features for docs on docs.rs
This is related to https://github.com/onur/docs.rs/pull/131
2017-06-27 05:29:27 +08:00
Kang Seonghoon 4be3962e31 Merge commit '58dcb4ff' 2017-06-21 03:52:19 +09:00
Brandon W Maister 44fc13d7df Use serde's serialize_with instead of a newtype
This is a significantly less horrible API than in the previous commit.
2017-06-21 03:39:39 +09:00
Kang Seonghoon 388c04002b
Bumped the version number. This marks the beginning of 0.4.0 series.
- Added a mention to Chrono-tz.
2017-06-21 03:27:46 +09:00
Igor Gnatenko 58dcb4ffd7 bincode doesn't have serde feature
It is built-in.
2017-06-16 10:03:24 +02:00
Kang Seonghoon a91981af02
Bump the bincode dependency.
Fixes the CI test.
2017-05-05 19:06:45 +09:00
Kang Seonghoon dcf193323b
0.3.1: Minor maintenance release, Serde 1.0 support.
- Serde 1.0 is now supported. (#142)

  Technically this is a breaking change, but the minor version was not
  effective in avoiding dependency breakages anyway (because Cargo
  will silently compile two versions of crates). Provided that this is
  likely the last breakage from Serde, we tolerate
  this more-than-last-minute change in this version.

- `Weekday` now implements `FromStr`, `Serialize` and `Deserialize`.
  (#113)

- Fixed a bug that the leap second can be mapped wrongly
  in the local tz with some conditions. (#130)

- Some changes to the tests to avoid previously known issues.

Note that the actually published version is very slightly different
from the repository because no published version of bincode supports
Serde 1.0 right now.
2017-05-02 03:13:00 +09:00
Ashley Mannix 80c3582531 upgrade to serde 1.0 2017-04-21 21:12:26 +10:00
Kang Seonghoon 1583df95b5
Upgrade bincode dev-dependency to >=1.0.0-alpha6.
The test depends on the bincode API changed at that version.
2017-04-19 00:34:10 +09:00
Kang Seonghoon d036c07370
Bincode 1.0.0-alpha2 no longer has the `bincode::serde` module. 2017-02-14 03:28:14 +09:00