Skip to content

Commit

Permalink
Migrate repo to workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 committed Dec 7, 2024
1 parent 1fd02ef commit 42d4c93
Show file tree
Hide file tree
Showing 34 changed files with 107 additions and 45 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ jobs:
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Package (dry-run)
run: cargo package
- name: Install cargo-workspaces
run: cargo install cargo-workspaces
- name: Publish (dry-run)
run: cargo ws publish --dry-run
- name: Publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
Expand All @@ -26,4 +28,4 @@ jobs:
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Action"
cargo publish
cargo ws publish --from-git --yes --no-git-commit skip
14 changes: 8 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,21 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
key: lint
- name: Install cargo-workspaces
run: cargo install cargo-workspaces
- name: Check rustfmt
run: cargo fmt --all -- --check
- name: Check clippy
run: cargo clippy --all-targets --all-features
run: cargo ws exec cargo clippy --all-features --all-targets
- name: Check clippy (No features)
run: cargo ws exec cargo clippy --no-default-features --all-targets

build-test:
name: Test (${{ matrix.rust.name }}, ${{ matrix.os }})
strategy:
matrix:
rust:
# possibly add the MSRV here
# TODO: possibly add the MSRV here
- { version: stable, name: stable }
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
Expand All @@ -50,16 +54,14 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
key: build-test

- name: Cargo build
run: cargo build --quiet
- name: Install latest nextest
uses: taiki-e/install-action@nextest
- name: Test
run: cargo test

- name: Cargo build --all-features
run: cargo build --quiet --all-features
- name: Install latest nextest
uses: taiki-e/install-action@nextest
- name: Test --all-features
run: cargo test --all-features
docs:
Expand Down
54 changes: 18 additions & 36 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,45 +1,27 @@
[package]
name = "temporal_rs"
keywords = ["date", "time", "calendar", "timezone", "duration"]
categories = ["date-and-time", "internationalization"]
readme = "./README.md"
description = "Temporal in Rust is an implementation of the TC39 Temporal Builtin Proposal in Rust."
version = "0.0.4"
[workspace]
resolver = "2"
members = [
"temporal_rs"
]

[workspace.package]
edition = "2021"
version = "0.0.4"
rust-version = "1.80"
authors = ["boa-dev"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/boa-dev/temporal"
rust-version = "1.80"
exclude = [
"docs/*",
".github/*",
".gitignore",
"LICENSE*",
]

[dependencies]
[workspace.dependencies]
tinystr = "0.7.6"
icu_calendar = { version = "1.5.2", default-features = false, features = ["compiled_data"] }
rustc-hash = { version = "2.0.0", features = ["std"] }
icu_calendar = { version = "1.5.2", default-features = false}
rustc-hash = "2.0.0"
bitflags = "2.6.0"
num-traits = "0.2.19"
ixdtf = { version = "0.2.0", features = ["duration"]}
ixdtf = "0.2.0"
iana-time-zone = "0.1.61"

# log feature
log = { version = "0.4.0", optional = true }

# tzdb feature
tzif = { version = "0.2.3", optional = true }
jiff-tzdb = { version = "0.1.1", optional = true }
combine = { version = "4.6.7", optional = true }

# System time feature
web-time = { version = "1.1.0", optional = true }

[features]
log = ["dep:log"]
experimental = ["tzdb"]
now = ["std", "dep:web-time"]
tzdb = ["dep:tzif", "std", "dep:jiff-tzdb", "dep:combine"]
std = []
log = "0.4.0"
tzif = "0.2.3"
jiff-tzdb = "0.1.1"
combine = "4.6.7"
web-time = "1.1.0"
38 changes: 38 additions & 0 deletions temporal_rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[package]
name = "temporal_rs"
keywords = ["date", "time", "calendar", "timezone", "duration"]
categories = ["date-and-time", "internationalization"]
description = "Temporal in Rust is an implementation of the TC39 Temporal Builtin Proposal in Rust."
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true

[dependencies]
tinystr.workspace = true
icu_calendar = { workspace = true, features = ["compiled_data"] }
rustc-hash = { workspace = true, features = ["std"] }
bitflags.workspace = true
num-traits.workspace = true
ixdtf = { workspace = true, features = ["duration"]}
iana-time-zone.workspace = true

# log feature
log = { workspace = true, optional = true }

# tzdb feature
tzif = { workspace = true, optional = true }
jiff-tzdb = { workspace = true, optional = true }
combine = { workspace = true, optional = true }

# System time feature
web-time = { workspace = true, optional = true }

[features]
log = ["dep:log"]
experimental = ["tzdb"]
now = ["std", "dep:web-time"]
tzdb = ["dep:tzif", "std", "dep:jiff-tzdb", "dep:combine"]
std = []
38 changes: 38 additions & 0 deletions temporal_rs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Temporal in Rust

`Temporal` is a calendar and timezone aware date/time library that is
currently being designed and proposed as a new builtin to the
`ECMAScript` specification.

This crate is an implementation of `Temporal` in Rust. While initially
developed for `Boa`, the crate has been externalized as we intended to
make an engine agnostic and general usage implementation of `Temporal`
and its algorithms.

## Temporal Proposal

Relevent links regarding Temporal can be found below.

- [Temporal Documentation](https://tc39.es/proposal-temporal/docs/)
- [Temporal Proposal Specification](https://tc39.es/proposal-temporal/)
- [Temporal Proposal Repository](https://github.com/tc39/proposal-temporal)

## Core Maintainers
- Jason Williams ([jasonwilliams](https://github.com/orgs/boa-dev/people/jasonwilliams))
- José Julián Espina ([jedel1043](https://github.com/orgs/boa-dev/people/jedel1043))
- Kevin Ness ([nekevss](https://github.com/orgs/boa-dev/people/nekevss))
- Boa Developers

## Contributing

This project is open source and welcomes anyone interested to participate.
Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for more information.

## Communication

Feel free to contact us on [Matrix](https://matrix.to/#/#boa:matrix.org).

## License

This project is licensed under the [Apache](./LICENSE-Apache) or
[MIT](./LICENSE-MIT) licenses, at your option.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 42d4c93

Please sign in to comment.