From 43c83378b37544f5316e00909e91f59dd2b20599 Mon Sep 17 00:00:00 2001 From: "zongxiong.chen" Date: Tue, 24 Nov 2020 15:11:18 +0100 Subject: [PATCH] Add .editorconfig --- .editorconfig | 22 ++++++++++++++++++++++ Cargo.toml | 49 +++++++++++++++++++++++++++++++++++++++++++++---- README.md | 14 +++++++++++++- scripts/init.sh | 4 ++-- 4 files changed, 82 insertions(+), 7 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..4a9b139 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,22 @@ +root = true +[*.rs] +indent_style=tab +indent_size=tab +tab_width=4 +end_of_line=lf +charset=utf-8 +trim_trailing_whitespace=true +max_line_length=100 +insert_final_newline=true + +[*.yml] +indent_style=space +indent_size=2 +tab_width=8 +end_of_line=lf + +[*.sh] +indent_style=space +indent_size=2 +tab_width=8 +end_of_line=lf diff --git a/Cargo.toml b/Cargo.toml index ff23e1f..732c62d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,51 @@ -[profile.release] -panic = 'unwind' - [workspace] members = [ 'node', 'pallets/account-linker', - 'pallets/offchain-worker', + 'pallets/offchain-worker', 'runtime', ] + +[profile.dev] +opt-level = 0 +debug = true +debug-assertions = true +overflow-checks = true +lto = false +panic = 'unwind' +incremental = true +codegen-units = 256 +rpath = false + +[profile.test] +opt-level = 0 +debug = 2 +debug-assertions = true +overflow-checks = true +lto = false +panic = 'unwind' # This setting is always ignored. +incremental = true +codegen-units = 256 +rpath = false + +[profile.bench] +opt-level = 3 +debug = false +debug-assertions = false +overflow-checks = false +lto = false +panic = 'unwind' # This setting is always ignored. +incremental = false +codegen-units = 16 +rpath = false + +[profile.release] +opt-level = 3 +debug = false +debug-assertions = false +overflow-checks = false +lto = false +panic = 'unwind' +incremental = false +codegen-units = 16 +rpath = false diff --git a/README.md b/README.md index d580fa3..50dbbd8 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,16 @@ Litentry node built with Substrate. ## License -Apache-2.0 \ No newline at end of file +Apache-2.0 + + +## Set up + ``` + rustup default nightly-2020-10-06 + ``` + + ``` + cargo build + ``` +## Useful links + [rustfmt configurations](https://github.com/rust-lang/rustfmt/blob/master/Configurations.md) diff --git a/scripts/init.sh b/scripts/init.sh index 1405a41..ee84519 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -5,8 +5,8 @@ set -e echo "*** Initializing WASM build environment" if [ -z $CI_PROJECT_NAME ] ; then - rustup update nightly - rustup update stable + rustup update nightly + rustup update stable fi rustup target add wasm32-unknown-unknown --toolchain nightly