Made server optional.
diff --git a/lib/rs/Cargo.toml b/lib/rs/Cargo.toml
index 610e781..a32d671 100644
--- a/lib/rs/Cargo.toml
+++ b/lib/rs/Cargo.toml
@@ -15,6 +15,10 @@
 [dependencies]
 byteorder = "1.3"
 integer-encoding = "3.0"
-log = "0.4"
+log = {version = "0.4", optional = true}
 ordered-float = "1.0"
-threadpool = "1.7"
+threadpool = {version = "1.7", optional = true}
+
+[features]
+default = ["server"]
+server = ["threadpool", "log"]
diff --git a/lib/rs/src/lib.rs b/lib/rs/src/lib.rs
index ddc7b0d..84c1f9b 100644
--- a/lib/rs/src/lib.rs
+++ b/lib/rs/src/lib.rs
@@ -71,6 +71,8 @@
 }
 
 pub mod protocol;
+
+#[cfg(feature = "server")]
 pub mod server;
 pub mod transport;