Skip to content

Commit

Permalink
Merge pull request #901 from dimforge/dev
Browse files Browse the repository at this point in the history
Release v0.27.0
  • Loading branch information
sebcrozet committed Jun 2, 2021
2 parents 156f292 + dfc8ad3 commit c04b087
Show file tree
Hide file tree
Showing 56 changed files with 1,895 additions and 356 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/nalgebra-ci-build.yml
Expand Up @@ -69,6 +69,12 @@ jobs:
- name: test nalgebra-sparse (slow tests)
# Unfortunately, the "slow-tests" take so much time that we need to run them with --release
run: PROPTEST_CASES=10000 cargo test --release --manifest-path=nalgebra-sparse/Cargo.toml --features compare,proptest-support,slow-tests slow
test-nalgebra-macros:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: test nalgebra-macros
run: cargo test -p nalgebra-macros
build-wasm:
runs-on: ubuntu-latest
# env:
Expand Down
31 changes: 30 additions & 1 deletion CHANGELOG.md
Expand Up @@ -4,9 +4,38 @@ documented here.

This project adheres to [Semantic Versioning](https://semver.org/).

## [0.27.0]
This removes the `convert-glam` and `convert-glam-unchecked` optional features.
Instead, this adds the `convert-glam013`, `convert-glam014`, and `convert-glam015` optional features for
conversions targeting the versions 0.13, 0.14, and 0.15 of `glam`.

### Added
- Add macros `matrix!`, `dmatrix!`, `vector!`, `dvector!`, `point!` for constructing matrices/vectors/points in a
more convenient way. See [#886](https://github.com/dimforge/nalgebra/pull/886) and [#899](https://github.com/dimforge/nalgebra/pull/899).
- Add `CooMatrix::reserve` to `nalgebra-sparse`.
- Add basic support for serialization using `rkyv`. Can be enabled with the features `rkyv-serialize` or
`rkyv-serialize-no-std`.


### Fixed
- Fixed a potential unsoundness issue after deserializing an invalid `DVector` using `serde`.

## [0.26.2]
### Added
- Conversion from an array `[T; D]` to an isometry `Isometry<T, _, D>` (as a translation).
- Conversion from a static vector `SVector<T; D>` to an isometry `Isometry<T, _, D>` (as a translation).
- Conversion from a point `Point<T; D>` to an isometry `Isometry<T, _, D>` (as a translation).
- Conversion of an array `[T; D]` from/to a translation `Translation<T, D>`.
- Conversion of a point `Point<T, D>` to a translation `Translation<T, D>`.
- Conversion of the tuple of glam types `(Vec3, Quat)` from/to an `Isometry2` or `Isometry3`.
- Conversion of a glam type `Vec2/3/4` from/to a `Translation2/3/4`.

## [0.26.1]
Fix a regression introduced in 0.26.0 preventing `DVector` from being serialized with `serde`.

## [0.26.0]
This releases integrates `min-const-generics` to nalgebra. See
[our blog post](https://dimforge.com/blog/2021/04/12/nalgebra-const-generics)
[our blog post](https://www.dimforge.com/blog/2021/04/12/integrating-const-generics-to-nalgebra)
for details about this release.

### Added
Expand Down
38 changes: 24 additions & 14 deletions Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "nalgebra"
version = "0.26.0"
version = "0.27.0"
authors = [ "Sébastien Crozet <developer@crozet.re>" ]

description = "General-purpose linear algebra library with transformations and statically-sized or dynamically-sized matrices."
Expand All @@ -22,7 +22,7 @@ name = "nalgebra"
path = "src/lib.rs"

[features]
default = [ "std" ]
default = [ "std", "macros" ]
std = [ "matrixmultiply", "simba/std" ]
sparse = [ ]
debug = [ "approx/num-complex", "rand" ]
Expand All @@ -32,12 +32,14 @@ compare = [ "matrixcompare-core" ]
libm = [ "simba/libm" ]
libm-force = [ "simba/libm_force" ]
no_unsound_assume_init = [ ]
macros = [ "nalgebra-macros" ]

# Conversion
convert-mint = [ "mint" ]
convert-glam = [ "glam" ]
convert-glam-unchecked = [ "convert-glam" ] # Enable edgy conversions like Mat4 -> Isometry3
convert-bytemuck = [ "bytemuck" ]
convert-glam013 = [ "glam013" ]
convert-glam014 = [ "glam014" ]
convert-glam015 = [ "glam015" ]

# Serialization
## To use serde in a #[no-std] environment, enable the
Expand All @@ -47,6 +49,8 @@ convert-bytemuck = [ "bytemuck" ]
serde-serialize-no-std = [ "serde", "num-complex/serde" ]
serde-serialize = [ "serde-serialize-no-std", "serde/std" ]
abomonation-serialize = [ "abomonation" ]
rkyv-serialize-no-std = [ "rkyv" ]
rkyv-serialize = [ "rkyv-serialize-no-std", "rkyv/std" ]

# Randomness
## To use rand in a #[no-std] environment, enable the
Expand All @@ -60,39 +64,44 @@ proptest-support = [ "proptest" ]
slow-tests = []

[dependencies]
nalgebra-macros = { version = "0.1", path = "nalgebra-macros", optional = true }
typenum = "1.12"
rand-package = { package = "rand", version = "0.8", optional = true, default-features = false }
num-traits = { version = "0.2", default-features = false }
num-complex = { version = "0.3", default-features = false }
num-rational = { version = "0.3", default-features = false }
approx = { version = "0.4", default-features = false }
simba = { version = "0.4", default-features = false }
num-complex = { version = "0.4", default-features = false }
num-rational = { version = "0.4", default-features = false }
approx = { version = "0.5", default-features = false }
simba = { version = "0.5", default-features = false }
alga = { version = "0.9", default-features = false, optional = true }
rand_distr = { version = "0.4", default-features = false, optional = true }
matrixmultiply = { version = "0.3", optional = true }
serde = { version = "1.0", default-features = false, features = [ "derive" ], optional = true }
abomonation = { version = "0.7", optional = true }
rkyv = { version = "~0.6.4", default-features = false, features = ["const_generics"], optional = true }
mint = { version = "0.5", optional = true }
glam = { version = "0.13", optional = true }
quickcheck = { version = "1", optional = true }
pest = { version = "2", optional = true }
pest_derive = { version = "2", optional = true }
bytemuck = { version = "1.5", optional = true }
matrixcompare-core = { version = "0.1", optional = true }
proptest = { version = "1", optional = true, default-features = false, features = ["std"] }
proptest = { version = "1", optional = true, default-features = false, features = ["std"] }
glam013 = { package = "glam", version = "0.13", optional = true }
glam014 = { package = "glam", version = "0.14", optional = true }
glam015 = { package = "glam", version = "0.15", optional = true }


[dev-dependencies]
serde_json = "1.0"
rand_xorshift = "0.3"
rand_isaac = "0.3"
criterion = "0.2.10"
criterion = { version = "0.3", features = ["html_reports"] }

# For matrix comparison macro
matrixcompare = "0.2.0"
matrixcompare = "0.3.0"
itertools = "0.10"

[workspace]
members = [ "nalgebra-lapack", "nalgebra-glm", "nalgebra-sparse" ]
members = [ "nalgebra-lapack", "nalgebra-glm", "nalgebra-sparse", "nalgebra-macros" ]
resolver = "2"

[[example]]
Expand All @@ -103,10 +112,11 @@ required-features = ["compare"]
name = "nalgebra_bench"
harness = false
path = "benches/lib.rs"
required-features = ["rand"]

[profile.bench]
lto = true

[package.metadata.docs.rs]
# Enable certain features when building docs for docs.rs
features = [ "proptest-support", "compare" ]
features = [ "proptest-support", "compare", "macros" ]
2 changes: 1 addition & 1 deletion benches/core/matrix.rs
Expand Up @@ -188,7 +188,7 @@ fn tr_mul_to(bench: &mut criterion::Criterion) {
let b = DVector::<f64>::new_random(1000);
let mut c = DVector::from_element(1000, 0.0);

bench.bench_function("", move |bh| bh.iter(|| a.tr_mul_to(&b, &mut c)));
bench.bench_function("tr_mul_to", move |bh| bh.iter(|| a.tr_mul_to(&b, &mut c)));
}

fn mat_mul_mat(bench: &mut criterion::Criterion) {
Expand Down
2 changes: 1 addition & 1 deletion benches/lib.rs
@@ -1,4 +1,4 @@
#![feature(test)]
#![feature(bench_black_box)]
#![allow(unused_macros)]

extern crate nalgebra as na;
Expand Down
1 change: 0 additions & 1 deletion benches/linalg/eigen.rs
@@ -1,4 +1,3 @@
use test::Bencher;
use na::{DMatrix, Eigen};

fn eigen_100x100(bh: &mut criterion::Criterion) {
Expand Down
2 changes: 1 addition & 1 deletion examples/cargo/Cargo.toml
Expand Up @@ -4,7 +4,7 @@ version = "0.0.0"
authors = [ "You" ]

[dependencies]
nalgebra = "0.26.0"
nalgebra = "0.27.0"

[[bin]]
name = "example"
Expand Down
8 changes: 4 additions & 4 deletions nalgebra-glm/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "nalgebra-glm"
version = "0.12.0"
version = "0.13.0"
authors = ["sebcrozet <developer@crozet.re>"]

description = "A computer-graphics oriented API for nalgebra, inspired by the C++ GLM library."
Expand All @@ -25,6 +25,6 @@ abomonation-serialize = [ "nalgebra/abomonation-serialize" ]

[dependencies]
num-traits = { version = "0.2", default-features = false }
approx = { version = "0.4", default-features = false }
simba = { version = "0.4", default-features = false }
nalgebra = { path = "..", version = "0.26", default-features = false }
approx = { version = "0.5", default-features = false }
simba = { version = "0.5", default-features = false }
nalgebra = { path = "..", version = "0.27", default-features = false }
16 changes: 8 additions & 8 deletions nalgebra-lapack/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "nalgebra-lapack"
version = "0.17.0"
version = "0.18.0"
authors = [ "Sébastien Crozet <developer@crozet.re>", "Andrew Straw <strawman@astraw.com>" ]

description = "Matrix decompositions using nalgebra matrices and Lapack bindings."
Expand Down Expand Up @@ -29,18 +29,18 @@ accelerate = ["lapack-src/accelerate"]
intel-mkl = ["lapack-src/intel-mkl"]

[dependencies]
nalgebra = { version = "0.26", path = ".." }
nalgebra = { version = "0.27", path = ".." }
num-traits = "0.2"
num-complex = { version = "0.3", default-features = false }
simba = "0.4"
num-complex = { version = "0.4", default-features = false }
simba = "0.5"
serde = { version = "1.0", features = [ "derive" ], optional = true }
lapack = { version = "0.17", default-features = false }
lapack-src = { version = "0.6", default-features = false }
lapack = { version = "0.19", default-features = false }
lapack-src = { version = "0.8", default-features = false }
# clippy = "*"

[dev-dependencies]
nalgebra = { version = "0.26", features = [ "arbitrary", "rand" ], path = ".." }
nalgebra = { version = "0.27", features = [ "arbitrary", "rand" ], path = ".." }
proptest = { version = "1", default-features = false, features = ["std"] }
quickcheck = "1"
approx = "0.4"
approx = "0.5"
rand = "0.8"
25 changes: 25 additions & 0 deletions nalgebra-macros/Cargo.toml
@@ -0,0 +1,25 @@
[package]
name = "nalgebra-macros"
version = "0.1.0"
authors = [ "Andreas Longva", "Sébastien Crozet <developer@crozet.re>" ]
edition = "2018"
description = "Procedural macros for nalgebra"
documentation = "https://www.nalgebra.org/docs"
homepage = "https://nalgebra.org"
repository = "https://github.com/dimforge/nalgebra"
readme = "../README.md"
categories = [ "science", "mathematics" ]
keywords = [ "linear", "algebra", "matrix", "vector", "math" ]
license = "Apache-2.0"

[lib]
proc-macro = true

[dependencies]
syn = { version="1.0", features = ["full"] }
quote = "1.0"
proc-macro2 = "1.0"

[dev-dependencies]
nalgebra = { version = "0.27.0", path = ".." }
trybuild = "1.0.42"

0 comments on commit c04b087

Please sign in to comment.