mirror of
https://github.com/BurntSushi/jiff.git
synced 2025-12-23 08:47:45 +00:00
crates: move all sub-crates into crates/ directory
I should have just done this from the start. I hate doing these kinds of moves because it fucks up revision history. But if I'm going to be adding `jiff-icu`, `jiff-chrono`, `jiff-sqlx` and so on, then I really think we need a sub-directory. I'm keeping Jiff proper in `src/` though.
This commit is contained in:
parent
ff03eb99ed
commit
6920d3973d
31 changed files with 16 additions and 13 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -274,7 +274,7 @@ jobs:
|
|||
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
- name: Test wasm-pack project
|
||||
run: |
|
||||
cd jiff-wasm
|
||||
cd crates/jiff-wasm
|
||||
wasm-pack test --node
|
||||
|
||||
# Run benchmarks as tests.
|
||||
|
|
|
|||
10
Cargo.toml
10
Cargo.toml
|
|
@ -30,9 +30,9 @@ include = [
|
|||
|
||||
[workspace]
|
||||
members = [
|
||||
"jiff-cli",
|
||||
"jiff-tzdb",
|
||||
"jiff-tzdb-platform",
|
||||
"crates/jiff-cli",
|
||||
"crates/jiff-tzdb",
|
||||
"crates/jiff-tzdb-platform",
|
||||
"examples/*",
|
||||
]
|
||||
|
||||
|
|
@ -100,7 +100,7 @@ tzdb-concatenated = ["std"]
|
|||
js = ["dep:wasm-bindgen", "dep:js-sys"]
|
||||
|
||||
[dependencies]
|
||||
jiff-tzdb = { version = "0.1.2", path = "jiff-tzdb", optional = true }
|
||||
jiff-tzdb = { version = "0.1.2", path = "crates/jiff-tzdb", optional = true }
|
||||
log = { version = "0.4.21", optional = true, default-features = false }
|
||||
serde = { version = "1.0.203", optional = true, default-features = false }
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ serde = { version = "1.0.203", optional = true, default-features = false }
|
|||
# is enabled by default, but that the `tzdb-bundle-platform` crate is only
|
||||
# actually used on platforms without a system tzdb (i.e., Windows and wasm).
|
||||
[target.'cfg(any(windows, target_family = "wasm"))'.dependencies]
|
||||
jiff-tzdb-platform = { version = "0.1.2", path = "jiff-tzdb-platform", optional = true }
|
||||
jiff-tzdb-platform = { version = "0.1.2", path = "crates/jiff-tzdb-platform", optional = true }
|
||||
|
||||
[target.'cfg(windows)'.dependencies.windows-sys]
|
||||
version = ">=0.52.0, <=0.59.*"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ categories = ["date-and-time"]
|
|||
autotests = false
|
||||
edition = "2021"
|
||||
rust-version = "1.79"
|
||||
workspace = ".."
|
||||
workspace = "../.."
|
||||
|
||||
[[bin]]
|
||||
name = "jiff-cli"
|
||||
|
|
@ -27,7 +27,7 @@ default = []
|
|||
[dependencies]
|
||||
anyhow = "1.0.28"
|
||||
bstr = "1.9.1"
|
||||
jiff = { path = "..", features = ["logging"] }
|
||||
jiff = { path = "../..", features = ["logging"] }
|
||||
lexopt = "0.3.0"
|
||||
log = { version = "0.4.17", features = ["std"] }
|
||||
regex-lite = "0.1.6"
|
||||
|
|
@ -28,7 +28,8 @@ USAGE:
|
|||
jiff-cli generate jiff-tzdb <zoneinfo-dir> [<jiff-tzdb-dir>]
|
||||
|
||||
This program should be run from the root of the Jiff repository. Namely, it
|
||||
assumes that `./jiff-tzdb` exists and corresponds to the `jiff-tzdb` crate.
|
||||
assumes that `./crates/jiff-tzdb` exists and corresponds to the `jiff-tzdb`
|
||||
crate.
|
||||
|
||||
While you can run this program using your system's zoneinfo directory, it is
|
||||
recommended to generate your own zoneinfo directory via
|
||||
|
|
@ -204,7 +205,9 @@ impl Config {
|
|||
}
|
||||
|
||||
fn jiff_tzdb(&self) -> &Path {
|
||||
self.jiff_tzdb.as_deref().unwrap_or_else(|| Path::new("./jiff-tzdb"))
|
||||
self.jiff_tzdb
|
||||
.as_deref()
|
||||
.unwrap_or_else(|| Path::new("./crates/jiff-tzdb"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ The entire Time Zone Database embedded into your binary for specific platforms.
|
|||
"""
|
||||
categories = ["date-and-time"]
|
||||
keywords = ["date", "time", "temporal", "zone", "iana"]
|
||||
workspace = ".."
|
||||
workspace = "../.."
|
||||
edition = "2021"
|
||||
rust-version = "1.70"
|
||||
include = ["/*.rs", "COPYING", "LICENSE-MIT", "UNLICENSE"]
|
||||
|
|
@ -9,7 +9,7 @@ documentation = "https://docs.rs/jiff-tzdb"
|
|||
description = "The entire Time Zone Database embedded into your binary."
|
||||
categories = ["date-and-time"]
|
||||
keywords = ["date", "time", "temporal", "zone", "iana"]
|
||||
workspace = ".."
|
||||
workspace = "../.."
|
||||
edition = "2021"
|
||||
rust-version = "1.70"
|
||||
include = ["/*.rs", "/*.dat", "COPYING", "LICENSE-MIT", "UNLICENSE"]
|
||||
|
|
@ -13,7 +13,7 @@ path = "lib.rs"
|
|||
crate-type = ["cdylib", "rlib"]
|
||||
|
||||
[dependencies]
|
||||
jiff = { path = "..", features = ["js"] }
|
||||
jiff = { path = "../..", features = ["js"] }
|
||||
wasm-bindgen = "0.2.84"
|
||||
wasm-bindgen-test = "0.3.34"
|
||||
web-sys = { version = "0.3.69", features = ["console"] }
|
||||
Loading…
Add table
Add a link
Reference in a new issue