bencode-rs 0.0.4__tar.gz → 0.0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bencode_rs-0.0.7/.github/renovate.json +13 -0
- bencode_rs-0.0.7/.github/workflows/_build_wheels.yaml +95 -0
- bencode_rs-0.0.7/.github/workflows/ci.yaml +159 -0
- {bencode_rs-0.0.4 → bencode_rs-0.0.7}/.github/workflows/release.yaml +4 -4
- bencode_rs-0.0.7/.pre-commit-config.yaml +27 -0
- bencode_rs-0.0.7/Cargo.lock +267 -0
- bencode_rs-0.0.7/Cargo.toml +16 -0
- {bencode_rs-0.0.4 → bencode_rs-0.0.7}/PKG-INFO +4 -4
- {bencode_rs-0.0.4 → bencode_rs-0.0.7}/leak.py +55 -43
- {bencode_rs-0.0.4 → bencode_rs-0.0.7/py}/bencode_rs/__init__.py +8 -8
- {bencode_rs-0.0.4 → bencode_rs-0.0.7/py}/bencode_rs/__init__.pyi +7 -7
- bencode_rs-0.0.7/py/bencode_rs/py.typed +0 -0
- {bencode_rs-0.0.4 → bencode_rs-0.0.7}/pyproject.toml +5 -4
- bencode_rs-0.0.7/requirements.txt +10 -0
- bencode_rs-0.0.7/rust-toolchain.toml +4 -0
- {bencode_rs-0.0.4 → bencode_rs-0.0.7}/rustfmt.toml +12 -12
- {bencode_rs-0.0.4 → bencode_rs-0.0.7}/src/decode.rs +87 -51
- bencode_rs-0.0.7/src/encode.rs +350 -0
- {bencode_rs-0.0.4 → bencode_rs-0.0.7}/src/lib.rs +7 -8
- bencode_rs-0.0.7/tests/bench.py +45 -0
- bencode_rs-0.0.7/tests/test_1_encode.py +243 -0
- {bencode_rs-0.0.4 → bencode_rs-0.0.7}/tests/test_2_decode.py +93 -138
- bencode_rs-0.0.4/.github/renovate.json +0 -6
- bencode_rs-0.0.4/.github/workflows/_build_wheels.yaml +0 -118
- bencode_rs-0.0.4/.github/workflows/ci.yaml +0 -79
- bencode_rs-0.0.4/Cargo.lock +0 -317
- bencode_rs-0.0.4/Cargo.toml +0 -19
- bencode_rs-0.0.4/requirements.txt +0 -8
- bencode_rs-0.0.4/src/encode.rs +0 -240
- bencode_rs-0.0.4/tests/test_1_encode.py +0 -159
- {bencode_rs-0.0.4 → bencode_rs-0.0.7}/.coveragerc +0 -0
- {bencode_rs-0.0.4 → bencode_rs-0.0.7}/.gitattributes +0 -0
- {bencode_rs-0.0.4 → bencode_rs-0.0.7}/.gitignore +0 -0
- {bencode_rs-0.0.4 → bencode_rs-0.0.7}/LICENSE +0 -0
- {bencode_rs-0.0.4 → bencode_rs-0.0.7}/readme.md +0 -0
- {bencode_rs-0.0.4 → bencode_rs-0.0.7}/tests/fixtures/56507.torrent.bin +0 -0
- {bencode_rs-0.0.4 → bencode_rs-0.0.7}/tests/fixtures/ubuntu-22.04.2-desktop-amd64.iso.torrent.bin +0 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: Reusable workflow example
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
sdist:
|
|
8
|
+
runs-on: ubuntu-24.04
|
|
9
|
+
steps:
|
|
10
|
+
- uses: actions/checkout@v4
|
|
11
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
12
|
+
uses: actions/setup-python@v5
|
|
13
|
+
with:
|
|
14
|
+
python-version: "3.x"
|
|
15
|
+
- name: Build sdist
|
|
16
|
+
uses: PyO3/maturin-action@v1
|
|
17
|
+
with:
|
|
18
|
+
command: sdist
|
|
19
|
+
args: --out dist
|
|
20
|
+
- name: Upload sdist
|
|
21
|
+
uses: actions/upload-artifact@v4
|
|
22
|
+
with:
|
|
23
|
+
name: wheels-sdist
|
|
24
|
+
path: dist
|
|
25
|
+
|
|
26
|
+
wheel:
|
|
27
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
28
|
+
strategy:
|
|
29
|
+
fail-fast: false
|
|
30
|
+
matrix:
|
|
31
|
+
platform:
|
|
32
|
+
- runner: macos-13
|
|
33
|
+
target: x86_64
|
|
34
|
+
py: x64
|
|
35
|
+
|
|
36
|
+
- runner: macos-14
|
|
37
|
+
target: aarch64
|
|
38
|
+
py: arm64
|
|
39
|
+
|
|
40
|
+
- runner: windows-latest
|
|
41
|
+
target: x64
|
|
42
|
+
py: x64
|
|
43
|
+
|
|
44
|
+
- runner: windows-latest
|
|
45
|
+
target: x86
|
|
46
|
+
py: x86
|
|
47
|
+
|
|
48
|
+
- runner: ubuntu-24.04
|
|
49
|
+
target: x86_64
|
|
50
|
+
- runner: ubuntu-24.04
|
|
51
|
+
target: x86
|
|
52
|
+
- runner: ubuntu-24.04
|
|
53
|
+
target: aarch64
|
|
54
|
+
- runner: ubuntu-24.04
|
|
55
|
+
target: armv7
|
|
56
|
+
- runner: ubuntu-24.04
|
|
57
|
+
target: s390x
|
|
58
|
+
- runner: ubuntu-24.04
|
|
59
|
+
target: ppc64le
|
|
60
|
+
|
|
61
|
+
steps:
|
|
62
|
+
- uses: actions/checkout@v4
|
|
63
|
+
|
|
64
|
+
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
65
|
+
if: ${{ runner.os != 'Linux' }}
|
|
66
|
+
|
|
67
|
+
- uses: actions/setup-python@v5
|
|
68
|
+
if: ${{ runner.os != 'Linux' }}
|
|
69
|
+
with:
|
|
70
|
+
python-version: "3.x"
|
|
71
|
+
architecture: ${{ matrix.platform.py }}
|
|
72
|
+
|
|
73
|
+
- name: Build wheels
|
|
74
|
+
uses: PyO3/maturin-action@v1
|
|
75
|
+
with:
|
|
76
|
+
target: ${{ matrix.platform.target }}
|
|
77
|
+
args: --release --out dist
|
|
78
|
+
sccache: "true"
|
|
79
|
+
manylinux: auto
|
|
80
|
+
|
|
81
|
+
- name: Upload wheels
|
|
82
|
+
uses: actions/upload-artifact@v4
|
|
83
|
+
with:
|
|
84
|
+
name: wheels-${{ runner.os }}-${{ matrix.platform.target }}
|
|
85
|
+
path: dist
|
|
86
|
+
|
|
87
|
+
merge-wheel-artifact:
|
|
88
|
+
runs-on: ubuntu-24.04
|
|
89
|
+
needs: ["sdist", "wheel"]
|
|
90
|
+
steps:
|
|
91
|
+
- name: Merge Artifacts
|
|
92
|
+
uses: actions/upload-artifact/merge@v4
|
|
93
|
+
with:
|
|
94
|
+
name: wheel
|
|
95
|
+
pattern: wheels-*
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
push:
|
|
9
|
+
branches:
|
|
10
|
+
- master
|
|
11
|
+
tags-ignore:
|
|
12
|
+
- "*"
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build:
|
|
16
|
+
concurrency:
|
|
17
|
+
group: "${{ github.workflow }}-${{ github.ref }}"
|
|
18
|
+
cancel-in-progress: true
|
|
19
|
+
uses: ./.github/workflows/_build_wheels.yaml
|
|
20
|
+
|
|
21
|
+
cargo-fmt:
|
|
22
|
+
runs-on: ubuntu-24.04
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
26
|
+
with:
|
|
27
|
+
components: rustfmt,clippy
|
|
28
|
+
- run: cargo fmt --check --all
|
|
29
|
+
- run: cargo clippy
|
|
30
|
+
|
|
31
|
+
test:
|
|
32
|
+
strategy:
|
|
33
|
+
matrix:
|
|
34
|
+
os: ["ubuntu-24.04", "macos-13", "macos-14", "windows-latest"]
|
|
35
|
+
python-version:
|
|
36
|
+
- "3.10"
|
|
37
|
+
- "3.11"
|
|
38
|
+
- "3.12"
|
|
39
|
+
- "3.13"
|
|
40
|
+
|
|
41
|
+
runs-on: "${{ matrix.os }}"
|
|
42
|
+
|
|
43
|
+
needs: [build]
|
|
44
|
+
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v4
|
|
47
|
+
- uses: actions/download-artifact@v4.1.8
|
|
48
|
+
with:
|
|
49
|
+
name: wheel
|
|
50
|
+
path: dist
|
|
51
|
+
|
|
52
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
53
|
+
uses: actions/setup-python@v5
|
|
54
|
+
with:
|
|
55
|
+
python-version: ${{ matrix.python-version }}
|
|
56
|
+
cache: "pip" # caching pip dependencies
|
|
57
|
+
|
|
58
|
+
- run: python -m pip install -U pip
|
|
59
|
+
- run: pip install bencode-rs --no-index --find-link ./dist/
|
|
60
|
+
- run: pip install -r requirements.txt
|
|
61
|
+
|
|
62
|
+
- run: pytest -sv
|
|
63
|
+
env:
|
|
64
|
+
RUST_BACKTRACE: 'full'
|
|
65
|
+
|
|
66
|
+
bench-cp:
|
|
67
|
+
strategy:
|
|
68
|
+
matrix:
|
|
69
|
+
python-version:
|
|
70
|
+
- "3.10"
|
|
71
|
+
|
|
72
|
+
runs-on: "ubuntu-24.04"
|
|
73
|
+
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@v4
|
|
76
|
+
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
77
|
+
|
|
78
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
79
|
+
uses: actions/setup-python@v5
|
|
80
|
+
with:
|
|
81
|
+
python-version: ${{ matrix.python-version }}
|
|
82
|
+
cache: "pip"
|
|
83
|
+
|
|
84
|
+
- run: pip install -r requirements.txt
|
|
85
|
+
- run: maturin build --release --out dist
|
|
86
|
+
- run: pip install bencode-rs --no-index --find-links ./dist/
|
|
87
|
+
|
|
88
|
+
- name: Run benchmarks
|
|
89
|
+
uses: CodSpeedHQ/action@v3
|
|
90
|
+
with:
|
|
91
|
+
token: ${{ secrets.CODSPEED_TOKEN }}
|
|
92
|
+
run: python -m pytest tests/bench.py --codspeed
|
|
93
|
+
|
|
94
|
+
audit:
|
|
95
|
+
name: Audit
|
|
96
|
+
needs: [build]
|
|
97
|
+
runs-on: ubuntu-24.04
|
|
98
|
+
steps:
|
|
99
|
+
- uses: actions/checkout@v4
|
|
100
|
+
|
|
101
|
+
- uses: actions/setup-python@v5
|
|
102
|
+
with:
|
|
103
|
+
python-version: "3.x"
|
|
104
|
+
cache: "pip" # caching pip dependencies
|
|
105
|
+
|
|
106
|
+
- run: pip install -r requirements.txt
|
|
107
|
+
|
|
108
|
+
- uses: actions/download-artifact@v4
|
|
109
|
+
with:
|
|
110
|
+
name: wheel
|
|
111
|
+
path: dist
|
|
112
|
+
|
|
113
|
+
- run: abi3audit --verbose dist/*.whl
|
|
114
|
+
- run: pipx run twine check --strict dist/*
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
coverage:
|
|
118
|
+
name: Coverage for ${{ matrix.python-version }}
|
|
119
|
+
strategy:
|
|
120
|
+
matrix:
|
|
121
|
+
python-version:
|
|
122
|
+
- "3.10"
|
|
123
|
+
- "3.11"
|
|
124
|
+
- "3.12"
|
|
125
|
+
- "3.13"
|
|
126
|
+
|
|
127
|
+
runs-on: ubuntu-24.04
|
|
128
|
+
steps:
|
|
129
|
+
- uses: actions/checkout@v4
|
|
130
|
+
- uses: actions/setup-python@v5
|
|
131
|
+
with:
|
|
132
|
+
python-version: "${{ matrix.python-version }}"
|
|
133
|
+
cache: "pip"
|
|
134
|
+
|
|
135
|
+
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
136
|
+
with:
|
|
137
|
+
components: llvm-tools
|
|
138
|
+
|
|
139
|
+
- name: Install cargo-llvm-cov
|
|
140
|
+
uses: taiki-e/install-action@cargo-llvm-cov
|
|
141
|
+
|
|
142
|
+
- run: pip install -r requirements.txt
|
|
143
|
+
|
|
144
|
+
- name: Run coverage
|
|
145
|
+
run: |
|
|
146
|
+
set -euxo pipefail
|
|
147
|
+
source <(cargo llvm-cov show-env --export-prefix)
|
|
148
|
+
export CARGO_TARGET_DIR=$CARGO_LLVM_COV_TARGET_DIR
|
|
149
|
+
cargo llvm-cov clean --workspace
|
|
150
|
+
cargo build
|
|
151
|
+
ls target/debug -ahl
|
|
152
|
+
cp target/debug/libbencode.so py/bencode_rs/_bencode.so
|
|
153
|
+
PYTHONPATH=py pytest tests
|
|
154
|
+
cargo llvm-cov report --lcov --output-path coverage.lcov
|
|
155
|
+
|
|
156
|
+
- uses: codecov/codecov-action@v5
|
|
157
|
+
with:
|
|
158
|
+
files: coverage.lcov
|
|
159
|
+
token: '${{ secrets.CODECOV_TOKEN }}'
|
|
@@ -11,15 +11,15 @@ jobs:
|
|
|
11
11
|
|
|
12
12
|
upload_all:
|
|
13
13
|
name: Upload wheels to PyPI
|
|
14
|
-
needs: [
|
|
15
|
-
runs-on: ubuntu-
|
|
14
|
+
needs: [build]
|
|
15
|
+
runs-on: ubuntu-24.04
|
|
16
16
|
environment: pypi
|
|
17
17
|
permissions:
|
|
18
18
|
id-token: write
|
|
19
19
|
steps:
|
|
20
|
-
- uses: actions/download-artifact@v4.1.
|
|
20
|
+
- uses: actions/download-artifact@v4.1.8
|
|
21
21
|
with:
|
|
22
22
|
name: wheel
|
|
23
23
|
path: dist
|
|
24
24
|
|
|
25
|
-
- uses: pypa/gh-action-pypi-publish@v1.
|
|
25
|
+
- uses: pypa/gh-action-pypi-publish@v1.12.3
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
exclude: '^.*\.bin$'
|
|
2
|
+
|
|
3
|
+
repos:
|
|
4
|
+
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
|
|
5
|
+
rev: v2.14.0
|
|
6
|
+
hooks:
|
|
7
|
+
- id: pretty-format-yaml
|
|
8
|
+
args: [--autofix, --indent, '2', '--preserve-quotes', --offset, '2']
|
|
9
|
+
|
|
10
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
11
|
+
rev: v5.0.0
|
|
12
|
+
hooks:
|
|
13
|
+
- id: check-case-conflict
|
|
14
|
+
- id: check-ast
|
|
15
|
+
- id: check-toml
|
|
16
|
+
- id: check-yaml
|
|
17
|
+
- id: check-merge-conflict
|
|
18
|
+
- id: debug-statements
|
|
19
|
+
- id: trailing-whitespace
|
|
20
|
+
- id: mixed-line-ending
|
|
21
|
+
args: [--fix=lf]
|
|
22
|
+
- id: end-of-file-fixer
|
|
23
|
+
|
|
24
|
+
- repo: https://github.com/psf/black
|
|
25
|
+
rev: 24.10.0
|
|
26
|
+
hooks:
|
|
27
|
+
- id: black
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "autocfg"
|
|
7
|
+
version = "1.4.0"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "bencode"
|
|
13
|
+
version = "0.0.0"
|
|
14
|
+
dependencies = [
|
|
15
|
+
"bytes",
|
|
16
|
+
"num",
|
|
17
|
+
"once_cell",
|
|
18
|
+
"pyo3",
|
|
19
|
+
"smallvec",
|
|
20
|
+
"syncpool",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[[package]]
|
|
24
|
+
name = "bytes"
|
|
25
|
+
version = "1.9.0"
|
|
26
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
27
|
+
checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b"
|
|
28
|
+
|
|
29
|
+
[[package]]
|
|
30
|
+
name = "cfg-if"
|
|
31
|
+
version = "1.0.0"
|
|
32
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
33
|
+
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|
34
|
+
|
|
35
|
+
[[package]]
|
|
36
|
+
name = "heck"
|
|
37
|
+
version = "0.5.0"
|
|
38
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
39
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
40
|
+
|
|
41
|
+
[[package]]
|
|
42
|
+
name = "indoc"
|
|
43
|
+
version = "2.0.5"
|
|
44
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
45
|
+
checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
|
|
46
|
+
|
|
47
|
+
[[package]]
|
|
48
|
+
name = "libc"
|
|
49
|
+
version = "0.2.169"
|
|
50
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
51
|
+
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
|
|
52
|
+
|
|
53
|
+
[[package]]
|
|
54
|
+
name = "memoffset"
|
|
55
|
+
version = "0.9.1"
|
|
56
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
57
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
58
|
+
dependencies = [
|
|
59
|
+
"autocfg",
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
[[package]]
|
|
63
|
+
name = "num"
|
|
64
|
+
version = "0.4.3"
|
|
65
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
66
|
+
checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23"
|
|
67
|
+
dependencies = [
|
|
68
|
+
"num-bigint",
|
|
69
|
+
"num-complex",
|
|
70
|
+
"num-integer",
|
|
71
|
+
"num-iter",
|
|
72
|
+
"num-rational",
|
|
73
|
+
"num-traits",
|
|
74
|
+
]
|
|
75
|
+
|
|
76
|
+
[[package]]
|
|
77
|
+
name = "num-bigint"
|
|
78
|
+
version = "0.4.6"
|
|
79
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
80
|
+
checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
|
|
81
|
+
dependencies = [
|
|
82
|
+
"num-integer",
|
|
83
|
+
"num-traits",
|
|
84
|
+
]
|
|
85
|
+
|
|
86
|
+
[[package]]
|
|
87
|
+
name = "num-complex"
|
|
88
|
+
version = "0.4.6"
|
|
89
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
90
|
+
checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
|
|
91
|
+
dependencies = [
|
|
92
|
+
"num-traits",
|
|
93
|
+
]
|
|
94
|
+
|
|
95
|
+
[[package]]
|
|
96
|
+
name = "num-integer"
|
|
97
|
+
version = "0.1.46"
|
|
98
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
99
|
+
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
|
|
100
|
+
dependencies = [
|
|
101
|
+
"num-traits",
|
|
102
|
+
]
|
|
103
|
+
|
|
104
|
+
[[package]]
|
|
105
|
+
name = "num-iter"
|
|
106
|
+
version = "0.1.45"
|
|
107
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
108
|
+
checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf"
|
|
109
|
+
dependencies = [
|
|
110
|
+
"autocfg",
|
|
111
|
+
"num-integer",
|
|
112
|
+
"num-traits",
|
|
113
|
+
]
|
|
114
|
+
|
|
115
|
+
[[package]]
|
|
116
|
+
name = "num-rational"
|
|
117
|
+
version = "0.4.2"
|
|
118
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
119
|
+
checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824"
|
|
120
|
+
dependencies = [
|
|
121
|
+
"num-bigint",
|
|
122
|
+
"num-integer",
|
|
123
|
+
"num-traits",
|
|
124
|
+
]
|
|
125
|
+
|
|
126
|
+
[[package]]
|
|
127
|
+
name = "num-traits"
|
|
128
|
+
version = "0.2.19"
|
|
129
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
130
|
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
|
131
|
+
dependencies = [
|
|
132
|
+
"autocfg",
|
|
133
|
+
]
|
|
134
|
+
|
|
135
|
+
[[package]]
|
|
136
|
+
name = "once_cell"
|
|
137
|
+
version = "1.20.2"
|
|
138
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
139
|
+
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
|
|
140
|
+
|
|
141
|
+
[[package]]
|
|
142
|
+
name = "portable-atomic"
|
|
143
|
+
version = "1.10.0"
|
|
144
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
145
|
+
checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6"
|
|
146
|
+
|
|
147
|
+
[[package]]
|
|
148
|
+
name = "proc-macro2"
|
|
149
|
+
version = "1.0.92"
|
|
150
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
151
|
+
checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
|
|
152
|
+
dependencies = [
|
|
153
|
+
"unicode-ident",
|
|
154
|
+
]
|
|
155
|
+
|
|
156
|
+
[[package]]
|
|
157
|
+
name = "pyo3"
|
|
158
|
+
version = "0.23.3"
|
|
159
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
160
|
+
checksum = "e484fd2c8b4cb67ab05a318f1fd6fa8f199fcc30819f08f07d200809dba26c15"
|
|
161
|
+
dependencies = [
|
|
162
|
+
"cfg-if",
|
|
163
|
+
"indoc",
|
|
164
|
+
"libc",
|
|
165
|
+
"memoffset",
|
|
166
|
+
"once_cell",
|
|
167
|
+
"portable-atomic",
|
|
168
|
+
"pyo3-build-config",
|
|
169
|
+
"pyo3-ffi",
|
|
170
|
+
"pyo3-macros",
|
|
171
|
+
"unindent",
|
|
172
|
+
]
|
|
173
|
+
|
|
174
|
+
[[package]]
|
|
175
|
+
name = "pyo3-build-config"
|
|
176
|
+
version = "0.23.3"
|
|
177
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
178
|
+
checksum = "dc0e0469a84f208e20044b98965e1561028180219e35352a2afaf2b942beff3b"
|
|
179
|
+
dependencies = [
|
|
180
|
+
"once_cell",
|
|
181
|
+
"target-lexicon",
|
|
182
|
+
]
|
|
183
|
+
|
|
184
|
+
[[package]]
|
|
185
|
+
name = "pyo3-ffi"
|
|
186
|
+
version = "0.23.3"
|
|
187
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
188
|
+
checksum = "eb1547a7f9966f6f1a0f0227564a9945fe36b90da5a93b3933fc3dc03fae372d"
|
|
189
|
+
dependencies = [
|
|
190
|
+
"libc",
|
|
191
|
+
"pyo3-build-config",
|
|
192
|
+
]
|
|
193
|
+
|
|
194
|
+
[[package]]
|
|
195
|
+
name = "pyo3-macros"
|
|
196
|
+
version = "0.23.3"
|
|
197
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
198
|
+
checksum = "fdb6da8ec6fa5cedd1626c886fc8749bdcbb09424a86461eb8cdf096b7c33257"
|
|
199
|
+
dependencies = [
|
|
200
|
+
"proc-macro2",
|
|
201
|
+
"pyo3-macros-backend",
|
|
202
|
+
"quote",
|
|
203
|
+
"syn",
|
|
204
|
+
]
|
|
205
|
+
|
|
206
|
+
[[package]]
|
|
207
|
+
name = "pyo3-macros-backend"
|
|
208
|
+
version = "0.23.3"
|
|
209
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
210
|
+
checksum = "38a385202ff5a92791168b1136afae5059d3ac118457bb7bc304c197c2d33e7d"
|
|
211
|
+
dependencies = [
|
|
212
|
+
"heck",
|
|
213
|
+
"proc-macro2",
|
|
214
|
+
"pyo3-build-config",
|
|
215
|
+
"quote",
|
|
216
|
+
"syn",
|
|
217
|
+
]
|
|
218
|
+
|
|
219
|
+
[[package]]
|
|
220
|
+
name = "quote"
|
|
221
|
+
version = "1.0.37"
|
|
222
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
223
|
+
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
|
|
224
|
+
dependencies = [
|
|
225
|
+
"proc-macro2",
|
|
226
|
+
]
|
|
227
|
+
|
|
228
|
+
[[package]]
|
|
229
|
+
name = "smallvec"
|
|
230
|
+
version = "1.13.2"
|
|
231
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
232
|
+
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
|
|
233
|
+
|
|
234
|
+
[[package]]
|
|
235
|
+
name = "syn"
|
|
236
|
+
version = "2.0.91"
|
|
237
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
238
|
+
checksum = "d53cbcb5a243bd33b7858b1d7f4aca2153490815872d86d955d6ea29f743c035"
|
|
239
|
+
dependencies = [
|
|
240
|
+
"proc-macro2",
|
|
241
|
+
"quote",
|
|
242
|
+
"unicode-ident",
|
|
243
|
+
]
|
|
244
|
+
|
|
245
|
+
[[package]]
|
|
246
|
+
name = "syncpool"
|
|
247
|
+
version = "0.1.6"
|
|
248
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
249
|
+
checksum = "276c1fc00f41ad03bdcf390e81f967adfdb9c828c0a967e1c92df8050471c6bd"
|
|
250
|
+
|
|
251
|
+
[[package]]
|
|
252
|
+
name = "target-lexicon"
|
|
253
|
+
version = "0.12.16"
|
|
254
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
255
|
+
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
|
256
|
+
|
|
257
|
+
[[package]]
|
|
258
|
+
name = "unicode-ident"
|
|
259
|
+
version = "1.0.14"
|
|
260
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
261
|
+
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
|
|
262
|
+
|
|
263
|
+
[[package]]
|
|
264
|
+
name = "unindent"
|
|
265
|
+
version = "0.2.3"
|
|
266
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
267
|
+
checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "bencode"
|
|
3
|
+
edition = "2021"
|
|
4
|
+
|
|
5
|
+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
6
|
+
[lib]
|
|
7
|
+
name = "bencode"
|
|
8
|
+
crate-type = ["cdylib"]
|
|
9
|
+
|
|
10
|
+
[dependencies]
|
|
11
|
+
bytes = "1.9.0"
|
|
12
|
+
syncpool = '0.1.6'
|
|
13
|
+
num = "0.4.3"
|
|
14
|
+
once_cell = "1.20.2"
|
|
15
|
+
pyo3 = { version = "0.23.2", features = ['abi3-py310'] }
|
|
16
|
+
smallvec = "1.13.2"
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: bencode-rs
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.7
|
|
4
4
|
Classifier: Development Status :: 2 - Pre-Alpha
|
|
5
5
|
Classifier: License :: OSI Approved :: MIT License
|
|
6
6
|
Classifier: Programming Language :: Rust
|
|
7
7
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
8
8
|
License-File: LICENSE
|
|
9
|
-
Summary: a bencode parser
|
|
9
|
+
Summary: a bencode parser build with pyo3
|
|
10
10
|
Keywords: bittorrent,bencode,p2p
|
|
11
|
-
Requires-Python:
|
|
11
|
+
Requires-Python: ~=3.10
|
|
12
12
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
13
13
|
Project-URL: Homepage, https://github.com/trim21/bencode-rs
|
|
14
14
|
|