diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..60df070 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,44 @@ +# Build + +You can build and test the code with [cargo] command. + +If you want to build for only bytes <-> Bencodex: + +``` +cargo build +``` + +If you want to build JSON feature too: + +``` +cargo build --features JSON +``` + +If you want to build JSON CLI tool too: + +``` +cargo build --features json-cli +``` + +# Test + +If you want to test: + +``` +cargo test --features test +``` + +If you want to test JSON-related tests too: + +``` +cargo test --features test,json +``` + +# Format + +``` +cargo fmt +cargo clippy +``` + +[cargo]: https://github.com/rust-lang/cargo/ diff --git a/README.md b/README.md index fcbaebf..1aa592c 100644 --- a/README.md +++ b/README.md @@ -94,21 +94,3 @@ $ echo -n '"123"' | bencodex -d $ echo -n 'null' | bencodex -d n ``` - -## Building and Testing - -You can build and test the code with [cargo] command. - -If you want to build: - -``` -cargo build -``` - -If you want to test: - -``` -cargo test --features test -``` - -[cargo]: https://github.com/rust-lang/cargo/