Place ff_derive re-exports behind a feature

Part of #3.
This commit is contained in:
Jack Grigg
2018-07-02 21:08:24 +01:00
parent 002173e187
commit 69ce66ae6c
3 changed files with 12 additions and 1 deletions

View File

@@ -21,6 +21,15 @@ The `ff` crate contains `Field`, `PrimeField`, `PrimeFieldRepr` and `SqrtField`
If you need an implementation of a prime field, this library also provides a procedural macro that will expand into an efficient implementation of a prime field when supplied with the modulus. `PrimeFieldGenerator` must be an element of Fp of p-1 order, that is also quadratic nonresidue.
First, enable the `derive` crate feature:
```toml
[dependencies]
ff = { version = "0.3", features = ["derive"] }
```
And then use the macro like so:
```rust
extern crate rand;
#[macro_use]