From ea78a9b61b1df12c5e48c1b71d59a3784ce00264 Mon Sep 17 00:00:00 2001 From: Jun Luo <4catcode@gmail.com> Date: Wed, 23 Oct 2024 18:05:26 +0800 Subject: [PATCH] Add support for Python 3.13 --- .github/workflows/ci.yml | 94 +++++++++++++---------- Cargo.lock | 158 ++++++++++----------------------------- Cargo.toml | 12 +-- pyproject.toml | 19 ++--- src/lib.rs | 72 +++++++++--------- 5 files changed, 142 insertions(+), 213 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6588fc9..88a3ff7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: branches: - main tags: - - '*' + - "*" pull_request: workflow_dispatch: @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 @@ -32,94 +32,106 @@ jobs: run: python tests/test_fastcrc.py linux: - name: Build wheels for Linux - runs-on: ubuntu-latest - needs: test + runs-on: ${{ matrix.platform.runner }} strategy: matrix: - target: [x86_64, x86, aarch64, armv7, s390x, ppc64le] + platform: + - runner: ubuntu-latest + target: x86_64 + - runner: ubuntu-latest + target: x86 + - runner: ubuntu-latest + target: aarch64 + - runner: ubuntu-latest + target: armv7 + - runner: ubuntu-latest + target: s390x + - runner: ubuntu-latest + target: ppc64le steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: "3.10" - name: Build wheels uses: PyO3/maturin-action@v1 with: - target: ${{ matrix.target }} + target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter - sccache: 'true' + sccache: "true" manylinux: auto - name: Upload wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: wheels + name: wheels-linux-${{ matrix.platform.target }} path: dist windows: - runs-on: windows-latest - name: Build wheels for Windows - needs: test + runs-on: ${{ matrix.platform.runner }} strategy: matrix: - target: [x64, x86] + platform: + - runner: windows-latest + target: x64 + - runner: windows-latest + target: x86 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: '3.12' - architecture: ${{ matrix.target }} + python-version: "3.10" + architecture: ${{ matrix.platform.target }} - name: Build wheels uses: PyO3/maturin-action@v1 with: - target: ${{ matrix.target }} + target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter - sccache: 'true' + sccache: "true" - name: Upload wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: wheels + name: wheels-windows-${{ matrix.platform.target }} path: dist macos: - runs-on: macos-latest - name: Build wheels for macOS - needs: test + runs-on: ${{ matrix.platform.runner }} strategy: matrix: - target: [x86_64, aarch64] + platform: + - runner: macos-latest + target: x86_64 + - runner: macos-14 + target: aarch64 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: "3.10" - name: Build wheels uses: PyO3/maturin-action@v1 with: - target: ${{ matrix.target }} + target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter - sccache: 'true' + sccache: "true" - name: Upload wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: wheels + name: wheels-macos-${{ matrix.platform.target }} path: dist sdist: runs-on: ubuntu-latest - name: Build sdist - needs: test steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build sdist uses: PyO3/maturin-action@v1 with: command: sdist args: --out dist - name: Upload sdist - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: wheels + name: wheels-sdist path: dist release: diff --git a/Cargo.lock b/Cargo.lock index 60f1282..e300d0f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,12 +8,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "cfg-if" version = "1.0.0" @@ -22,18 +16,18 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "crc" -version = "3.0.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53757d12b596c16c78b83458d732a5d1a17ab3f53f2f7412f6fb57cc8a140ab3" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" dependencies = [ "crc-catalog", ] [[package]] name = "crc-catalog" -version = "2.1.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d0165d2900ae6778e36e80bbc4da3b5eefccee9ba939761f9c2882a5d9af3ff" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "fastcrc" @@ -45,19 +39,16 @@ dependencies = [ ] [[package]] -name = "indoc" -version = "1.0.9" +name = "heck" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] -name = "instant" -version = "0.1.12" +name = "indoc" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "libc" @@ -65,16 +56,6 @@ version = "0.2.132" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" -[[package]] -name = "lock_api" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f80bf5aacaf25cbfc8210d1cfb718f2bf3b11c4c54e5afe36c236853a8ec390" -dependencies = [ - "autocfg", - "scopeguard", -] - [[package]] name = "memoffset" version = "0.9.0" @@ -91,56 +72,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0" [[package]] -name = "parking_lot" -version = "0.11.2" +name = "paste" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core", -] +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] -name = "parking_lot_core" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall", - "smallvec", - "winapi", -] - -[[package]] -name = "paste" -version = "1.0.14" +name = "portable-atomic" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" [[package]] name = "proc-macro2" -version = "1.0.43" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] [[package]] name = "pyo3" -version = "0.19.2" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e681a6cfdc4adcc93b4d3cf993749a4552018ee0a9b65fc0ccfad74352c72a38" +checksum = "3d922163ba1f79c04bc49073ba7b32fd5a8d3b76a87c955921234b8e77333c51" dependencies = [ "cfg-if", "indoc", "libc", "memoffset", - "parking_lot", + "once_cell", + "portable-atomic", "pyo3-build-config", "pyo3-ffi", "pyo3-macros", @@ -149,9 +112,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.19.2" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076c73d0bc438f7a4ef6fdd0c3bb4732149136abd952b110ac93e4edb13a6ba5" +checksum = "bc38c5feeb496c8321091edf3d63e9a6829eab4b863b4a6a65f26f3e9cc6b179" dependencies = [ "once_cell", "target-lexicon", @@ -159,9 +122,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.19.2" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e53cee42e77ebe256066ba8aa77eff722b3bb91f3419177cf4cd0f304d3284d9" +checksum = "94845622d88ae274d2729fcefc850e63d7a3ddff5e3ce11bd88486db9f1d357d" dependencies = [ "libc", "pyo3-build-config", @@ -169,9 +132,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.19.2" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfeb4c99597e136528c6dd7d5e3de5434d1ceaf487436a3f03b2d56b6fc9efd1" +checksum = "e655aad15e09b94ffdb3ce3d217acf652e26bbc37697ef012f5e5e348c716e5e" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -181,50 +144,31 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.19.2" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "947dc12175c254889edc0c02e399476c2f652b4b9ebd123aa655c224de259536" +checksum = "ae1e3f09eecd94618f60a455a23def79f79eba4dc561a97324bf9ac8c6df30ce" dependencies = [ + "heck", "proc-macro2", + "pyo3-build-config", "quote", "syn", ] [[package]] name = "quote" -version = "1.0.21" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags", -] - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "smallvec" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" - [[package]] name = "syn" -version = "1.0.99" +version = "2.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" +checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" dependencies = [ "proc-macro2", "quote", @@ -233,9 +177,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.12" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "unicode-ident" @@ -245,28 +189,6 @@ checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd" [[package]] name = "unindent" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ee9362deb4a96cef4d437d1ad49cffc9b9e92d202b6995674e928ce684f112" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" diff --git a/Cargo.toml b/Cargo.toml index 376c8d9..4e058f8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,19 +2,19 @@ name = "fastcrc" version = "0.3.0" authors = ["overcat <4catcode@gmail.com>"] -edition = "2018" -description = "A hyper-fast Python module for computing CRC(16, 32, 64) checksum" +edition = "2021" +description = "A hyper-fast Python module for computing CRC(8, 16, 32, 64) checksum" license = "MIT License" repository = "https://github.com/overcat/fastcrc" homepage = "https://github.com/overcat/fastcrc" readme = "README.rst" -keywords = ["crc", "crc16", "crc32", "crc64"] +keywords = ["crc", "crc8", "crc16", "crc32", "crc64"] [lib] name = "fastcrc" crate-type = ["cdylib"] [dependencies] -pyo3 = "0.19.0" -crc = "3.0.0" -paste = "1.0.6" +pyo3 = "0.22.5" +crc = "3.2.1" +paste = "1.0.15" diff --git a/pyproject.toml b/pyproject.toml index 01a0cfc..da761a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,8 +4,7 @@ version = "0.3.0" requires-python = ">=3.7" readme = "README.rst" description = "A hyper-fast Python module for computing CRC(8, 16, 32, 64) checksum" -author = "overcat <4catcode@gmail.com>" -maintainer = "overcat <4catcode@gmail.com>" +authors = [{ name = "overcat", email = "4catcode@gmail" }] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", @@ -19,21 +18,15 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed", ] +keywords = ["crc", "crc8", "crc16", "crc32", "crc64"] + +[project.urls] homepage = "https://github.com/overcat/fastcrc" repository = "https://github.com/overcat/fastcrc" -keywords = [ - "crc", - "crc8", - "crc16", - "crc32", - "crc64", -] - -[tool.poetry.urls] -"Bug Tracker" = "https://github.com/overcat/fastcrc/issues" +documentation = "https://fastcrc.readthedocs.io" [build-system] -requires = ["maturin>=1.4,<2.0"] +requires = ["maturin>=1.5,<2.0"] build-backend = "maturin" [tool.maturin] diff --git a/src/lib.rs b/src/lib.rs index 5f1011d..7dc1447 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,15 +1,16 @@ use crc::{ - Crc, CRC_8_AUTOSAR, CRC_8_BLUETOOTH, CRC_8_CDMA2000, CRC_8_DARC, CRC_8_DVB_S2, CRC_8_GSM_A, - CRC_8_GSM_B, CRC_8_I_432_1, CRC_8_I_CODE, CRC_8_LTE, CRC_8_MAXIM_DOW, CRC_8_MIFARE_MAD, - CRC_8_NRSC_5, CRC_8_OPENSAFETY, CRC_8_ROHC, CRC_8_SAE_J1850, CRC_8_SMBUS, CRC_8_TECH_3250, - CRC_8_WCDMA, CRC_16_ARC, CRC_16_CDMA2000, CRC_16_CMS, CRC_16_DDS_110, CRC_16_DECT_R, CRC_16_DECT_X, - CRC_16_DNP, CRC_16_EN_13757, CRC_16_GENIBUS, CRC_16_GSM, CRC_16_IBM_3740, CRC_16_IBM_SDLC, - CRC_16_ISO_IEC_14443_3_A, CRC_16_KERMIT, CRC_16_LJ1200, CRC_16_MAXIM_DOW, CRC_16_MCRF4XX, - CRC_16_MODBUS, CRC_16_NRSC_5, CRC_16_OPENSAFETY_A, CRC_16_OPENSAFETY_B, CRC_16_PROFIBUS, - CRC_16_RIELLO, CRC_16_SPI_FUJITSU, CRC_16_T10_DIF, CRC_16_TELEDISK, CRC_16_TMS37157, - CRC_16_UMTS, CRC_16_USB, CRC_16_XMODEM, CRC_32_AIXM, CRC_32_AUTOSAR, CRC_32_BASE91_D, - CRC_32_BZIP2, CRC_32_CD_ROM_EDC, CRC_32_CKSUM, CRC_32_ISCSI, CRC_32_ISO_HDLC, CRC_32_JAMCRC, - CRC_32_MPEG_2, CRC_32_XFER, CRC_64_ECMA_182, CRC_64_GO_ISO, CRC_64_WE, CRC_64_XZ, Algorithm, + Algorithm, Crc, CRC_16_ARC, CRC_16_CDMA2000, CRC_16_CMS, CRC_16_DDS_110, CRC_16_DECT_R, + CRC_16_DECT_X, CRC_16_DNP, CRC_16_EN_13757, CRC_16_GENIBUS, CRC_16_GSM, CRC_16_IBM_3740, + CRC_16_IBM_SDLC, CRC_16_ISO_IEC_14443_3_A, CRC_16_KERMIT, CRC_16_LJ1200, CRC_16_MAXIM_DOW, + CRC_16_MCRF4XX, CRC_16_MODBUS, CRC_16_NRSC_5, CRC_16_OPENSAFETY_A, CRC_16_OPENSAFETY_B, + CRC_16_PROFIBUS, CRC_16_RIELLO, CRC_16_SPI_FUJITSU, CRC_16_T10_DIF, CRC_16_TELEDISK, + CRC_16_TMS37157, CRC_16_UMTS, CRC_16_USB, CRC_16_XMODEM, CRC_32_AIXM, CRC_32_AUTOSAR, + CRC_32_BASE91_D, CRC_32_BZIP2, CRC_32_CD_ROM_EDC, CRC_32_CKSUM, CRC_32_ISCSI, CRC_32_ISO_HDLC, + CRC_32_JAMCRC, CRC_32_MPEG_2, CRC_32_XFER, CRC_64_ECMA_182, CRC_64_GO_ISO, CRC_64_WE, + CRC_64_XZ, CRC_8_AUTOSAR, CRC_8_BLUETOOTH, CRC_8_CDMA2000, CRC_8_DARC, CRC_8_DVB_S2, + CRC_8_GSM_A, CRC_8_GSM_B, CRC_8_I_432_1, CRC_8_I_CODE, CRC_8_LTE, CRC_8_MAXIM_DOW, + CRC_8_MIFARE_MAD, CRC_8_NRSC_5, CRC_8_OPENSAFETY, CRC_8_ROHC, CRC_8_SAE_J1850, CRC_8_SMBUS, + CRC_8_TECH_3250, CRC_8_WCDMA, }; use pyo3::prelude::*; use pyo3::wrap_pyfunction; @@ -21,6 +22,7 @@ macro_rules! define_crc_fn { ($name:ident, $word_type:ty, $crc_type:ty) => { ::paste::paste! { #[pyfunction] + #[pyo3(signature = (data, initial=None))] fn $name(data: &[u8], initial: Option<$word_type>) -> PyResult<$word_type> { const CRC: Crc<$word_type> = Crc::<$word_type>::new(&$crc_type); let mut digest = match initial { @@ -41,7 +43,7 @@ macro_rules! define_crc_fn { }; } -const CRC_16_IBM_REFIN: Algorithm = Algorithm { +const CRC_16_IBM_REFIN: Algorithm = Algorithm { width: 16, poly: 0x8005, init: 0x0000, @@ -49,7 +51,7 @@ const CRC_16_IBM_REFIN: Algorithm = Algorithm { refout: false, xorout: 0x0000, check: 0xbcdd, - residue: 0x0000 + residue: 0x0000, }; const CRC_32_K_REVERSED_RECIPROCAL_REFIN: Algorithm = Algorithm { @@ -59,8 +61,8 @@ const CRC_32_K_REVERSED_RECIPROCAL_REFIN: Algorithm = Algorithm { refin: true, refout: false, xorout: 0x00000000, - check: 0x949d7183, - residue: 0x00000000 + check: 0x949d7183, + residue: 0x00000000, }; define_crc_fn!(crc_8_autosar, u8, CRC_8_AUTOSAR); @@ -135,26 +137,26 @@ define_crc_fn!(crc_64_we, u64, CRC_64_WE); define_crc_fn!(crc_64_xz, u64, CRC_64_XZ); #[pymodule] -fn fastcrc(_: Python, m: &PyModule) -> PyResult<()> { - m.add_function(wrap_pyfunction!(crc_8_autosar,m)?)?; - m.add_function(wrap_pyfunction!(crc_8_bluetooth,m)?)?; - m.add_function(wrap_pyfunction!(crc_8_cdma2000,m)?)?; - m.add_function(wrap_pyfunction!(crc_8_darc,m)?)?; - m.add_function(wrap_pyfunction!(crc_8_dvb_s2,m)?)?; - m.add_function(wrap_pyfunction!(crc_8_gsm_a,m)?)?; - m.add_function(wrap_pyfunction!(crc_8_gsm_b,m)?)?; - m.add_function(wrap_pyfunction!(crc_8_i_432_1,m)?)?; - m.add_function(wrap_pyfunction!(crc_8_i_code,m)?)?; - m.add_function(wrap_pyfunction!(crc_8_lte,m)?)?; - m.add_function(wrap_pyfunction!(crc_8_maxim_dow,m)?)?; - m.add_function(wrap_pyfunction!(crc_8_mifare_mad,m)?)?; - m.add_function(wrap_pyfunction!(crc_8_nrsc_5,m)?)?; - m.add_function(wrap_pyfunction!(crc_8_opensafety,m)?)?; - m.add_function(wrap_pyfunction!(crc_8_rohc,m)?)?; - m.add_function(wrap_pyfunction!(crc_8_sae_j1850,m)?)?; - m.add_function(wrap_pyfunction!(crc_8_smbus,m)?)?; - m.add_function(wrap_pyfunction!(crc_8_tech_3250,m)?)?; - m.add_function(wrap_pyfunction!(crc_8_wcdma,m)?)?; +fn fastcrc(m: &Bound<'_, PyModule>) -> PyResult<()> { + m.add_function(wrap_pyfunction!(crc_8_autosar, m)?)?; + m.add_function(wrap_pyfunction!(crc_8_bluetooth, m)?)?; + m.add_function(wrap_pyfunction!(crc_8_cdma2000, m)?)?; + m.add_function(wrap_pyfunction!(crc_8_darc, m)?)?; + m.add_function(wrap_pyfunction!(crc_8_dvb_s2, m)?)?; + m.add_function(wrap_pyfunction!(crc_8_gsm_a, m)?)?; + m.add_function(wrap_pyfunction!(crc_8_gsm_b, m)?)?; + m.add_function(wrap_pyfunction!(crc_8_i_432_1, m)?)?; + m.add_function(wrap_pyfunction!(crc_8_i_code, m)?)?; + m.add_function(wrap_pyfunction!(crc_8_lte, m)?)?; + m.add_function(wrap_pyfunction!(crc_8_maxim_dow, m)?)?; + m.add_function(wrap_pyfunction!(crc_8_mifare_mad, m)?)?; + m.add_function(wrap_pyfunction!(crc_8_nrsc_5, m)?)?; + m.add_function(wrap_pyfunction!(crc_8_opensafety, m)?)?; + m.add_function(wrap_pyfunction!(crc_8_rohc, m)?)?; + m.add_function(wrap_pyfunction!(crc_8_sae_j1850, m)?)?; + m.add_function(wrap_pyfunction!(crc_8_smbus, m)?)?; + m.add_function(wrap_pyfunction!(crc_8_tech_3250, m)?)?; + m.add_function(wrap_pyfunction!(crc_8_wcdma, m)?)?; m.add_function(wrap_pyfunction!(crc_16_arc, m)?)?; m.add_function(wrap_pyfunction!(crc_16_cdma2000, m)?)?; m.add_function(wrap_pyfunction!(crc_16_cms, m)?)?;