Repository: ergoplatform/sigma-rust (language: rust)

Issue:
Make “with-serde” into an opt-out feature
Most of the users will probably want it enabled. 
Include it in default features.


Discussion / hints:

Fix patch:
diff --git a/.travis.yml b/.travis.yml
index 53154a7ae..851d5e07e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -85,11 +85,11 @@ matrix:
         - xcodebuild -project ./ErgoWallet.xcodeproj -xcconfig ./Config/Release.xcconfig -sdk iphoneos
         - xcodebuild -project ./ErgoWallet.xcodeproj -xcconfig ./Config/Release.xcconfig -sdk iphonesimulator
 
-    - name: test sigma-tree with default features
+    - name: test sigma-tree without default features
       rust: stable
       script:
         - cd sigma-tree
-        - cargo test --verbose
+        - cargo build --no-default-features
 
 
 
diff --git a/Cargo.toml b/Cargo.toml
index c6d6d856b..cb9fc3ab6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,5 +6,4 @@ members = [
     "bindings/ergo-wallet-lib-c-core",
     "bindings/ergo-wallet-lib-c",
     "bindings/ergo-wallet-lib-android",
-    "sigma-testutil",
 ]
diff --git a/bindings/ergo-wallet-lib-wasm/Cargo.toml b/bindings/ergo-wallet-lib-wasm/Cargo.toml
index cb6ddaf3e..b5da0c412 100644
--- a/bindings/ergo-wallet-lib-wasm/Cargo.toml
+++ b/bindings/ergo-wallet-lib-wasm/Cargo.toml
@@ -16,7 +16,7 @@ serde = { version = "1.0", features = ["derive"]}
 serde_json = "1.0"
 js-sys = "0.3"
 
-sigma-tree = { path = "../../sigma-tree", features = ["with-serde"] }
+sigma-tree = { path = "../../sigma-tree" }
 # used in elliptic-curve(in sigma-tree), compiled here with WASM support
 getrandom = {version = "0.1", features = ["wasm-bindgen"]}
 # The `console_error_panic_hook` crate provides better debugging of panics by
@@ -32,7 +32,6 @@ features = ["serde-serialize"]
 [dev-dependencies]
 wasm-bindgen-test = "0.3.10"
 proptest-derive = "0.2"
-sigma-testutil = { path = "../../sigma-testutil" }
 
 [dev-dependencies.proptest]
 # wasm support, via https://altsysrq.github.io/proptest-book/proptest/wasm.html
diff --git a/sigma-tree/Cargo.toml b/sigma-tree/Cargo.toml
index e52acdded..ab28ee43b 100644
--- a/sigma-tree/Cargo.toml
+++ b/sigma-tree/Cargo.toml
@@ -21,18 +21,13 @@ bs58 = "0.3.1"
 num-bigint = "0.3.0"
 rand = "0.7"
 
-[dependencies.num-traits]
-version = "0.2"
-default-features = false
-
 [features]
-default = []
+default = ["with-serde"]
 with-serde = ["serde"]
 
 [dev-dependencies]
 wasm-bindgen-test = "0.3.10"
 proptest-derive = "0.2"
-# sigma-testutil = { path = "../sigma-testutil"}
 rand = "0.7.3"
 
 [dev-dependencies.proptest]


Test patch:
diff --git a/sigma-testutil/Cargo.toml b/sigma-testutil/Cargo.toml
deleted file mode 100644
index 0874ae360..000000000
--- a/sigma-testutil/Cargo.toml
+++ /dev/null
@@ -1,28 +0,0 @@
-[package]
-name = "sigma-testutil"
-version = "0.1.0"
-authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
-edition = "2018"
-
-[lib]
-crate-type = ["cdylib", "rlib"]
-
-[dependencies]
-sigma-tree = { path = "../sigma-tree" }
-
-[dependencies.proptest]
-# wasm support, via https://altsysrq.github.io/proptest-book/proptest/wasm.html
-version = "0.10"
-# The default feature set includes things like process forking which are not
-# supported in Web Assembly.
-default-features = false
-# Enable using the `std` crate.
-features = ["std"]
-
-[dev-dependencies]
-wasm-bindgen-test = "0.3.10"
-proptest-derive = "0.2"
-
-[profile.release]
-# Tell `rustc` to optimize for small code size.
-opt-level = "s"
diff --git a/sigma-testutil/src/generator.rs b/sigma-testutil/src/generator.rs
deleted file mode 100644
index 3add5aee7..000000000
--- a/sigma-testutil/src/generator.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-use sigma_tree::ErgoTree;
-
-#[derive(Debug)]
-pub struct ErgoTreeArb(pub ErgoTree);
diff --git a/sigma-testutil/src/lib.rs b/sigma-testutil/src/lib.rs
deleted file mode 100644
index b3acf8045..000000000
--- a/sigma-testutil/src/lib.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-//! test utilities
-
-// Coding conventions
-#![forbid(unsafe_code)]
-#![deny(non_upper_case_globals)]
-#![deny(non_camel_case_types)]
-#![deny(non_snake_case)]
-#![deny(unused_mut)]
-#![deny(dead_code)]
-#![deny(unused_imports)]
-#![deny(missing_docs)]
-
-#[doc(hidden)]
-pub mod generator;