├── .gitignore ├── src └── main.rs ├── _typos.toml ├── assets ├── README.md └── juventus.csv ├── Cargo.lock ├── Cargo.toml ├── CHANGELOG.md ├── README.md ├── .github └── workflows │ └── build.yml ├── .pre-commit-config.yaml ├── cliff.toml └── deny.toml /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | println!("Hello, world!"); 3 | } 4 | -------------------------------------------------------------------------------- /_typos.toml: -------------------------------------------------------------------------------- 1 | [default.extend-words] 2 | 3 | [files] 4 | extend-exclude = ["CHANGELOG.md", "notebooks/*"] 5 | -------------------------------------------------------------------------------- /assets/README.md: -------------------------------------------------------------------------------- 1 | # Assets 2 | 3 | - [juventus.csv](./juventus.csv): dataset from [The-Football-Data](https://github.com/buckthorndev/The-Football-Data). 4 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "template" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines. 4 | 5 | --- 6 | ## [unreleased] 7 | 8 | ### Miscellaneous Chores 9 | 10 | - initialize basic structure for the repo - ([2436bec](https://github.com/tyrchen/qdrant-lib/commit/2436bec4a02caac64f6c1f97ca79b6ce745b4f53)) - Tyr Chen 11 | 12 | ### Other 13 | 14 | - init the project and add the assets - ([6a3ca0a](https://github.com/tyrchen/qdrant-lib/commit/6a3ca0a900451c55969cc8dec20afb5351d86599)) - Tyr Chen 15 | 16 | 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Geektime Rust 语言训练营 2 | 3 | ## 环境设置 4 | 5 | ### 安装 Rust 6 | 7 | ```bash 8 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh 9 | ``` 10 | 11 | ### 安装 VSCode 插件 12 | 13 | - crates: Rust 包管理 14 | - Even Better TOML: TOML 文件支持 15 | - Better Comments: 优化注释显示 16 | - Error Lens: 错误提示优化 17 | - GitLens: Git 增强 18 | - Github Copilot: 代码提示 19 | - indent-rainbow: 缩进显示优化 20 | - Prettier - Code formatter: 代码格式化 21 | - REST client: REST API 调试 22 | - rust-analyzer: Rust 语言支持 23 | - Rust Test lens: Rust 测试支持 24 | - Rust Test Explorer: Rust 测试概览 25 | - TODO Highlight: TODO 高亮 26 | - vscode-icons: 图标优化 27 | - YAML: YAML 文件支持 28 | 29 | ### 安装 cargo generate 30 | 31 | cargo generate 是一个用于生成项目模板的工具。它可以使用已有的 github repo 作为模版生成新的项目。 32 | 33 | ```bash 34 | cargo install cargo-generate 35 | ``` 36 | 37 | 在我们的课程中,新的项目会使用 `tyr-rust-bootcamp/template` 模版生成基本的代码: 38 | 39 | ```bash 40 | cargo generate tyr-rust-bootcamp/template 41 | ``` 42 | 43 | ### 安装 pre-commit 44 | 45 | pre-commit 是一个代码检查工具,可以在提交代码前进行代码检查。 46 | 47 | ```bash 48 | pipx install pre-commit 49 | ``` 50 | 51 | 安装成功后运行 `pre-commit install` 即可。 52 | 53 | ### 安装 Cargo deny 54 | 55 | Cargo deny 是一个 Cargo 插件,可以用于检查依赖的安全性。 56 | 57 | ```bash 58 | cargo install --locked cargo-deny 59 | ``` 60 | 61 | ### 安装 typos 62 | 63 | typos 是一个拼写检查工具。 64 | 65 | ```bash 66 | cargo install typos-cli 67 | ``` 68 | 69 | ### 安装 git cliff 70 | 71 | git cliff 是一个生成 changelog 的工具。 72 | 73 | ```bash 74 | cargo install git-cliff 75 | ``` 76 | 77 | ### 安装 cargo nextest 78 | 79 | cargo nextest 是一个 Rust 增强测试工具。 80 | 81 | ```bash 82 | cargo install cargo-nextest --locked 83 | ``` 84 | -------------------------------------------------------------------------------- /assets/juventus.csv: -------------------------------------------------------------------------------- 1 | Name,Position,DOB,Nationality,Kit Number 2 | Wojciech Szczesny,Goalkeeper,"Apr 18, 1990 (29)",Poland,1 3 | Mattia Perin,Goalkeeper,"Nov 10, 1992 (26)",Italy,37 4 | Gianluigi Buffon,Goalkeeper,"Jan 28, 1978 (41)",Italy,77 5 | Carlo Pinsoglio,Goalkeeper,"Mar 16, 1990 (29)",Italy,31 6 | Matthijs de Ligt,Centre-Back,"Aug 12, 1999 (20)",Netherlands,4 7 | Leonardo Bonucci,Centre-Back,"May 1, 1987 (32)",Italy,19 8 | Daniele Rugani,Centre-Back,"Jul 29, 1994 (25)",Italy,24 9 | Merih Demiral,Centre-Back,"Mar 5, 1998 (21)",Turkey,28 10 | Giorgio Chiellini,Centre-Back,"Aug 14, 1984 (35)",Italy,3 11 | Alex Sandro,Left-Back,"Jan 26, 1991 (28)",Brazil,12 12 | Danilo,Right-Back,"Jul 15, 1991 (28)",Brazil,13 13 | Mattia De Sciglio,Right-Back,"Oct 20, 1992 (27)",Italy,2 14 | Emre Can,Defensive Midfield,"Jan 12, 1994 (25)",Germany,23 15 | Miralem Pjanic,Central Midfield,"Apr 2, 1990 (29)",Bosnia-Herzegovina,5 16 | Aaron Ramsey,Central Midfield,"Dec 26, 1990 (28)",Wales,8 17 | Adrien Rabiot,Central Midfield,"Apr 3, 1995 (24)",France,25 18 | Rodrigo Bentancur,Central Midfield,"Jun 25, 1997 (22)",Uruguay,30 19 | Blaise Matuidi,Central Midfield,"Apr 9, 1987 (32)",France,14 20 | Sami Khedira,Central Midfield,"Apr 4, 1987 (32)",Germany,6 21 | Cristiano Ronaldo,Left Winger,"Feb 5, 1985 (34)",Portugal,7 22 | Marko Pjaca,Left Winger,"May 6, 1995 (24)",Croatia,15 23 | Federico Bernardeschi,Right Winger,"Feb 16, 1994 (25)",Italy,33 24 | Douglas Costa,Right Winger,"Sep 14, 1990 (29)",Brazil,11 25 | Juan Cuadrado,Right Winger,"May 26, 1988 (31)",Colombia,16 26 | Paulo Dybala,Second Striker,"Nov 15, 1993 (25)",Argentina,10 27 | Gonzalo Higuaín,Centre-Forward,"Dec 10, 1987 (31)",Argentina,21 28 | Mario Mandzukic,Centre-Forward,"May 21, 1986 (33)",Croatia,17 29 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | tags: 8 | - v* 9 | pull_request: 10 | branches: 11 | - master 12 | 13 | permissions: 14 | contents: write 15 | 16 | jobs: 17 | build-rust: 18 | strategy: 19 | matrix: 20 | platform: [ubuntu-latest] 21 | runs-on: ${{ matrix.platform }} 22 | steps: 23 | - uses: actions/checkout@v4 24 | with: 25 | fetch-depth: 0 26 | submodules: recursive 27 | - name: Install Rust 28 | run: rustup toolchain install stable --component llvm-tools-preview 29 | - name: Install cargo-llvm-cov 30 | uses: taiki-e/install-action@cargo-llvm-cov 31 | - name: install nextest 32 | uses: taiki-e/install-action@nextest 33 | - uses: Swatinem/rust-cache@v2 34 | - name: Check code format 35 | run: cargo fmt -- --check 36 | - name: Check the package for errors 37 | run: cargo check --all 38 | - name: Lint rust sources 39 | run: cargo clippy --all-targets --all-features --tests --benches -- -D warnings 40 | - name: Execute rust tests 41 | run: cargo nextest run --all-features 42 | - name: Generate a changelog 43 | uses: orhun/git-cliff-action@v2 44 | id: git-cliff 45 | if: startsWith(github.ref, 'refs/tags/') 46 | with: 47 | config: cliff.toml 48 | args: -vv --latest --strip header 49 | env: 50 | OUTPUT: CHANGES.md 51 | - name: Release 52 | uses: softprops/action-gh-release@v1 53 | if: startsWith(github.ref, 'refs/tags/') 54 | with: 55 | body: ${{ steps.git-cliff.outputs.content }} 56 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | fail_fast: false 2 | repos: 3 | - repo: https://github.com/pre-commit/pre-commit-hooks 4 | rev: v4.3.0 5 | hooks: 6 | - id: check-byte-order-marker 7 | - id: check-case-conflict 8 | - id: check-merge-conflict 9 | - id: check-symlinks 10 | - id: check-yaml 11 | - id: end-of-file-fixer 12 | - id: mixed-line-ending 13 | - id: trailing-whitespace 14 | - repo: https://github.com/psf/black 15 | rev: 22.10.0 16 | hooks: 17 | - id: black 18 | - repo: local 19 | hooks: 20 | - id: cargo-fmt 21 | name: cargo fmt 22 | description: Format files with rustfmt. 23 | entry: bash -c 'cargo fmt -- --check' 24 | language: rust 25 | files: \.rs$ 26 | args: [] 27 | - id: cargo-deny 28 | name: cargo deny check 29 | description: Check cargo dependencies 30 | entry: bash -c 'cargo deny check -d' 31 | language: rust 32 | files: \.rs$ 33 | args: [] 34 | - id: typos 35 | name: typos 36 | description: check typo 37 | entry: bash -c 'typos' 38 | language: rust 39 | files: \.*$ 40 | pass_filenames: false 41 | - id: cargo-check 42 | name: cargo check 43 | description: Check the package for errors. 44 | entry: bash -c 'cargo check --all' 45 | language: rust 46 | files: \.rs$ 47 | pass_filenames: false 48 | - id: cargo-clippy 49 | name: cargo clippy 50 | description: Lint rust sources 51 | entry: bash -c 'cargo clippy --all-targets --all-features --tests --benches -- -D warnings' 52 | language: rust 53 | files: \.rs$ 54 | pass_filenames: false 55 | - id: cargo-test 56 | name: cargo test 57 | description: unit test for the project 58 | entry: bash -c 'cargo nextest run --all-features' 59 | language: rust 60 | files: \.rs$ 61 | pass_filenames: false 62 | -------------------------------------------------------------------------------- /cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # changelog header 6 | header = """ 7 | # Changelog\n 8 | All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.\n 9 | """ 10 | # template for the changelog body 11 | # https://keats.github.io/tera/docs/#introduction 12 | body = """ 13 | --- 14 | {% if version %}\ 15 | {% if previous.version %}\ 16 | ## [{{ version | trim_start_matches(pat="v") }}]($REPO/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }} 17 | {% else %}\ 18 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 19 | {% endif %}\ 20 | {% else %}\ 21 | ## [unreleased] 22 | {% endif %}\ 23 | {% for group, commits in commits | group_by(attribute="group") %} 24 | ### {{ group | striptags | trim | upper_first }} 25 | {% for commit in commits 26 | | filter(attribute="scope") 27 | | sort(attribute="scope") %} 28 | - **({{commit.scope}})**{% if commit.breaking %} [**breaking**]{% endif %} \ 29 | {{ commit.message|trim }} - ([{{ commit.id | truncate(length=7, end="") }}]($REPO/commit/{{ commit.id }})) - {{ commit.author.name }} 30 | {%- endfor -%} 31 | {% raw %}\n{% endraw %}\ 32 | {%- for commit in commits %} 33 | {%- if commit.scope -%} 34 | {% else -%} 35 | - {% if commit.breaking %} [**breaking**]{% endif %}\ 36 | {{ commit.message|trim }} - ([{{ commit.id | truncate(length=7, end="") }}]($REPO/commit/{{ commit.id }})) - {{ commit.author.name }} 37 | {% endif -%} 38 | {% endfor -%} 39 | {% endfor %}\n 40 | """ 41 | # template for the changelog footer 42 | footer = """ 43 | 44 | """ 45 | # remove the leading and trailing whitespace from the templates 46 | trim = true 47 | # postprocessors 48 | postprocessors = [ 49 | { pattern = '\$REPO', replace = "https://github.com/tyrchen/geektime-rust-live-coding" }, # replace repository URL 50 | ] 51 | 52 | [git] 53 | # parse the commits based on https://www.conventionalcommits.org 54 | conventional_commits = true 55 | # filter out the commits that are not conventional 56 | filter_unconventional = false 57 | # process each line of a commit as an individual commit 58 | split_commits = false 59 | # regex for preprocessing the commit messages 60 | commit_preprocessors = [ 61 | # { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/orhun/git-cliff/issues/${2}))"}, # replace issue numbers 62 | ] 63 | # regex for parsing and grouping commits 64 | commit_parsers = [ 65 | { message = "\\[skip", skip = true }, 66 | { message = "\\p{Han}", skip = true }, 67 | { message = "^feat", group = "Features" }, 68 | { message = "^fix", group = "Bug Fixes" }, 69 | { message = "^doc", group = "Documentation" }, 70 | { message = "^perf", group = "Performance" }, 71 | { message = "^refactor", group = "Refactoring" }, 72 | { message = "^style", group = "Style" }, 73 | { message = "^revert", group = "Revert" }, 74 | { message = "^test", group = "Tests" }, 75 | { message = "^chore\\(version\\):", skip = true }, 76 | { message = "^chore", group = "Miscellaneous Chores" }, 77 | { message = ".*", group = "Other" }, 78 | { body = ".*security", group = "Security" }, 79 | ] 80 | # protect breaking changes from being skipped due to matching a skipping commit_parser 81 | protect_breaking_commits = false 82 | # filter out the commits that are not matched by commit parsers 83 | filter_commits = false 84 | # regex for matching git tags 85 | tag_pattern = "v[0-9].*" 86 | # regex for skipping tags 87 | skip_tags = "v0.1.0-beta.1" 88 | # regex for ignoring tags 89 | ignore_tags = "" 90 | # sort the tags topologically 91 | topo_order = false 92 | # sort the commits inside sections by oldest/newest order 93 | sort_commits = "oldest" 94 | # limit the number of commits included in the changelog. 95 | # limit_commits = 42 96 | -------------------------------------------------------------------------------- /deny.toml: -------------------------------------------------------------------------------- 1 | # This template contains all of the possible sections and their default values 2 | 3 | # Note that all fields that take a lint level have these possible values: 4 | # * deny - An error will be produced and the check will fail 5 | # * warn - A warning will be produced, but the check will not fail 6 | # * allow - No warning or error will be produced, though in some cases a note 7 | # will be 8 | 9 | # The values provided in this template are the default values that will be used 10 | # when any section or field is not specified in your own configuration 11 | 12 | # If 1 or more target triples (and optionally, target_features) are specified, 13 | # only the specified targets will be checked when running `cargo deny check`. 14 | # This means, if a particular package is only ever used as a target specific 15 | # dependency, such as, for example, the `nix` crate only being used via the 16 | # `target_family = "unix"` configuration, that only having windows targets in 17 | # this list would mean the nix crate, as well as any of its exclusive 18 | # dependencies not shared by any other crates, would be ignored, as the target 19 | # list here is effectively saying which targets you are building for. 20 | targets = [ 21 | # The triple can be any string, but only the target triples built in to 22 | # rustc (as of 1.40) can be checked against actual config expressions 23 | #{ triple = "x86_64-unknown-linux-musl" }, 24 | # You can also specify which target_features you promise are enabled for a 25 | # particular target. target_features are currently not validated against 26 | # the actual valid features supported by the target architecture. 27 | #{ triple = "wasm32-unknown-unknown", features = ["atomics"] }, 28 | ] 29 | 30 | # This section is considered when running `cargo deny check advisories` 31 | # More documentation for the advisories section can be found here: 32 | # https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html 33 | [advisories] 34 | # The path where the advisory database is cloned/fetched into 35 | db-path = "~/.cargo/advisory-db" 36 | # The url(s) of the advisory databases to use 37 | db-urls = ["https://github.com/rustsec/advisory-db"] 38 | # The lint level for security vulnerabilities 39 | vulnerability = "deny" 40 | # The lint level for unmaintained crates 41 | unmaintained = "warn" 42 | # The lint level for crates that have been yanked from their source registry 43 | yanked = "warn" 44 | # The lint level for crates with security notices. Note that as of 45 | # 2019-12-17 there are no security notice advisories in 46 | # https://github.com/rustsec/advisory-db 47 | notice = "warn" 48 | # A list of advisory IDs to ignore. Note that ignored advisories will still 49 | # output a note when they are encountered. 50 | ignore = [ 51 | #"RUSTSEC-0000-0000", 52 | ] 53 | # Threshold for security vulnerabilities, any vulnerability with a CVSS score 54 | # lower than the range specified will be ignored. Note that ignored advisories 55 | # will still output a note when they are encountered. 56 | # * None - CVSS Score 0.0 57 | # * Low - CVSS Score 0.1 - 3.9 58 | # * Medium - CVSS Score 4.0 - 6.9 59 | # * High - CVSS Score 7.0 - 8.9 60 | # * Critical - CVSS Score 9.0 - 10.0 61 | #severity-threshold = 62 | 63 | # This section is considered when running `cargo deny check licenses` 64 | # More documentation for the licenses section can be found here: 65 | # https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html 66 | [licenses] 67 | # The lint level for crates which do not have a detectable license 68 | unlicensed = "allow" 69 | # List of explicitly allowed licenses 70 | # See https://spdx.org/licenses/ for list of possible licenses 71 | # [possible values: any SPDX 3.7 short identifier (+ optional exception)]. 72 | allow = [ 73 | "MIT", 74 | "Apache-2.0", 75 | "Unicode-DFS-2016", 76 | "MPL-2.0", 77 | "BSD-2-Clause", 78 | "BSD-3-Clause", 79 | "ISC", 80 | "CC0-1.0", 81 | ] 82 | # List of explicitly disallowed licenses 83 | # See https://spdx.org/licenses/ for list of possible licenses 84 | # [possible values: any SPDX 3.7 short identifier (+ optional exception)]. 85 | deny = [ 86 | #"Nokia", 87 | ] 88 | # Lint level for licenses considered copyleft 89 | copyleft = "warn" 90 | # Blanket approval or denial for OSI-approved or FSF Free/Libre licenses 91 | # * both - The license will be approved if it is both OSI-approved *AND* FSF 92 | # * either - The license will be approved if it is either OSI-approved *OR* FSF 93 | # * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF 94 | # * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved 95 | # * neither - This predicate is ignored and the default lint level is used 96 | allow-osi-fsf-free = "neither" 97 | # Lint level used when no other predicates are matched 98 | # 1. License isn't in the allow or deny lists 99 | # 2. License isn't copyleft 100 | # 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither" 101 | default = "deny" 102 | # The confidence threshold for detecting a license from license text. 103 | # The higher the value, the more closely the license text must be to the 104 | # canonical license text of a valid SPDX license file. 105 | # [possible values: any between 0.0 and 1.0]. 106 | confidence-threshold = 0.8 107 | # Allow 1 or more licenses on a per-crate basis, so that particular licenses 108 | # aren't accepted for every possible crate as with the normal allow list 109 | exceptions = [ 110 | # Each entry is the crate and version constraint, and its specific allow 111 | # list 112 | #{ allow = ["Zlib"], name = "adler32", version = "*" }, 113 | ] 114 | 115 | # Some crates don't have (easily) machine readable licensing information, 116 | # adding a clarification entry for it allows you to manually specify the 117 | # licensing information 118 | #[[licenses.clarify]] 119 | # The name of the crate the clarification applies to 120 | #name = "ring" 121 | # The optional version constraint for the crate 122 | #version = "*" 123 | # The SPDX expression for the license requirements of the crate 124 | #expression = "MIT AND ISC AND OpenSSL" 125 | # One or more files in the crate's source used as the "source of truth" for 126 | # the license expression. If the contents match, the clarification will be used 127 | # when running the license check, otherwise the clarification will be ignored 128 | # and the crate will be checked normally, which may produce warnings or errors 129 | # depending on the rest of your configuration 130 | #license-files = [ 131 | # Each entry is a crate relative path, and the (opaque) hash of its contents 132 | #{ path = "LICENSE", hash = 0xbd0eed23 } 133 | #] 134 | 135 | [licenses.private] 136 | # If true, ignores workspace crates that aren't published, or are only 137 | # published to private registries 138 | ignore = false 139 | # One or more private registries that you might publish crates to, if a crate 140 | # is only published to private registries, and ignore is true, the crate will 141 | # not have its license(s) checked 142 | registries = [ 143 | #"https://sekretz.com/registry 144 | ] 145 | 146 | # This section is considered when running `cargo deny check bans`. 147 | # More documentation about the 'bans' section can be found here: 148 | # https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html 149 | [bans] 150 | # Lint level for when multiple versions of the same crate are detected 151 | multiple-versions = "warn" 152 | # Lint level for when a crate version requirement is `*` 153 | wildcards = "allow" 154 | # The graph highlighting used when creating dotgraphs for crates 155 | # with multiple versions 156 | # * lowest-version - The path to the lowest versioned duplicate is highlighted 157 | # * simplest-path - The path to the version with the fewest edges is highlighted 158 | # * all - Both lowest-version and simplest-path are used 159 | highlight = "all" 160 | # List of crates that are allowed. Use with care! 161 | allow = [ 162 | #{ name = "ansi_term", version = "=0.11.0" }, 163 | ] 164 | # List of crates to deny 165 | deny = [ 166 | # Each entry the name of a crate and a version range. If version is 167 | # not specified, all versions will be matched. 168 | #{ name = "ansi_term", version = "=0.11.0" }, 169 | # 170 | # Wrapper crates can optionally be specified to allow the crate when it 171 | # is a direct dependency of the otherwise banned crate 172 | #{ name = "ansi_term", version = "=0.11.0", wrappers = [] }, 173 | ] 174 | # Certain crates/versions that will be skipped when doing duplicate detection. 175 | skip = [ 176 | #{ name = "ansi_term", version = "=0.11.0" }, 177 | ] 178 | # Similarly to `skip` allows you to skip certain crates during duplicate 179 | # detection. Unlike skip, it also includes the entire tree of transitive 180 | # dependencies starting at the specified crate, up to a certain depth, which is 181 | # by default infinite 182 | skip-tree = [ 183 | #{ name = "ansi_term", version = "=0.11.0", depth = 20 }, 184 | ] 185 | 186 | # This section is considered when running `cargo deny check sources`. 187 | # More documentation about the 'sources' section can be found here: 188 | # https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html 189 | [sources] 190 | # Lint level for what to happen when a crate from a crate registry that is not 191 | # in the allow list is encountered 192 | unknown-registry = "warn" 193 | # Lint level for what to happen when a crate from a git repository that is not 194 | # in the allow list is encountered 195 | unknown-git = "warn" 196 | # List of URLs for allowed crate registries. Defaults to the crates.io index 197 | # if not specified. If it is specified but empty, no registries are allowed. 198 | allow-registry = ["https://github.com/rust-lang/crates.io-index"] 199 | # List of URLs for allowed Git repositories 200 | allow-git = [] 201 | 202 | [sources.allow-org] 203 | # 1 or more github.com organizations to allow git sources for 204 | github = [] 205 | # 1 or more gitlab.com organizations to allow git sources for 206 | gitlab = [] 207 | # 1 or more bitbucket.org organizations to allow git sources for 208 | bitbucket = [] 209 | --------------------------------------------------------------------------------