Skip to content

Commit

Permalink
Merge pull request #10 from rodrimati1992/1_8
Browse files Browse the repository at this point in the history
1.8.0 release
  • Loading branch information
rodrimati1992 authored Oct 5, 2023
2 parents 1c2c2d2 + be27899 commit 02d33f5
Show file tree
Hide file tree
Showing 116 changed files with 6,514 additions and 716 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest

strategy:
max-parallel: 2
max-parallel: 3
matrix:
rust: [stable, beta, nightly, 1.65.0, 1.61.0, 1.57.0]

Expand All @@ -40,14 +40,13 @@ jobs:
set -ex
rustup override set ${{ matrix.rust }}
cargo update
cd "${{github.workspace}}/"
cargo test --no-default-features
cargo test --no-default-features --features "${{env.rustv}}"
cargo test --no-default-features --features "alloc"
cargo test --no-default-features --features "const_marker"
cargo test --no-default-features --features "${{env.rustv}} alloc"
cargo test --no-default-features --features "${{env.rustv}} alloc const_marker"
cargo test --no-default-features --features "proc_macros"
cargo test --no-default-features --features "${{env.rustv}} proc_macros alloc"
- uses: actions/checkout@v2
- name: ci-nighly
Expand All @@ -59,10 +58,16 @@ jobs:
cd "${{github.workspace}}/"
cargo build
cargo test --no-default-features --features "rust_stable nightly_mut_refs"
cargo test --no-default-features --features "rust_stable alloc nightly_mut_refs"
cargo test --no-default-features --features \
"rust_stable adt_const_marker __ui_tests alloc nightly_mut_refs"
"rust_stable adt_const_marker nightly_mut_refs"
cargo test --no-default-features --features \
"rust_stable adt_const_marker alloc nightly_mut_refs"
cargo test --no-default-features --features \
"rust_stable adt_const_marker proc_macros __ui_tests alloc nightly_mut_refs"
cargo test --no-default-features --features \
"rust_stable adt_const_marker __ui_tests alloc nightly_mut_refs"
MIRI_NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)
echo "Installing latest nightly with Miri"
Expand All @@ -76,4 +81,4 @@ jobs:
cargo clean
env RUST_BACKTRACE=0 cargo miri test --no-default-features \
--features "${{env.rustv}} adt_const_marker alloc nightly_mut_refs"
--features "${{env.rustv}} adt_const_marker proc_macros alloc nightly_mut_refs"
25 changes: 16 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "typewit"
version = "1.7.0"
version = "1.8.0"
authors = ["rodrimati1992 <[email protected]>"]
rust-version = "1.57.0"
edition = "2021"
license = "Zlib"
description = "type-witness-based abstractions, mostly for emulating polymorphism in const fns"
documentation = "https://docs.rs/typewit/"
readme="./README.md"
keywords = ["no-std", "const_fn"]
categories = ["no-std"]
keywords = ["no-std", "const_fn", "GADT", "type_witness", "type-equality", "refl"]
categories = ["no-std", "rust-patterns"]
repository = "https://github.com/rodrimati1992/typewit/"
include = [
"Cargo.toml",
Expand All @@ -18,6 +18,13 @@ include = [
"LICENSE-ZLIB.md",
]

[workspace]

[dependencies.typewit_proc_macros]
version = "=1.8.1"
path = "./typewit_proc_macros"
optional = true

[dev-dependencies.arrayvec]
version = "0.7"
default-features = false
Expand All @@ -26,19 +33,19 @@ default-features = false
version = "1.0"

[features]
default = ["const_marker"]
default = ["proc_macros"]
rust_1_61 = []
# mostly for doc examples
rust_1_65 = ["rust_1_61"]
rust_stable = ["rust_1_65"]
proc_macros = ["typewit_proc_macros"]
const_marker = []
adt_const_marker = ["rust_stable","const_marker"]
adt_const_marker = ["rust_stable"]
alloc = []
mut_refs = []
nightly_mut_refs = ["rust_stable", "mut_refs"]
mut_refs = ["rust_stable"]
nightly_mut_refs = ["mut_refs"]
docsrs = []
__ui_tests = []

[package.metadata.docs.rs]
features = ["alloc", "rust_stable", "nightly_mut_refs", "const_marker", "docsrs"]
features = ["alloc", "rust_stable", "nightly_mut_refs", "adt_const_marker", "docsrs"]

93 changes: 93 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,99 @@ This is the changelog, summarising changes in each version(some minor changes ma

# 1.0

### 1.8.0

Added `"rust_1_65"` feature

Added `BaseTypeWitness` trait, which requires `"rust_1_61"` feature.

Added `MetaBaseTypeWit` enum, which requires `"rust_1_61"` feature.


Added these items to `type_fn` module:
- `InjTypeFn` trait
- `RevTypeFn` trait
- `FnRev` type-level function
- `CallInjFn` type alias
- `UncallFn` type alias

Added `inj_type_fn` macro

Added reexport of these in `type_fn` module:
- `inj_type_fn` macro
- `type_fn` macro


Added `TypeCmp` enum

Added these associated items to `TypeEq`:
- `with_any` constructor
- `to_cmp` method
- `unmap` method
- `unproject` method

Added `type_ne` macro

Added these associated items to `TypeNe`:
- `with_any` constructor
- `with_fn` constructor
- `to_cmp` method
- `flip` method
- `join_left` method
- `join_right` method
- `map` method
- `project` method
- `unmap` method
- `unproject` method
- `in_mut` method
- `in_ref` method
- `in_array` method (requires `"rust_1_61"` feature)
- `zip` method (requires `"rust_1_61"` feature)
- `zip3` method (requires `"rust_1_61"` feature)
- `zip4` method (requires `"rust_1_61"` feature)

Removed the need to enable `"const_marker"` feature to enable `const_marker` module.

Added `equals` method to all marker types in `const_marker` module.

Deprecated `eq` methods of all marker types in `const_marker` module.

Added `type_constructors` module, which requires `"rust_1_65"` and includes these items:
- `BaseTypeWitnessTc` trait
- `TcTypeCmp` struct
- `TcTypeEq` struct
- `TcTypeNe` struct
- `BaseTypeWitnessReparam` type alias
- `BaseTypeWitnessToTc` type alias
- `MapBaseTypeWitness` type alias
- `TcToBaseTypeWitness` type alias

Added `methods` module, which requires `"rust_1_65"` and includes these items:
- `zipping` module
- `in_array` function
- `zip2` function
- `zip3` function
- `zip4` function

The `methods::zipping` submodule (which requires `"rust_1_65"`) contains:
- `Zip2` trait
- `Zip3` trait
- `Zip4` trait
- `Zip2Out` type alias
- `Zip3Out` type alias
- `Zip4Out` type alias

Added `type_ne` module, which contains:
- reexport of `TypeNe`
- reexport of `type_ne` macro
- `LeftArg` marker type
- `RightArg` marker type

Added `typewit_proc_macros` optional dependency.

Added `"proc_macros"` feature, enabled by default, which enables `typewit_proc_macros` dependency.


### 1.7.0

Added `polymatch` macro.
Expand Down
Loading

0 comments on commit 02d33f5

Please sign in to comment.