Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move segments of library to separate crates #164

Merged
merged 31 commits into from
Apr 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c124be5
Move traits to separate crate
hauleth Feb 15, 2016
4361521
Move num-macros to macros to fit new naming system
hauleth Feb 15, 2016
f1a8085
Extract integer module
hauleth Feb 17, 2016
2176b70
Extract bigint
hauleth Mar 1, 2016
54685c4
Extract rational
hauleth Mar 4, 2016
2a67a5b
Extract num-rational
hauleth Mar 10, 2016
ed07607
Extract complex
hauleth Mar 10, 2016
96e9166
Extract iter
hauleth Mar 11, 2016
7c0ab30
Fix subpackages metadata
hauleth Mar 11, 2016
72fa7ec
Reapply #167
hauleth Mar 11, 2016
956bb0f
Reapply ebed6756de732f959bbc72bbb9ec8c4e28b19143
hauleth Mar 25, 2016
b962e2b
Remove leftovers
hauleth Mar 25, 2016
37325ee
Remove unknown test flag
hauleth Mar 25, 2016
b73cfa5
traits: use `cast` items before `int`
cuviper Mar 25, 2016
529d763
num: use original num_foo crate names for imports
cuviper Mar 25, 2016
21a328a
bigint, rational: use std::hash only for testing
cuviper Mar 25, 2016
9d439e7
num: don't need std::hash even for testing
cuviper Mar 25, 2016
dac48aa
test_nightly.sh: update the macros path
cuviper Mar 25, 2016
e672d00
iter: update testing imports
cuviper Mar 25, 2016
8cb026e
complex: update testing imports and hash
cuviper Mar 25, 2016
0114559
Makefile: add complex and iter
cuviper Mar 25, 2016
8845ee1
integer: reapply the rest of #167
cuviper Mar 25, 2016
aebbc4f
bigint: fix and un-ignore the first doctest
cuviper Mar 26, 2016
03884fd
bigint: reapply #176
cuviper Mar 26, 2016
c9d82ac
test_features.sh: re-enable as a simple build
cuviper Mar 26, 2016
015cd0b
.travis.yml: add a verbose build
cuviper Mar 26, 2016
a423b39
.multirust.sh: use the subcrated "make test"
cuviper Mar 26, 2016
3d11940
Better descriptions for subcrates
hauleth Apr 10, 2016
8450782
Revert old `num` crate description
hauleth Apr 11, 2016
e59ead7
Add Serde crate to `num_bigint`
hauleth Apr 11, 2016
58b5fe5
Serializers dependencies
hauleth Apr 11, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .multirust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -ex
for toolchain in 1.0.0 beta nightly; do
run="multirust run $toolchain"
$run cargo build --verbose
$run cargo test --verbose
$run make test
$run .travis/test_features.sh
if [ $toolchain = nightly ]; then
$run .travis/test_nightly.sh
Expand Down
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ rust:
sudo: false
script:
- cargo build --verbose
- cargo test --verbose
- make test
- .travis/test_features.sh
- |
[ $TRAVIS_RUST_VERSION != nightly ] ||
.travis/test_nightly.sh
[ $TRAVIS_RUST_VERSION != nightly ] || .travis/test_nightly.sh
- cargo doc
after_success: |
[ $TRAVIS_BRANCH = master ] &&
Expand Down
2 changes: 0 additions & 2 deletions .travis/test_features.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ set -ex

for feature in '' bigint rational complex; do
cargo build --verbose --no-default-features --features="$feature"
cargo test --verbose --no-default-features --features="$feature"
done

2 changes: 1 addition & 1 deletion .travis/test_nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -ex

cargo bench --verbose

cargo test --verbose --manifest-path=num-macros/Cargo.toml
cargo test --verbose --manifest-path=macros/Cargo.toml
79 changes: 52 additions & 27 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,38 +1,63 @@
[package]

name = "num"
version = "0.1.31"
authors = ["The Rust Project Developers"]
license = "MIT/Apache-2.0"
homepage = "https:/rust-num/num"
repository = "https:/rust-num/num"
description = "A collection of numeric types and traits for Rust, including bigint,\ncomplex, rational, range iterators, generic integers, and more!\n"
documentation = "http://rust-num.github.io/num"
homepage = "https:/rust-num/num"
keywords = ["mathematics", "numerics"]
description = """
A collection of numeric types and traits for Rust, including bigint,
complex, rational, range iterators, generic integers, and more!
"""
license = "MIT/Apache-2.0"
repository = "https:/rust-num/num"
name = "num"
version = "0.1.31"

[[bench]]
name = "bigint"

[[bench]]
harness = false
name = "shootout-pidigits"

[dependencies]
rand = { version = "0.3.8", optional = true }
rustc-serialize = { version = "0.3.13", optional = true }
serde = { version = "^0.7.0", optional = true }

[dev-dependencies]
# Some tests of non-rand functionality still use rand because the tests
# themselves are randomized.
rand = { version = "0.3.8" }
[dependencies.num-bigint]
optional = true
path = "bigint"

[features]
[dependencies.num-complex]
optional = true
path = "complex"

complex = []
rational = []
bigint = []
default = ["bigint", "complex", "rand", "rational", "rustc-serialize"]
[dependencies.num-integer]
path = "./integer"

[[bench]]
name = "bigint"
[dependencies.num-iter]
optional = false
path = "iter"

[[bench]]
name = "shootout-pidigits"
harness = false
[dependencies.num-rational]
optional = true
path = "rational"

[dependencies.num-traits]
path = "./traits"

[dev-dependencies]

[dev-dependencies.rand]
version = "0.3.8"

[features]
bigint = ["num-bigint"]
complex = ["num-complex"]
rational = ["num-rational"]
default = ["bigint", "complex", "rational", "rustc-serialize"]

serde = [
"num-bigint/serde",
"num-complex/serde",
"num-rational/serde"
]
rustc-serialize = [
"num-bigint/rustc-serialize",
"num-complex/rustc-serialize",
"num-rational/rustc-serialize"
]
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CARGO_CMD ?= cargo

packages = bigint complex integer iter rational traits

test:
$(MAKE) run-all TASK="test"

run-all: $(packages)
$(CARGO_CMD) $(TASK)

$(packages):
$(CARGO_CMD) $(TASK) --manifest-path $@/Cargo.toml

.PHONY: $(packages) test
33 changes: 33 additions & 0 deletions bigint/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[package]
authors = ["The Rust Project Developers"]
description = "Big integer implementation for Rust"
documentation = "http://rust-num.github.io/num"
homepage = "https:/rust-num/num"
keywords = ["mathematics", "numerics"]
license = "MIT/Apache-2.0"
name = "num-bigint"
repository = "https:/rust-num/num"
version = "0.1.0"

[dependencies]

[dependencies.num-integer]
path = "../integer"

[dependencies.num-traits]
path = "../traits"

[dependencies.rand]
optional = true
version = "0.3.14"

[dependencies.rustc-serialize]
optional = true
version = "0.3.19"

[dependencies.serde]
optional = true
version = "0.7.0"

[features]
default = ["rand", "rustc-serialize"]
Loading