Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:zzndb001
anki-sync-server-rs
anki-sync-server-rs-1.1.5.obscpio
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File anki-sync-server-rs-1.1.5.obscpio of Package anki-sync-server-rs
07070100000000000041ED0000000000000000000000026652BF4B00000000000000000000000000000000000000000000002200000000anki-sync-server-rs-1.1.5/.builds07070100000001000081A40000000000000000000000016652BF4B00000183000000000000000000000000000000000000002D00000000anki-sync-server-rs-1.1.5/.builds/alpine.ymlimage: alpine/3.17 packages: - cargo - openssl sources: environment: project: anki-sync-server-rs p_name: ankisyncd secrets: tasks: - patch: | cd ~/$project sh ./scripts/clone_patch_anki - build: | cd ~/$project cargo build --release --features tls - test: | cd ~/$project timeout 10 ./target/release/${p_name} -c scripts/${p_name}.toml 07070100000002000041ED0000000000000000000000026652BF4B00000000000000000000000000000000000000000000002100000000anki-sync-server-rs-1.1.5/.cargo07070100000003000081A40000000000000000000000016652BF4B00000584000000000000000000000000000000000000002800000000anki-sync-server-rs-1.1.5/.cargo/config#this file is for cross-compiling's use #MacOS # [target.x86_64-apple-darwin] # linker = "x86_64-apple-darwin14-clang" # ar = "x86_64-apple-darwin14-ar" #Windows [target.x86_64-pc-windows-msvc] # statically link the C runtime (CRT) rustflags = ["-C", "target-feature=+crt-static"] [target.i686-pc-windows-msvc] linker = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\Hostx64\\x86\\link.exe" # Linux [target.aarch64-unknown-linux-musl] linker = "aarch64-linux-musl-ld" rustflags = ["-C", "target-feature=+crt-static", "-C", "link-args=-static"] [target.armv7-unknown-linux-musleabihf] #linker = "arm-linux-musleabihf-gcc" linker = "arm-linux-musleabihf-ld" rustflags = [ "-C", "target-feature=+crt-static", "-C", "link-args=-static", ] [target.arm-unknown-linux-musleabihf] linker = "arm-linux-musleabihf-ld" rustflags = [ "-C", "target-feature=+crt-static", "-C", "link-args=-static", ] [target.x86_64-unknown-linux-musl] linker = "x86_64-linux-musl-ld" rustflags = ["-C", "target-feature=+crt-static", "-C", "link-args=-static", ] # for some regions where github are blocked or badly connected #[source.crates-io] #registry="https://github.com/rust-lang/crates.io-index" # 这行可以不要,只是说明原始地址 #replace-with='tuna' #[source.tuna] #registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git" 07070100000004000041ED0000000000000000000000026652BF4B00000000000000000000000000000000000000000000002200000000anki-sync-server-rs-1.1.5/.github07070100000005000081A40000000000000000000000016652BF4B000002D3000000000000000000000000000000000000002D00000000anki-sync-server-rs-1.1.5/.github/DockerfileFROM debian:stable-slim WORKDIR /app # copy from host to container COPY binary binary RUN cp /app/binary/ankisyncd.toml /ankisyncd.toml && cp /app/binary/ankisyncd.toml /app/ankisyncd.toml && cp /app/binary/entrypoint.sh /entrypoint.sh RUN mv /app/binary/`arch`-unknown-linux-musl-ankisyncd /usr/local/bin/ankisyncd RUN chmod +x /usr/local/bin/ankisyncd && rm -fr binary # WORKDIR /app means, when you log into the shell of container, # you will be in the /app directory of the container by default. # https://linuxhint.com/dockerfile_volumes/ # persist data with a named volume https://docs.docker.com/get-started/05_persisting_data/ VOLUME /app RUN chmod +x /entrypoint.sh CMD ["sh", "/entrypoint.sh"] EXPOSE 27701 07070100000006000041ED0000000000000000000000026652BF4B00000000000000000000000000000000000000000000002C00000000anki-sync-server-rs-1.1.5/.github/workflows07070100000007000081A40000000000000000000000016652BF4B00000C38000000000000000000000000000000000000003300000000anki-sync-server-rs-1.1.5/.github/workflows/ci.ymlon: [pull_request] name: Continuous integration jobs: ci_linux: name: ci_on_linux runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@v2 - name: Set up cargo uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable override: true - name: Install Protoc uses: arduino/setup-protoc@v1 with: version: '3.x' repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Set up python uses: actions/setup-python@v2 # clone and patch anki library - name: Clone patch Anki run: sh ./scripts/clone_patch_anki # set up and run pre-commit pre-commit run --all-files - name: run pre-commit uses: pre-commit/action@v2.0.3 # run build script to build - name: Build Ankisyncd run: | cargo build cargo build --features tls ci_macos: name: ci_on_macos runs-on: macos-latest steps: - name: Check out code uses: actions/checkout@v2 - name: Set up cargo uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable override: true - name: Install Protoc uses: arduino/setup-protoc@v1 with: version: '3.x' repo-token: ${{ secrets.GITHUB_TOKEN }} # - name: Install protoc # run: | # /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # brew install protobuf - name: Set up python uses: actions/setup-python@v2 # clone and patch anki library - name: Clone patch Anki run: sh ./scripts/clone_patch_anki # set up and run pre-commit pre-commit run --all-files - name: run pre-commit uses: pre-commit/action@v2.0.3 # run build script to build - name: Build Ankisyncd run: | cargo build cargo build --features tls # it is necessary to separate windows ,as patch file differ ci_windows: name: ci_on_windows runs-on: windows-latest steps: - name: Check out code uses: actions/checkout@v2 - name: Set up cargo uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable override: true - name: Install Protoc uses: arduino/setup-protoc@v1 with: version: '3.x' repo-token: ${{ secrets.GITHUB_TOKEN }} # clone and patch anki library - name: Clone patch Anki run: .\scripts\clone_patch_anki.bat # set up and run pre-commit pre-commit run --all-files - name: Set up python uses: actions/setup-python@v2 - name: run pre-commit uses: pre-commit/action@v2.0.3 # run build script to build - name: Build Ankisyncd run: | cargo build cargo build --features tls 07070100000008000081A40000000000000000000000016652BF4B00001F83000000000000000000000000000000000000003C00000000anki-sync-server-rs-1.1.5/.github/workflows/docker_push.yml# from https://github.com/docker/build-push-action name: builddocker on: push: branches: master tags: - "*.*.*" jobs: x64: name: Build x64 runs-on: ubuntu-latest # after every step is finished,exporting to PATH will be clear,so in next step ,need re-export steps: - name: Check out code uses: actions/checkout@v2 - name: Set up cargo uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable override: true # clone and patch anki library # need to disable bundled feature in rusqlite in anki lib,so copy after-modified cargo file - name: Clone patch Anki run: | sh ./scripts/clone_patch_anki - name: Install Protoc uses: arduino/setup-protoc@v1 with: version: '3.x' repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Add cargo taget x64 run: rustup target add x86_64-unknown-linux-musl - uses: robinraju/release-downloader@v1.4 with: repository: "dobefore/musl-cross" tag: "0.1.0" fileName: "x86_64-linux-musl-cross.tgz" - name: Copy musl-cross to home run: cp x86_64-linux-musl-cross.tgz $HOME - name: unpack cross-compile toolchains musl run: tar -zxvf $HOME/x86_64-linux-musl-cross.tgz -C $HOME # # openssl - uses: robinraju/release-downloader@v1.4 with: repository: "dobefore/cross-compile-openssl-musl" tag: "1.1.1" fileName: "openssl1.1.1f_1.1.1_linux_x64.tar.gz" - name: Copy openssl lib to home run: cp openssl1.1.1f_1.1.1_linux_x64.tar.gz $HOME - name: unpack openssl run: | tar -zxvf $HOME/openssl1.1.1f_1.1.1_linux_x64.tar.gz -C $HOME cp -r $HOME/openssl1.1.1f_1.1.1_linux_x64/openssl/ $HOME - name: Build run: | export OPENSSL_LIB_DIR=$HOME/openssl/lib export OPENSSL_INCLUDE_DIR=$HOME/openssl/include export OPENSSL_STATIC=true sudo apt install musl-tools export PATH="$HOME/x86_64-linux-musl-cross/bin:$PATH" cargo build --target x86_64-unknown-linux-musl --release - run: mv target/x86_64-unknown-linux-musl/release/ankisyncd x86_64-unknown-linux-musl-ankisyncd - uses: actions/upload-artifact@v2 with: name: binary path: x86_64-unknown-linux-musl-ankisyncd retention-days: 1 arm64: name: Build arm64 runs-on: ubuntu-latest # after every step is finished,exporting to PATH will be clear,so in next step ,need re-export steps: - name: Check out code uses: actions/checkout@v2 - name: Set up cargo uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable override: true # clone and patch anki library # need to disable bundled feature in rusqlite in anki lib,so copy after-modified cargo file - name: Clone patch Anki run: | sh ./scripts/clone_patch_anki - name: Install Protoc uses: arduino/setup-protoc@v1 with: version: '3.x' repo-token: ${{ secrets.GITHUB_TOKEN }} # - name: Install Protoc # run: | # PB_REL="https://github.com/protocolbuffers/protobuf/releases" # curl -LO $PB_REL/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip # mkdir -p $HOME/protoc # unzip protoc-3.15.8-linux-x86_64.zip -d $HOME/protoc - name: Add cargo taget arm64 run: rustup target add aarch64-unknown-linux-musl - uses: robinraju/release-downloader@v1.4 with: repository: "dobefore/musl-cross" tag: "0.1.0" fileName: "aarch64-linux-musl-cross.tgz" - name: Copy musl-cross to home run: cp aarch64-linux-musl-cross.tgz $HOME - name: unpack cross-compile toolchains musl run: tar -zxvf $HOME/aarch64-linux-musl-cross.tgz -C $HOME # # openssl - uses: robinraju/release-downloader@v1.4 with: repository: "dobefore/cross-compile-openssl-musl" tag: "1.1.1" fileName: "openssl1.1.1f_1.1.1_linux_arm64.tar.gz" - name: Copy openssl lib to home run: cp openssl1.1.1f_1.1.1_linux_arm64.tar.gz $HOME - name: unpack openssl run: | tar -zxvf $HOME/openssl1.1.1f_1.1.1_linux_arm64.tar.gz -C $HOME cp -r $HOME/openssl1.1.1f_1.1.1_linux_arm64/openssl/ $HOME # # sqlite3 seems to need it any more, # - uses: robinraju/release-downloader@v1.4 # with: # repository: "dobefore/cross-compile-sqlite-musl" # tag: "0.1.2" # fileName: "sqliteautoconf3390000_0.1.2_linux_arm64.tar.gz" # - name: Copy sqlite lib to home # run: cp sqliteautoconf3390000_0.1.2_linux_arm64.tar.gz $HOME # tar -zxvf $HOME/sqliteautoconf3390000_0.1.2_linux_arm64.tar.gz -C $HOME # - name: unpack sqlite3 # run: | # tar -zxvf sqliteautoconf3390000_0.1.2_linux_arm64.tar.gz # cp -r sqliteautoconf3390000_0.1.2_linux_arm64/sql/ . # cp -r sql/ $HOME # export SQLITE3_LIB_DIR=$HOME/sql/lib # export SQLITE3_INCLUDE_DIR=$HOME/sql/include # cp -r $HOME/sql/ . # build static-linked binary for armv6 (also suitable for aarch64) - name: Build run: | export OPENSSL_LIB_DIR=$HOME/openssl/lib export OPENSSL_INCLUDE_DIR=$HOME/openssl/include export OPENSSL_STATIC=true export SQLITE3_STATIC=1 export PATH="$HOME/aarch64-linux-musl-cross/bin:$PATH" cargo build --target aarch64-unknown-linux-musl --release - name: Strip binaries (ankisyncd) run: $HOME/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip target/aarch64-unknown-linux-musl/release/ankisyncd - run: mv target/aarch64-unknown-linux-musl/release/ankisyncd aarch64-unknown-linux-musl-ankisyncd - uses: actions/upload-artifact@v2 with: name: binary path: aarch64-unknown-linux-musl-ankisyncd retention-days: 1 - uses: actions/upload-artifact@v2 with: name: binary path: scripts/ankisyncd.toml retention-days: 1 - uses: actions/upload-artifact@v2 with: name: binary path: scripts/entrypoint.sh retention-days: 1 docker: needs: [x64,arm64] runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Docker meta id: meta uses: docker/metadata-action@v4 with: # list of Docker images to use as base name for tags images: ankicommunity/anki-sync-server-rs # generate Docker tags based on the following events/attributes tags: | latest type=semver,pattern={{version}} # https://github.com/docker/setup-qemu-action - name: Set up QEMU uses: docker/setup-qemu-action@v2 # https://github.com/docker/setup-buildx-action - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Login to DockerHub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - uses: actions/download-artifact@v2 with: name: binary path: binary - name: Build and push uses: docker/build-push-action@v2 with: context: . file: .github/Dockerfile platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} cache-from: type=gha cache-to: type=gha,mode=max 07070100000009000081A40000000000000000000000016652BF4B000044C4000000000000000000000000000000000000003800000000anki-sync-server-rs-1.1.5/.github/workflows/release.ymlname: Create Release Draft # git push origin 0.5.3 to push local to remote on: workflow_dispatch: push: tags: ["[0-9]+.[0-9]+.[0-9]+*"] jobs: arm64: name: Build arm64 runs-on: ubuntu-latest # after every step is finished,exporting to PATH will be clear,so in next step ,need re-export steps: - name: Check out code uses: actions/checkout@v2 - name: Set up cargo uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable override: true # clone and patch anki library # need to disable bundled feature in rusqlite in anki lib,so copy after-modified cargo file - name: Clone patch Anki run: | sh ./scripts/clone_patch_anki - name: Install Protoc uses: arduino/setup-protoc@v1 with: version: '3.x' repo-token: ${{ secrets.GITHUB_TOKEN }} # - name: Install Protoc # run: | # PB_REL="https://github.com/protocolbuffers/protobuf/releases" # curl -LO $PB_REL/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip # mkdir -p $HOME/protoc # unzip protoc-3.15.8-linux-x86_64.zip -d $HOME/protoc - name: Add cargo taget arm64 run: rustup target add aarch64-unknown-linux-musl - uses: robinraju/release-downloader@v1.4 with: repository: "dobefore/musl-cross" tag: "0.1.0" fileName: "aarch64-linux-musl-cross.tgz" - name: Copy musl-cross to home run: cp aarch64-linux-musl-cross.tgz $HOME - name: unpack cross-compile toolchains musl run: tar -zxvf $HOME/aarch64-linux-musl-cross.tgz -C $HOME # # openssl - uses: robinraju/release-downloader@v1.4 with: repository: "dobefore/cross-compile-openssl-musl" tag: "1.1.1" fileName: "openssl1.1.1f_1.1.1_linux_arm64.tar.gz" - name: Copy openssl lib to home run: cp openssl1.1.1f_1.1.1_linux_arm64.tar.gz $HOME - name: unpack openssl run: | tar -zxvf $HOME/openssl1.1.1f_1.1.1_linux_arm64.tar.gz -C $HOME cp -r $HOME/openssl1.1.1f_1.1.1_linux_arm64/openssl/ $HOME # # sqlite3 seems to need it any more, # - uses: robinraju/release-downloader@v1.4 # with: # repository: "dobefore/cross-compile-sqlite-musl" # tag: "0.1.2" # fileName: "sqliteautoconf3390000_0.1.2_linux_arm64.tar.gz" # - name: Copy sqlite lib to home # run: cp sqliteautoconf3390000_0.1.2_linux_arm64.tar.gz $HOME # tar -zxvf $HOME/sqliteautoconf3390000_0.1.2_linux_arm64.tar.gz -C $HOME # - name: unpack sqlite3 # run: | # tar -zxvf sqliteautoconf3390000_0.1.2_linux_arm64.tar.gz # cp -r sqliteautoconf3390000_0.1.2_linux_arm64/sql/ . # cp -r sql/ $HOME # export SQLITE3_LIB_DIR=$HOME/sql/lib # export SQLITE3_INCLUDE_DIR=$HOME/sql/include # cp -r $HOME/sql/ . # build static-linked binary for armv6 (also suitable for aarch64) - name: Build run: | export OPENSSL_LIB_DIR=$HOME/openssl/lib export OPENSSL_INCLUDE_DIR=$HOME/openssl/include export OPENSSL_STATIC=true export SQLITE3_STATIC=1 export PATH="$HOME/aarch64-linux-musl-cross/bin:$PATH" cargo build --target aarch64-unknown-linux-musl --release - name: Strip binaries (ankisyncd) run: $HOME/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip target/aarch64-unknown-linux-musl/release/ankisyncd - name: Create output directory run: mkdir output - name: Copy files to output run: | cp target/aarch64-unknown-linux-musl/release/ankisyncd output/ cp ankisyncd.toml output/ - name: Upload artifact uses: actions/upload-artifact@v2 with: name: arm64 path: output/* # armv6: # name: Build armv6 # runs-on: ubuntu-latest # # after every step is finished,exporting to PATH will be clear,so in next step ,need re-export # steps: # - name: Check out code # uses: actions/checkout@v2 # - name: Set up cargo # uses: actions-rs/toolchain@v1 # with: # profile: minimal # toolchain: stable # override: true # # clone and patch anki library # # need to disable bundled feature in rusqlite in anki lib,so copy after-modified cargo file # - name: Clone patch Anki # run: | # sh ./scripts/clone_patch_anki # cp ./scripts/Cargo.toml anki/rslib/ # - name: Install Protoc # run: | # PB_REL="https://github.com/protocolbuffers/protobuf/releases" # curl -LO $PB_REL/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip # mkdir -p $HOME/protoc # unzip protoc-3.15.8-linux-x86_64.zip -d $HOME/protoc # - name: Add cargo taget armv6 # run: rustup target add arm-unknown-linux-musleabihf # - uses: robinraju/release-downloader@v1.4 # with: # repository: "dobefore/musl-cross" # tag: "0.1.0" # fileName: "arm-linux-musleabihf-cross.tgz" # - name: Copy musl-cross to home # run: cp arm-linux-musleabihf-cross.tgz $HOME # - name: unpack cross-compile toolchains musl # run: tar -zxvf $HOME/arm-linux-musleabihf-cross.tgz -C $HOME # # openssl # - uses: robinraju/release-downloader@v1.4 # with: # repository: "dobefore/cross-compile-openssl-musl" # tag: "1.1.1" # fileName: "openssl1.1.1f_1.1.1_linux_armv6.tar.gz" # - name: Copy openssl lib to home # run: cp openssl1.1.1f_1.1.1_linux_armv6.tar.gz $HOME # - name: unpack openssl # run: | # tar -zxvf $HOME/openssl1.1.1f_1.1.1_linux_armv6.tar.gz -C $HOME # cp -r $HOME/openssl1.1.1f_1.1.1_linux_armv6/openssl/ $HOME # # sqlite3 # - uses: robinraju/release-downloader@v1.4 # with: # repository: "dobefore/cross-compile-sqlite-musl" # tag: "0.1.1" # fileName: "sqliteautoconf3390400_0.1.1_linux_armv6.tar.gz" # - name: Copy sqlite lib to home # run: cp sqliteautoconf3390400_0.1.1_linux_armv6.tar.gz $HOME # - name: unpack sqlite3 # run: | # tar -zxvf $HOME/sqliteautoconf3390400_0.1.1_linux_armv6.tar.gz -C $HOME # cd $HOME/sqliteautoconf3390400_0.1.1_linux_armv6/ # cp -r sql/ $HOME # # build static-linked binary for armv6 (also suitable for aarch64) # - name: Build # run: | # export PATH="$PATH:$HOME/protoc/bin" # export OPENSSL_LIB_DIR=$HOME/openssl/lib # export OPENSSL_INCLUDE_DIR=$HOME/openssl/include # export OPENSSL_STATIC=true # export SQLITE3_LIB_DIR=$HOME/sql/lib # export SQLITE3_INCLUDE_DIR=$HOME/sql/include # export SQLITE3_STATIC=1 # cp -r $HOME/sql/ . # export PATH="$HOME/arm-linux-musleabihf-cross/bin:$PATH" # cargo build --target arm-unknown-linux-musleabihf --release --features tls # - name: Strip binaries (ankisyncd) # run: $HOME/arm-linux-musleabihf-cross/bin/arm-linux-musleabihf-strip target/arm-unknown-linux-musleabihf/release/ankisyncd # - name: Create output directory # run: mkdir output # - name: Copy files to output # run: | # cp target/arm-unknown-linux-musleabihf/release/ankisyncd output/ # cp ankisyncd.toml output/ # - name: Upload artifact # uses: actions/upload-artifact@v2 # with: # name: armv6 # path: output/* linux: name: Build Linux runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@v2 - name: Set up cargo uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable override: true - name: Add cargo taget arm64 run: rustup target add x86_64-unknown-linux-musl # clone and patch anki library - name: Clone patch Anki run: sh ./scripts/clone_patch_anki - name: Install Protoc uses: arduino/setup-protoc@v1 with: version: '3.x' repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: robinraju/release-downloader@v1.4 with: repository: "dobefore/musl-cross" tag: "0.1.0" fileName: "x86_64-linux-musl-cross.tgz" - name: Copy musl-cross to home run: cp x86_64-linux-musl-cross.tgz $HOME - name: unpack cross-compile toolchains musl run: tar -zxvf $HOME/x86_64-linux-musl-cross.tgz -C $HOME # - name: Install Protoc # run: | # PB_REL="https://github.com/protocolbuffers/protobuf/releases" # curl -LO $PB_REL/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip # mkdir -p $HOME/protoc # unzip protoc-3.15.8-linux-x86_64.zip -d $HOME/protoc # export PATH="$PATH:$HOME/protoc/bin" - name: Build run: | sudo apt install musl-tools export PATH="$HOME/x86_64-linux-musl-cross/bin:$PATH" cargo build --target x86_64-unknown-linux-musl --release - name: Strip binaries (ankisyncd) run: $HOME/x86_64-linux-musl-cross/bin/x86_64-linux-musl-strip target/x86_64-unknown-linux-musl/release/ankisyncd # - name: Strip binaries (ankisyncd) # run: strip target/release/ankisyncd - name: Create output directory run: mkdir output - name: Copy files to output run: | cp target/x86_64-unknown-linux-musl/release/ankisyncd output/ cp ankisyncd.toml output/ - name: Upload artifact uses: actions/upload-artifact@v2 with: name: linux path: output/* macos: name: Build macOS runs-on: macos-latest steps: - name: Check out code uses: actions/checkout@v2 - name: Set up cargo uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable override: true - name: Set up python uses: actions/setup-python@v2 # clone and patch anki library - name: Clone patch Anki run: sh ./scripts/clone_patch_anki - name: Install Protoc uses: arduino/setup-protoc@v1 with: version: '3.x' repo-token: ${{ secrets.GITHUB_TOKEN }} # - name: Install protoc # run: | # /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # brew install protobuf - name: Build uses: actions-rs/cargo@v1 with: command: build args: --release --features tls - name: Strip binaries (ankisyncd) run: strip target/release/ankisyncd - name: Create output directory run: mkdir output - name: Copy files to output run: | cp target/release/ankisyncd output/ cp ankisyncd.toml output/ - name: Upload artifact uses: actions/upload-artifact@v2 with: name: macos path: output/* windows: name: Build Windows runs-on: windows-latest steps: - name: Check out code uses: actions/checkout@v2 - name: Set up cargo uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable override: true # clone and patch anki library - name: Clone patch Anki run: .\scripts\clone_patch_anki.bat - name: Install Protoc uses: arduino/setup-protoc@v1 with: version: '3.x' repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Build uses: actions-rs/cargo@v1 with: command: build args: --release --features tls - name: Create output directory run: mkdir output - name: Copy files to output run: | cp target\release\ankisyncd.exe output\ cp ankisyncd.toml output\ - name: Upload artifact uses: actions/upload-artifact@v2 with: name: windows path: output\* release: name: Publish Release runs-on: ubuntu-latest needs: - linux - macos - windows - arm64 steps: - name: Check out code uses: actions/checkout@v2 - name: Determine Release Info id: info env: GITHUB_REF: ${{ github.ref }} run: | VERSION=${GITHUB_REF##*/} MAJOR=${VERSION%%.*} MINOR=${VERSION%.*} MINOR=${MINOR#*.} PATCH=${VERSION##*.} echo "::set-output name=version::${VERSION}" echo "::set-output name=linuxdir::ankisyncd_${MAJOR}.${MINOR}.${PATCH}_linux_x64" echo "::set-output name=macosdir::ankisyncd_${MAJOR}.${MINOR}.${PATCH}_macOS_x64" echo "::set-output name=windowsdir::ankisyncd_${MAJOR}.${MINOR}.${PATCH}_windows_x64" echo "::set-output name=arm64dir::ankisyncd_${MAJOR}.${MINOR}.${PATCH}_linux_arm64" echo "::set-output name=innerdir::ankisyncd-${VERSION}" - name: Create Release Draft id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.ref }} release_name: ${{ steps.info.outputs.version }} Release draft: true - name: Create arm64 Directory run: mkdir -p ${{ steps.info.outputs.arm64dir }} - name: Download arm64 Artifacts uses: actions/download-artifact@v2 with: name: arm64 path: ${{ steps.info.outputs.arm64dir }} - name: Restore arm64 File Modes run: | chmod 755 ${{ steps.info.outputs.arm64dir }}/ankisyncd* - name: Create arm64 tarball run: tar -zcvf ${{ steps.info.outputs.arm64dir }}.tar.gz ${{ steps.info.outputs.arm64dir }} - name: Upload arm64 Artifact uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./${{ steps.info.outputs.arm64dir }}.tar.gz asset_name: ${{ steps.info.outputs.arm64dir }}.tar.gz asset_content_type: application/gzip - name: Create Linux Directory run: mkdir -p ${{ steps.info.outputs.linuxdir }} - name: Download Linux Artifacts uses: actions/download-artifact@v2 with: name: linux path: ${{ steps.info.outputs.linuxdir }} - name: Restore Linux File Modes run: | chmod 755 ${{ steps.info.outputs.linuxdir }}/ankisyncd* - name: Create Linux tarball run: tar -zcvf ${{ steps.info.outputs.linuxdir }}.tar.gz ${{ steps.info.outputs.linuxdir }} - name: Upload Linux Artifact uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./${{ steps.info.outputs.linuxdir }}.tar.gz asset_name: ${{ steps.info.outputs.linuxdir }}.tar.gz asset_content_type: application/gzip - name: Create macOS Directory run: mkdir -p ${{ steps.info.outputs.macosdir }} - name: Download macOS Artifacts uses: actions/download-artifact@v2 with: name: macos path: ${{ steps.info.outputs.macosdir }} - name: Restore macOS File Modes run: chmod 755 ${{ steps.info.outputs.macosdir }}/ankisyncd* - name: Create macOS Archive run: zip -r ${{ steps.info.outputs.macosdir }}.zip ${{ steps.info.outputs.macosdir }} - name: Upload macOS Artifact uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./${{ steps.info.outputs.macosdir }}.zip asset_name: ${{ steps.info.outputs.macosdir }}.zip asset_content_type: application/zip - name: Create Windows Directory run: mkdir -p ${{ steps.info.outputs.windowsdir }} - name: Download Windows artifact uses: actions/download-artifact@v2 with: name: windows path: ${{ steps.info.outputs.windowsdir }} - name: Show Windows Artifacts run: ls -la ${{ steps.info.outputs.windowsdir }} - name: Create Windows Archive run: zip -r ${{ steps.info.outputs.windowsdir }}.zip ${{ steps.info.outputs.windowsdir }} - name: Upload Windows binary uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./${{ steps.info.outputs.windowsdir }}.zip asset_name: ${{ steps.info.outputs.windowsdir }}.zip asset_content_type: application/zip 0707010000000A000081A40000000000000000000000016652BF4B0000021B000000000000000000000000000000000000002500000000anki-sync-server-rs-1.1.5/.gitignore# Ignore rust build dir /target # Ignore prototyping dir /tmp # Ignore anki repo clone /anki/ # Ignore test db and files when running in dev folder auth.db session.db collections/ # Ignore vim files # Copy of https://github.com/github/gitignore/blob/master/Global/Vim.gitignore # Swap [._]*.s[a-v][a-z] !*.svg # comment out if you don't need vector files [._]*.sw[a-p] [._]s[a-rt-v][a-z] [._]ss[a-gi-z] [._]sw[a-p] # Session Session.vim Sessionx.vim # Temporary .netrwhist *~ # Auto-generated tag files tags # Persistent undo [._]*.un~ 0707010000000B000081A40000000000000000000000016652BF4B00000137000000000000000000000000000000000000003200000000anki-sync-server-rs-1.1.5/.pre-commit-config.yamlrepos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.1.0 hooks: - id: check-added-large-files - id: check-toml - id: destroyed-symlinks - id: no-commit-to-branch - repo: https://github.com/doublify/pre-commit-rust rev: v1.0 hooks: - id: clippy - id: fmt - id: cargo-check 0707010000000C000041ED0000000000000000000000026652BF4B00000000000000000000000000000000000000000000002200000000anki-sync-server-rs-1.1.5/.vscode0707010000000D000081A40000000000000000000000016652BF4B00000094000000000000000000000000000000000000003000000000anki-sync-server-rs-1.1.5/.vscode/settings.json{ "editor.tabCompletion": "on", "diffEditor.codeLens": true, "githubPullRequests.ignoredPullRequestBranches": [ "master" ] }0707010000000E000081A40000000000000000000000016652BF4B000003E9000000000000000000000000000000000000002A00000000anki-sync-server-rs-1.1.5/CONTRIBUTING.md# How to contribute to this project First of all thanks for the interest and your willingness to give your precious time to this project! If you want to ensure your contribution acceptance please open an issue before contributing. We use the classical forge fork and merge pipeline. ## Setup the development environment Prerequisite: - rust dev toolchain (see [rustup](https://rustup.rs/) if needed) including `cargo`, `cargo check`,`cargo clippy`, - [pre-commit](https://pre-commit.com/) (install using `pip install --user pre-commit` if needed) Steps: 1. Fork this this repository, then clone the fork using git and enter it 2. Install precommit hooks `pre-commit install --install-hooks` 3. Checkout a branch for your contribution `git checkout -b my-new-feature` 4. Push your new feature 5. Open an MR at [ankicommunity/anki-sync-server-rs](https://github.com/ankicommunity/anki-sync-server-rs) ## During development Use `scripts/build_all` to check if building works with each feature. 0707010000000F000081A40000000000000000000000016652BF4B00024A14000000000000000000000000000000000000002500000000anki-sync-server-rs-1.1.5/Cargo.lock# This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 3 [[package]] name = "actix-codec" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" dependencies = [ "bitflags 2.5.0", "bytes", "futures-core", "futures-sink", "memchr", "pin-project-lite", "tokio", "tokio-util", "tracing", ] [[package]] name = "actix-http" version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4eb9843d84c775696c37d9a418bbb01b932629d01870722c0f13eb3f95e2536d" dependencies = [ "actix-codec", "actix-rt", "actix-service", "actix-tls", "actix-utils", "ahash", "base64 0.22.1", "bitflags 2.5.0", "brotli", "bytes", "bytestring", "derive_more", "encoding_rs", "flate2", "futures-core", "h2", "http", "httparse", "httpdate", "itoa", "language-tags", "local-channel", "mime", "percent-encoding", "pin-project-lite", "rand", "sha1", "smallvec", "tokio", "tokio-util", "tracing", "zstd 0.13.1", ] [[package]] name = "actix-macros" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", "syn 2.0.66", ] [[package]] name = "actix-multipart" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9edfb0e7663d7fe18c8d5b668c9c1bcf79176b1dcc9d4da9592503209a6bfb0" dependencies = [ "actix-utils", "actix-web", "bytes", "derive_more", "futures-core", "httparse", "local-waker", "log", "mime", "twoway", ] [[package]] name = "actix-router" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" dependencies = [ "bytestring", "cfg-if", "http", "regex", "regex-lite", "serde", "tracing", ] [[package]] name = "actix-rt" version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d" dependencies = [ "futures-core", "tokio", ] [[package]] name = "actix-server" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3eb13e7eef0423ea6eab0e59f6c72e7cb46d33691ad56a726b3cd07ddec2c2d4" dependencies = [ "actix-rt", "actix-service", "actix-utils", "futures-core", "futures-util", "mio", "socket2 0.5.7", "tokio", "tracing", ] [[package]] name = "actix-service" version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b894941f818cfdc7ccc4b9e60fa7e53b5042a2e8567270f9147d5591893373a" dependencies = [ "futures-core", "paste", "pin-project-lite", ] [[package]] name = "actix-tls" version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac453898d866cdbecdbc2334fe1738c747b4eba14a677261f2b768ba05329389" dependencies = [ "actix-rt", "actix-service", "actix-utils", "futures-core", "impl-more", "pin-project-lite", "tokio", "tokio-rustls", "tokio-util", "tracing", "webpki-roots 0.22.6", ] [[package]] name = "actix-utils" version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" dependencies = [ "local-waker", "pin-project-lite", ] [[package]] name = "actix-web" version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1cf67dadb19d7c95e5a299e2dda24193b89d5d4f33a3b9800888ede9e19aa32" dependencies = [ "actix-codec", "actix-http", "actix-macros", "actix-router", "actix-rt", "actix-server", "actix-service", "actix-tls", "actix-utils", "actix-web-codegen", "ahash", "bytes", "bytestring", "cfg-if", "cookie", "derive_more", "encoding_rs", "futures-core", "futures-util", "itoa", "language-tags", "log", "mime", "once_cell", "pin-project-lite", "regex", "regex-lite", "serde", "serde_json", "serde_urlencoded", "smallvec", "socket2 0.5.7", "time", "url", ] [[package]] name = "actix-web-codegen" version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5" dependencies = [ "actix-router", "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "addr2line" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] [[package]] name = "adler" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aes" version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", "cpufeatures", ] [[package]] name = "ahash" version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "getrandom", "once_cell", "version_check", "zerocopy", ] [[package]] name = "aho-corasick" version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "alloc-no-stdlib" version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" [[package]] name = "alloc-stdlib" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" dependencies = [ "alloc-no-stdlib", ] [[package]] name = "allocator-api2" version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "ammonia" version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64e6d1c7838db705c9b756557ee27c384ce695a1c51a6fe528784cb1c6840170" dependencies = [ "html5ever", "maplit", "once_cell", "tendril", "url", ] [[package]] name = "android-tzdata" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" [[package]] name = "android_system_properties" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" dependencies = [ "libc", ] [[package]] name = "anki" version = "0.0.0" dependencies = [ "ammonia", "anki_i18n", "anki_io", "anki_proto", "anki_proto_gen", "anyhow", "async-compression", "async-trait", "axum", "axum-client-ip", "blake3", "bytes", "chrono", "coarsetime", "convert_case 0.6.0", "csv", "data-encoding", "difflib", "dirs", "envy", "flate2", "fluent", "fluent-bundle", "fnv", "fsrs", "futures", "hex", "htmlescape", "hyper", "id_tree", "inflections", "itertools", "lazy_static", "nom", "num_cpus", "num_enum", "once_cell", "pbkdf2 0.12.2", "percent-encoding-iri", "phf 0.11.2", "pin-project", "prettyplease", "prost", "prost-reflect", "pulldown-cmark", "rand", "regex", "reqwest", "rusqlite", "scopeguard", "serde", "serde-aux", "serde_json", "serde_repr", "serde_tuple", "sha1", "snafu", "strum 0.26.2", "syn 2.0.66", "tempfile", "tokio", "tokio-util", "tower-http", "tracing", "tracing-appender", "tracing-subscriber", "unic-ucd-category", "unicase", "unicode-normalization", "utime", "windows 0.54.0", "zip", "zstd 0.13.1", ] [[package]] name = "anki_i18n" version = "0.0.0" dependencies = [ "anki_io", "anyhow", "fluent", "fluent-bundle", "fluent-syntax", "inflections", "intl-memoizer", "itertools", "num-format", "phf 0.11.2", "serde", "serde_json", "unic-langid", ] [[package]] name = "anki_io" version = "0.0.0" dependencies = [ "camino", "snafu", "tempfile", ] [[package]] name = "anki_proto" version = "0.0.0" dependencies = [ "anki_io", "anki_proto_gen", "anyhow", "inflections", "itertools", "prost", "prost-build", "prost-reflect", "prost-types", "serde", "snafu", "strum 0.26.2", ] [[package]] name = "anki_proto_gen" version = "0.0.0" dependencies = [ "anki_io", "anyhow", "camino", "inflections", "itertools", "once_cell", "prost-reflect", "prost-types", "regex", "walkdir", ] [[package]] name = "ankisyncd" version = "1.1.5" dependencies = [ "actix-multipart", "actix-web", "anki", "async-std", "async-trait", "bytes", "clap", "env_logger_successor", "flate2", "futures-util", "hex", "lazy_static", "log", "md5", "pbkdf2 0.12.2", "rand", "rusqlite", "rustls 0.20.9", "rustls-pemfile", "serde", "serde_json", "sha2", "thiserror", "toml", "unicode-normalization", "urlparse", "zip", "zstd 0.12.4", ] [[package]] name = "anstream" version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" [[package]] name = "anstyle-parse" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" dependencies = [ "anstyle", "windows-sys 0.52.0", ] [[package]] name = "anyhow" version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "arrayref" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "ash" version = "0.37.3+1.3.251" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" dependencies = [ "libloading 0.7.4", ] [[package]] name = "async-channel" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", "event-listener 2.5.3", "futures-core", ] [[package]] name = "async-channel" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", "event-listener-strategy 0.5.2", "futures-core", "pin-project-lite", ] [[package]] name = "async-compression" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c90a406b4495d129f00461241616194cb8a032c8d1c53c657f0961d5f8e0498" dependencies = [ "futures-core", "memchr", "pin-project-lite", "tokio", "zstd 0.13.1", "zstd-safe 7.1.0", ] [[package]] name = "async-executor" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8828ec6e544c02b0d6691d21ed9f9218d0384a82542855073c2a3f58304aaf0" dependencies = [ "async-task", "concurrent-queue", "fastrand 2.1.0", "futures-lite 2.3.0", "slab", ] [[package]] name = "async-global-executor" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ "async-channel 2.3.1", "async-executor", "async-io 2.3.2", "async-lock 3.3.0", "blocking", "futures-lite 2.3.0", "once_cell", ] [[package]] name = "async-io" version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ "async-lock 2.8.0", "autocfg", "cfg-if", "concurrent-queue", "futures-lite 1.13.0", "log", "parking", "polling 2.8.0", "rustix 0.37.27", "slab", "socket2 0.4.10", "waker-fn", ] [[package]] name = "async-io" version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" dependencies = [ "async-lock 3.3.0", "cfg-if", "concurrent-queue", "futures-io", "futures-lite 2.3.0", "parking", "polling 3.7.0", "rustix 0.38.34", "slab", "tracing", "windows-sys 0.52.0", ] [[package]] name = "async-lock" version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ "event-listener 2.5.3", ] [[package]] name = "async-lock" version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ "event-listener 4.0.3", "event-listener-strategy 0.4.0", "pin-project-lite", ] [[package]] name = "async-std" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" dependencies = [ "async-channel 1.9.0", "async-global-executor", "async-io 1.13.0", "async-lock 2.8.0", "crossbeam-utils", "futures-channel", "futures-core", "futures-io", "futures-lite 1.13.0", "gloo-timers", "kv-log-macro", "log", "memchr", "once_cell", "pin-project-lite", "pin-utils", "slab", "wasm-bindgen-futures", ] [[package]] name = "async-task" version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "atomic-waker" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "atty" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi 0.1.19", "libc", "winapi", ] [[package]] name = "autocfg" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "axum" version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", "axum-core", "axum-macros", "bitflags 1.3.2", "bytes", "futures-util", "headers", "http", "http-body", "hyper", "itoa", "matchit", "memchr", "mime", "multer", "percent-encoding", "pin-project-lite", "rustversion", "serde", "serde_json", "serde_path_to_error", "serde_urlencoded", "sync_wrapper", "tokio", "tower", "tower-layer", "tower-service", ] [[package]] name = "axum-client-ip" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ef117890a418b7832678d9ea1e1c08456dd7b2fd1dadb9676cd6f0fe7eb4b21" dependencies = [ "axum", "forwarded-header-value", "serde", ] [[package]] name = "axum-core" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" dependencies = [ "async-trait", "bytes", "futures-util", "http", "http-body", "mime", "rustversion", "tower-layer", "tower-service", ] [[package]] name = "axum-macros" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdca6a10ecad987bda04e95606ef85a5417dcaac1a78455242d72e031e2b6b62" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "backtrace" version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", ] [[package]] name = "base64" version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bincode" version = "2.0.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f11ea1a0346b94ef188834a65c068a03aec181c94896d481d7a0a40d85b0ce95" dependencies = [ "serde", ] [[package]] name = "bit-set" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" dependencies = [ "bit-vec", ] [[package]] name = "bit-vec" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] name = "bit_field" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" [[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "blake3" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" dependencies = [ "arrayref", "arrayvec", "cc", "cfg-if", "constant_time_eq 0.3.0", ] [[package]] name = "block" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "block-buffer" version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] [[package]] name = "blocking" version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ "async-channel 2.3.1", "async-task", "futures-io", "futures-lite 2.3.0", "piper", ] [[package]] name = "brotli" version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", "brotli-decompressor", ] [[package]] name = "brotli-decompressor" version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6221fe77a248b9117d431ad93761222e1cf8ff282d9d1d5d9f53d6299a1cf76" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", ] [[package]] name = "bumpalo" version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "burn" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6b703e5dae87b2146649b64af54688ff86e16cf69fd19d28c43c8f9656d7d7c" dependencies = [ "burn-core", "burn-train", ] [[package]] name = "burn-autodiff" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f306e1b2e480fa0960c3130a68ca5e0fa54b3e33ed2fda7cf2121434703dd771" dependencies = [ "burn-common", "burn-tensor", "derive-new", "spin 0.9.8", ] [[package]] name = "burn-candle" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc87b644a2d83cc1b7c05d1176e9e24fb6394272256ab9ab8324ff7c4fe0e6a0" dependencies = [ "burn-tensor", "candle-core", "derive-new", "half", ] [[package]] name = "burn-common" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1267068969f094323b62693df0c3b45d3b08a0568f3c3467e6a5c3207e6807c8" dependencies = [ "async-trait", "derive-new", "getrandom", "rand", "serde", "spin 0.9.8", "uuid", "web-time", ] [[package]] name = "burn-compute" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1b51588cf7c84976f6241a9ac5f77857712b8bf443dab77296c260785033fe8" dependencies = [ "burn-common", "derive-new", "dirs", "hashbrown 0.14.5", "log", "md5", "serde", "serde_json", "spin 0.9.8", "web-time", ] [[package]] name = "burn-core" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b11d8fd1e8c656eee1a0bb503b798c4583904dcaf7a369cbb8fdfd3acc3d0ab" dependencies = [ "bincode", "burn-autodiff", "burn-candle", "burn-common", "burn-dataset", "burn-derive", "burn-fusion", "burn-ndarray", "burn-tch", "burn-tensor", "burn-wgpu", "derive-new", "flate2", "half", "hashbrown 0.14.5", "libm", "log", "rand", "rmp-serde", "serde", "serde_json", "spin 0.9.8", ] [[package]] name = "burn-dataset" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6050891281ae38ee9dc24d1d5badd084247717b15e3dcdae562a81456a41c6e" dependencies = [ "csv", "derive-new", "dirs", "gix-tempfile", "image", "r2d2", "r2d2_sqlite", "rand", "rmp-serde", "rusqlite", "sanitize-filename", "serde", "serde_json", "serde_rusqlite", "strum 0.25.0", "strum_macros 0.25.3", "tempfile", "thiserror", ] [[package]] name = "burn-derive" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70f149de5f32baa3f2191c374edab71e5a323bade05eb6092c702aed76cdcb7b" dependencies = [ "derive-new", "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "burn-fusion" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f512f780beaefca46088c4e4a80595511fbc3b35545118281fbf49f1fca767b4" dependencies = [ "burn-common", "burn-tensor", "derive-new", "hashbrown 0.14.5", "log", "serde", "spin 0.9.8", ] [[package]] name = "burn-ndarray" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aef9fb0b72a1c0a112ed51e35284fb663d3ba3fd98f3a3bfa32db39fd24ae4d" dependencies = [ "burn-autodiff", "burn-common", "burn-tensor", "derive-new", "libm", "matrixmultiply", "ndarray", "num-traits", "rand", "rayon", "spin 0.9.8", ] [[package]] name = "burn-tch" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3d7aec36d836c5a11714480089738120899e2c91f6fe2e23abd09ec4a68a803" dependencies = [ "burn-tensor", "half", "libc", "rand", "tch", ] [[package]] name = "burn-tensor" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad09aeb0f2428a4ee91f9876a7d71cef6feb1fcacdab6389362dd878ec5f9b27" dependencies = [ "burn-common", "derive-new", "half", "hashbrown 0.14.5", "libm", "num-traits", "rand", "rand_distr", "serde", ] [[package]] name = "burn-train" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd5536e98b23dd5047728f288e61e8a4d9fbffef6f55086d3483c2464758508d" dependencies = [ "burn-core", "derive-new", "log", "serde", "tracing-appender", "tracing-core", "tracing-subscriber", ] [[package]] name = "burn-wgpu" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "231d2deb14a02838c29dd5e90d1a87a9578d76bda7b02d5c7a77e5440ef6ae95" dependencies = [ "burn-common", "burn-compute", "burn-tensor", "bytemuck", "derive-new", "futures-intrusive", "hashbrown 0.14.5", "log", "num-traits", "pollster", "rand", "serde", "spin 0.9.8", "text_placeholder", "wgpu", ] [[package]] name = "bytemuck" version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "369cfaf2a5bed5d8f8202073b2e093c9f508251de1551a0deb4253e4c7d80909" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "byteorder" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "bytestring" version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74d80203ea6b29df88012294f62733de21cfeab47f17b41af3a38bc30a03ee72" dependencies = [ "bytes", ] [[package]] name = "bzip2" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" dependencies = [ "bzip2-sys", "libc", ] [[package]] name = "bzip2-sys" version = "0.1.11+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" dependencies = [ "cc", "libc", "pkg-config", ] [[package]] name = "camino" version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" [[package]] name = "candle-core" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db8659ea87ee8197d2fc627348916cce0561330ee7ae3874e771691d3cecb2f" dependencies = [ "byteorder", "gemm", "half", "memmap2", "num-traits", "num_cpus", "rand", "rand_distr", "rayon", "safetensors 0.4.3", "thiserror", "yoke", "zip", ] [[package]] name = "cc" version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" dependencies = [ "jobserver", "libc", "once_cell", ] [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", "windows-targets 0.52.5", ] [[package]] name = "cipher" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", ] [[package]] name = "clap" version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" dependencies = [ "clap_builder", "clap_derive", ] [[package]] name = "clap_builder" version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstream", "anstyle", "clap_lex", "strsim", ] [[package]] name = "clap_derive" version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "clap_lex" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "coarsetime" version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b3839cf01bb7960114be3ccf2340f541b6d0c81f8690b007b2b39f750f7e5d" dependencies = [ "libc", "wasix", "wasm-bindgen", ] [[package]] name = "codespan-reporting" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" dependencies = [ "termcolor", "unicode-width", ] [[package]] name = "color_quant" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "colorchoice" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] name = "com-rs" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf43edc576402991846b093a7ca18a3477e0ef9c588cde84964b5d3e43016642" [[package]] name = "concurrent-queue" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] [[package]] name = "constant_time_eq" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "constant_time_eq" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "convert_case" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "convert_case" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" dependencies = [ "unicode-segmentation", ] [[package]] name = "cookie" version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ "percent-encoding", "time", "version_check", ] [[package]] name = "core-foundation" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", ] [[package]] name = "core-foundation-sys" version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core-graphics-types" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" dependencies = [ "bitflags 1.3.2", "core-foundation", "libc", ] [[package]] name = "cpufeatures" version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] [[package]] name = "crc32fast" version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-common" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", ] [[package]] name = "csv" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" dependencies = [ "csv-core", "itoa", "ryu", "serde", ] [[package]] name = "csv-core" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" dependencies = [ "memchr", ] [[package]] name = "d3d12" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e16e44ab292b1dddfdaf7be62cfd8877df52f2f3fde5858d95bab606be259f20" dependencies = [ "bitflags 2.5.0", "libloading 0.8.3", "winapi", ] [[package]] name = "dashmap" version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", "hashbrown 0.14.5", "lock_api", "once_cell", "parking_lot_core", ] [[package]] name = "data-encoding" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "deranged" version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", ] [[package]] name = "derive-new" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "derive_more" version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case 0.4.0", "proc-macro2", "quote", "rustc_version", "syn 1.0.109", ] [[package]] name = "difflib" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" [[package]] name = "digest" version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", "subtle", ] [[package]] name = "dirs" version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ "dirs-sys", ] [[package]] name = "dirs-sys" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", "option-ext", "redox_users", "windows-sys 0.48.0", ] [[package]] name = "displaydoc" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "dyn-stack" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56e53799688f5632f364f8fb387488dd05db9fe45db7011be066fc20e7027f8b" dependencies = [ "bytemuck", "reborrow", ] [[package]] name = "either" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" [[package]] name = "encoding_rs" version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] [[package]] name = "enum-as-inner" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "env_logger_successor" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6bddad96eada09718ff0563da8946298d8780bbb6863606e8e4f29e611252a4" dependencies = [ "atty", "chrono", "humantime", "log", "regex", "termcolor", ] [[package]] name = "envy" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f47e0157f2cb54f5ae1bd371b30a2ae4311e1c028f575cd4e81de7353215965" dependencies = [ "serde", ] [[package]] name = "equivalent" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", ] [[package]] name = "event-listener" version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" dependencies = [ "concurrent-queue", "parking", "pin-project-lite", ] [[package]] name = "event-listener" version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" dependencies = [ "concurrent-queue", "parking", "pin-project-lite", ] [[package]] name = "event-listener-strategy" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" dependencies = [ "event-listener 4.0.3", "pin-project-lite", ] [[package]] name = "event-listener-strategy" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ "event-listener 5.3.0", "pin-project-lite", ] [[package]] name = "exr" version = "1.72.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "887d93f60543e9a9362ef8a21beedd0a833c5d9610e18c67abe15a5963dcb1a4" dependencies = [ "bit_field", "flume", "half", "lebe", "miniz_oxide", "rayon-core", "smallvec", "zune-inflate", ] [[package]] name = "fallible-iterator" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" [[package]] name = "fallible-streaming-iterator" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" [[package]] name = "faster-hex" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2a2b11eda1d40935b26cf18f6833c526845ae8c41e58d09af6adeb6f0269183" dependencies = [ "serde", ] [[package]] name = "fastrand" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ "instant", ] [[package]] name = "fastrand" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "fdeflate" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645" dependencies = [ "simd-adler32", ] [[package]] name = "fixedbitset" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ "crc32fast", "miniz_oxide", ] [[package]] name = "fluent" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb74634707bebd0ce645a981148e8fb8c7bccd4c33c652aeffd28bf2f96d555a" dependencies = [ "fluent-bundle", "unic-langid", ] [[package]] name = "fluent-bundle" version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fe0a21ee80050c678013f82edf4b705fe2f26f1f9877593d13198612503f493" dependencies = [ "fluent-langneg", "fluent-syntax", "intl-memoizer", "intl_pluralrules", "rustc-hash", "self_cell 0.10.3", "smallvec", "unic-langid", ] [[package]] name = "fluent-langneg" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c4ad0989667548f06ccd0e306ed56b61bd4d35458d54df5ec7587c0e8ed5e94" dependencies = [ "unic-langid", ] [[package]] name = "fluent-syntax" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a530c4694a6a8d528794ee9bbd8ba0122e779629ac908d15ad5a7ae7763a33d" dependencies = [ "thiserror", ] [[package]] name = "flume" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" dependencies = [ "futures-core", "futures-sink", "nanorand", "spin 0.9.8", ] [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foreign-types" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" dependencies = [ "foreign-types-macros", "foreign-types-shared", ] [[package]] name = "foreign-types-macros" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "foreign-types-shared" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" [[package]] name = "form_urlencoded" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[package]] name = "forwarded-header-value" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8835f84f38484cc86f110a805655697908257fb9a7af005234060891557198e9" dependencies = [ "nonempty", "thiserror", ] [[package]] name = "fsrs" version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84a04c31041078628c5ce7310be96c987bf7f33a3f8815fa0fcdb084eb31feba" dependencies = [ "burn", "itertools", "log", "ndarray", "ndarray-rand", "rand", "rayon", "serde", "snafu", "strum 0.26.2", ] [[package]] name = "futf" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" dependencies = [ "mac", "new_debug_unreachable", ] [[package]] name = "futures" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", "futures-executor", "futures-io", "futures-sink", "futures-task", "futures-util", ] [[package]] name = "futures-channel" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", ] [[package]] name = "futures-core" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", "futures-util", ] [[package]] name = "futures-intrusive" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" dependencies = [ "futures-core", "lock_api", "parking_lot", ] [[package]] name = "futures-io" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ "fastrand 1.9.0", "futures-core", "futures-io", "memchr", "parking", "pin-project-lite", "waker-fn", ] [[package]] name = "futures-lite" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ "fastrand 2.1.0", "futures-core", "futures-io", "parking", "pin-project-lite", ] [[package]] name = "futures-macro" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "futures-sink" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", "futures-io", "futures-macro", "futures-sink", "futures-task", "memchr", "pin-project-lite", "pin-utils", "slab", ] [[package]] name = "gemm" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ab24cc62135b40090e31a76a9b2766a501979f3070fa27f689c27ec04377d32" dependencies = [ "dyn-stack", "gemm-c32", "gemm-c64", "gemm-common", "gemm-f16", "gemm-f32", "gemm-f64", "num-complex", "num-traits", "paste", "raw-cpuid", "seq-macro", ] [[package]] name = "gemm-c32" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9c030d0b983d1e34a546b86e08f600c11696fde16199f971cd46c12e67512c0" dependencies = [ "dyn-stack", "gemm-common", "num-complex", "num-traits", "paste", "raw-cpuid", "seq-macro", ] [[package]] name = "gemm-c64" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbb5f2e79fefb9693d18e1066a557b4546cd334b226beadc68b11a8f9431852a" dependencies = [ "dyn-stack", "gemm-common", "num-complex", "num-traits", "paste", "raw-cpuid", "seq-macro", ] [[package]] name = "gemm-common" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2e7ea062c987abcd8db95db917b4ffb4ecdfd0668471d8dc54734fdff2354e8" dependencies = [ "bytemuck", "dyn-stack", "half", "num-complex", "num-traits", "once_cell", "paste", "pulp", "raw-cpuid", "rayon", "seq-macro", "sysctl", ] [[package]] name = "gemm-f16" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ca4c06b9b11952071d317604acb332e924e817bd891bec8dfb494168c7cedd4" dependencies = [ "dyn-stack", "gemm-common", "gemm-f32", "half", "num-complex", "num-traits", "paste", "raw-cpuid", "rayon", "seq-macro", ] [[package]] name = "gemm-f32" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9a69f51aaefbd9cf12d18faf273d3e982d9d711f60775645ed5c8047b4ae113" dependencies = [ "dyn-stack", "gemm-common", "num-complex", "num-traits", "paste", "raw-cpuid", "seq-macro", ] [[package]] name = "gemm-f64" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa397a48544fadf0b81ec8741e5c0fba0043008113f71f2034def1935645d2b0" dependencies = [ "dyn-stack", "gemm-common", "num-complex", "num-traits", "paste", "raw-cpuid", "seq-macro", ] [[package]] name = "generic-array" version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", ] [[package]] name = "getopts" version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" dependencies = [ "unicode-width", ] [[package]] name = "getrandom" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", "libc", "wasi", "wasm-bindgen", ] [[package]] name = "gif" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2" dependencies = [ "color_quant", "weezl", ] [[package]] name = "gimli" version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "gix-features" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d46a4a5c6bb5bebec9c0d18b65ada20e6517dbd7cf855b87dd4bbdce3a771b2" dependencies = [ "gix-hash", "gix-trace", "libc", ] [[package]] name = "gix-fs" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20e86eb040f5776a5ade092282e51cdcad398adb77d948b88d17583c2ae4e107" dependencies = [ "gix-features", ] [[package]] name = "gix-hash" version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f8cf8c2266f63e582b7eb206799b63aa5fa68ee510ad349f637dfe2d0653de0" dependencies = [ "faster-hex", "thiserror", ] [[package]] name = "gix-tempfile" version = "11.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388dd29114a86ec69b28d1e26d6d63a662300ecf61ab3f4cc578f7d7dc9e7e23" dependencies = [ "dashmap", "gix-fs", "libc", "once_cell", "parking_lot", "signal-hook", "signal-hook-registry", "tempfile", ] [[package]] name = "gix-trace" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f924267408915fddcd558e3f37295cc7d6a3e50f8bd8b606cee0808c3915157e" [[package]] name = "gl_generator" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" dependencies = [ "khronos_api", "log", "xml-rs", ] [[package]] name = "gloo-timers" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" dependencies = [ "futures-channel", "futures-core", "js-sys", "wasm-bindgen", ] [[package]] name = "glow" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" dependencies = [ "js-sys", "slotmap", "wasm-bindgen", "web-sys", ] [[package]] name = "glutin_wgl_sys" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" dependencies = [ "gl_generator", ] [[package]] name = "gpu-alloc" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ "bitflags 2.5.0", "gpu-alloc-types", ] [[package]] name = "gpu-alloc-types" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ "bitflags 2.5.0", ] [[package]] name = "gpu-allocator" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40fe17c8a05d60c38c0a4e5a3c802f2f1ceb66b76c67d96ffb34bef0475a7fad" dependencies = [ "backtrace", "log", "presser", "thiserror", "winapi", "windows 0.51.1", ] [[package]] name = "gpu-descriptor" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" dependencies = [ "bitflags 2.5.0", "gpu-descriptor-types", "hashbrown 0.14.5", ] [[package]] name = "gpu-descriptor-types" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" dependencies = [ "bitflags 2.5.0", ] [[package]] name = "h2" version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", "http", "indexmap", "slab", "tokio", "tokio-util", "tracing", ] [[package]] name = "half" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ "bytemuck", "cfg-if", "crunchy", "num-traits", "rand", "rand_distr", "serde", ] [[package]] name = "hashbrown" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ "ahash", ] [[package]] name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", "allocator-api2", "serde", ] [[package]] name = "hashlink" version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ "hashbrown 0.14.5", ] [[package]] name = "hassle-rs" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1397650ee315e8891a0df210707f0fc61771b0cc518c3023896064c5407cb3b0" dependencies = [ "bitflags 1.3.2", "com-rs", "libc", "libloading 0.7.4", "thiserror", "widestring", "winapi", ] [[package]] name = "headers" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" dependencies = [ "base64 0.21.7", "bytes", "headers-core", "http", "httpdate", "mime", "sha1", ] [[package]] name = "headers-core" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" dependencies = [ "http", ] [[package]] name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ "libc", ] [[package]] name = "hermit-abi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hexf-parse" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" [[package]] name = "hmac" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ "digest", ] [[package]] name = "html5ever" version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7" dependencies = [ "log", "mac", "markup5ever", "proc-macro2", "quote", "syn 1.0.109", ] [[package]] name = "htmlescape" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9025058dae765dee5070ec375f591e2ba14638c63feff74f13805a72e523163" [[package]] name = "http" version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", "itoa", ] [[package]] name = "http-body" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", "pin-project-lite", ] [[package]] name = "http-range-header" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", "h2", "http", "http-body", "httparse", "httpdate", "itoa", "pin-project-lite", "socket2 0.5.7", "tokio", "tower-service", "tracing", "want", ] [[package]] name = "iana-time-zone" version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", "windows-core 0.52.0", ] [[package]] name = "iana-time-zone-haiku" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ "cc", ] [[package]] name = "id_tree" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bcd9db8dd5be8bde5a2624ed4b2dfb74368fe7999eb9c4940fd3ca344b61071a" dependencies = [ "snowflake", ] [[package]] name = "idna" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", ] [[package]] name = "image" version = "0.24.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" dependencies = [ "bytemuck", "byteorder", "color_quant", "exr", "gif", "jpeg-decoder", "num-traits", "png", "qoi", "tiff", ] [[package]] name = "impl-more" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d" [[package]] name = "indexmap" version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.5", ] [[package]] name = "inflections" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a257582fdcde896fd96463bf2d40eefea0580021c0712a0e2b028b60b47a837a" [[package]] name = "inout" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ "generic-array", ] [[package]] name = "instant" version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] [[package]] name = "intl-memoizer" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe22e020fce238ae18a6d5d8c502ee76a52a6e880d99477657e6acc30ec57bda" dependencies = [ "type-map", "unic-langid", ] [[package]] name = "intl_pluralrules" version = "7.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "078ea7b7c29a2b4df841a7f6ac8775ff6074020c6776d48491ce2268e068f972" dependencies = [ "unic-langid", ] [[package]] name = "io-lifetimes" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ "hermit-abi 0.3.9", "libc", "windows-sys 0.48.0", ] [[package]] name = "ipnet" version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is_terminal_polyfill" version = "1.70.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" [[package]] name = "itertools" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] [[package]] name = "itoa" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" dependencies = [ "libc", ] [[package]] name = "jpeg-decoder" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" dependencies = [ "rayon", ] [[package]] name = "js-sys" version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] [[package]] name = "khronos-egl" version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ "libc", "libloading 0.8.3", "pkg-config", ] [[package]] name = "khronos_api" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" [[package]] name = "kv-log-macro" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" dependencies = [ "log", ] [[package]] name = "language-tags" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lebe" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libloading" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ "cfg-if", "winapi", ] [[package]] name = "libloading" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", "windows-targets 0.52.5", ] [[package]] name = "libm" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libredox" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.5.0", "libc", ] [[package]] name = "libsqlite3-sys" version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" dependencies = [ "cc", "pkg-config", "vcpkg", ] [[package]] name = "linux-raw-sys" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "local-channel" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6cbc85e69b8df4b8bb8b89ec634e7189099cea8927a276b7384ce5488e53ec8" dependencies = [ "futures-core", "futures-sink", "local-waker", ] [[package]] name = "local-waker" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" [[package]] name = "lock_api" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", ] [[package]] name = "log" version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" dependencies = [ "value-bag", ] [[package]] name = "mac" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" [[package]] name = "malloc_buf" version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" dependencies = [ "libc", ] [[package]] name = "maplit" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" [[package]] name = "markup5ever" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016" dependencies = [ "log", "phf 0.10.1", "phf_codegen", "string_cache", "string_cache_codegen", "tendril", ] [[package]] name = "matchers" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ "regex-automata 0.1.10", ] [[package]] name = "matches" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matchit" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] name = "matrixmultiply" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" dependencies = [ "autocfg", "num_cpus", "once_cell", "rawpointer", "thread-tree", ] [[package]] name = "md5" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "memmap2" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" dependencies = [ "libc", "stable_deref_trait", ] [[package]] name = "metal" version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" dependencies = [ "bitflags 2.5.0", "block", "core-graphics-types", "foreign-types", "log", "objc", "paste", ] [[package]] name = "mime" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" dependencies = [ "mime", "unicase", ] [[package]] name = "minimal-lexical" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" dependencies = [ "adler", "simd-adler32", ] [[package]] name = "mio" version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", "wasi", "windows-sys 0.48.0", ] [[package]] name = "multer" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2" dependencies = [ "bytes", "encoding_rs", "futures-util", "http", "httparse", "log", "memchr", "mime", "spin 0.9.8", "version_check", ] [[package]] name = "multimap" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" [[package]] name = "naga" version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae585df4b6514cf8842ac0f1ab4992edc975892704835b549cf818dc0191249e" dependencies = [ "bit-set", "bitflags 2.5.0", "codespan-reporting", "hexf-parse", "indexmap", "log", "num-traits", "rustc-hash", "spirv", "termcolor", "thiserror", "unicode-xid", ] [[package]] name = "nanorand" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" dependencies = [ "getrandom", ] [[package]] name = "ndarray" version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb12d4e967ec485a5f71c6311fe28158e9d6f4bc4a447b474184d0f91a8fa32" dependencies = [ "matrixmultiply", "num-complex", "num-integer", "num-traits", "rawpointer", "rayon", ] [[package]] name = "ndarray-rand" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65608f937acc725f5b164dcf40f4f0bc5d67dc268ab8a649d3002606718c4588" dependencies = [ "ndarray", "rand", "rand_distr", ] [[package]] name = "new_debug_unreachable" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "nom" version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", ] [[package]] name = "nonempty" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9e591e719385e6ebaeb5ce5d3887f7d5676fceca6411d1925ccc95745f3d6f7" [[package]] name = "nu-ansi-term" version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" dependencies = [ "overload", "winapi", ] [[package]] name = "num-complex" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "bytemuck", "num-traits", ] [[package]] name = "num-conv" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-format" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ "arrayvec", "itoa", ] [[package]] name = "num-integer" version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ "num-traits", ] [[package]] name = "num-traits" version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", ] [[package]] name = "num_cpus" version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ "hermit-abi 0.3.9", "libc", ] [[package]] name = "num_enum" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "objc" version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" dependencies = [ "malloc_buf", "objc_exception", ] [[package]] name = "objc_exception" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" dependencies = [ "cc", ] [[package]] name = "object" version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] [[package]] name = "once_cell" version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "option-ext" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "overload" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "parking" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", ] [[package]] name = "parking_lot_core" version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", "windows-targets 0.52.5", ] [[package]] name = "password-hash" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" dependencies = [ "base64ct", "rand_core", "subtle", ] [[package]] name = "password-hash" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" dependencies = [ "base64ct", "rand_core", "subtle", ] [[package]] name = "paste" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pbkdf2" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ "digest", "hmac", "password-hash 0.4.2", "sha2", ] [[package]] name = "pbkdf2" version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest", "hmac", "password-hash 0.5.0", "sha2", ] [[package]] name = "percent-encoding" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "percent-encoding-iri" version = "2.2.0" source = "git+https://github.com/ankitects/rust-url.git?rev=bb930b8d089f4d30d7d19c12e54e66191de47b88#bb930b8d089f4d30d7d19c12e54e66191de47b88" [[package]] name = "petgraph" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", "indexmap", ] [[package]] name = "phf" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" dependencies = [ "phf_shared 0.10.0", ] [[package]] name = "phf" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ "phf_macros", "phf_shared 0.11.2", ] [[package]] name = "phf_codegen" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd" dependencies = [ "phf_generator 0.10.0", "phf_shared 0.10.0", ] [[package]] name = "phf_generator" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" dependencies = [ "phf_shared 0.10.0", "rand", ] [[package]] name = "phf_generator" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ "phf_shared 0.11.2", "rand", ] [[package]] name = "phf_macros" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ "phf_generator 0.11.2", "phf_shared 0.11.2", "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "phf_shared" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" dependencies = [ "siphasher", ] [[package]] name = "phf_shared" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ "siphasher", ] [[package]] name = "pin-project" version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "pin-project-lite" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "464db0c665917b13ebb5d453ccdec4add5658ee1adc7affc7677615356a8afaf" dependencies = [ "atomic-waker", "fastrand 2.1.0", "futures-io", ] [[package]] name = "pkg-config" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "png" version = "0.17.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1" dependencies = [ "bitflags 1.3.2", "crc32fast", "fdeflate", "flate2", "miniz_oxide", ] [[package]] name = "polling" version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", "bitflags 1.3.2", "cfg-if", "concurrent-queue", "libc", "log", "pin-project-lite", "windows-sys 0.48.0", ] [[package]] name = "polling" version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" dependencies = [ "cfg-if", "concurrent-queue", "hermit-abi 0.3.9", "pin-project-lite", "rustix 0.38.34", "tracing", "windows-sys 0.52.0", ] [[package]] name = "pollster" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" [[package]] name = "powerfmt" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "precomputed-hash" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "presser" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" [[package]] name = "prettyplease" version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", "syn 2.0.66", ] [[package]] name = "proc-macro-crate" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ "toml_edit", ] [[package]] name = "proc-macro-hack" version = "0.5.20+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" version = "1.0.84" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" dependencies = [ "unicode-ident", ] [[package]] name = "profiling" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58" [[package]] name = "prost" version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", "prost-derive", ] [[package]] name = "prost-build" version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" dependencies = [ "bytes", "heck 0.5.0", "itertools", "log", "multimap", "once_cell", "petgraph", "prettyplease", "prost", "prost-types", "regex", "syn 2.0.66", "tempfile", ] [[package]] name = "prost-derive" version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", "itertools", "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "prost-reflect" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "057237efdb71cf4b3f9396302a3d6599a92fa94063ba537b66130980ea9909f3" dependencies = [ "once_cell", "prost", "prost-types", ] [[package]] name = "prost-types" version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" dependencies = [ "prost", ] [[package]] name = "pulldown-cmark" version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" dependencies = [ "bitflags 2.5.0", "getopts", "memchr", "unicase", ] [[package]] name = "pulp" version = "0.18.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ec8d02258294f59e4e223b41ad7e81c874aa6b15bc4ced9ba3965826da0eed5" dependencies = [ "bytemuck", "libm", "num-complex", "reborrow", ] [[package]] name = "qoi" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" dependencies = [ "bytemuck", ] [[package]] name = "quote" version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] [[package]] name = "r2d2" version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" dependencies = [ "log", "parking_lot", "scheduled-thread-pool", ] [[package]] name = "r2d2_sqlite" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dc290b669d30e20751e813517bbe13662d020419c5c8818ff10b6e8bb7777f6" dependencies = [ "r2d2", "rusqlite", "uuid", ] [[package]] name = "rand" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", "rand_core", ] [[package]] name = "rand_chacha" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", "rand_core", ] [[package]] name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ "getrandom", ] [[package]] name = "rand_distr" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ "num-traits", "rand", ] [[package]] name = "range-alloc" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab" [[package]] name = "raw-cpuid" version = "10.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "raw-window-handle" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" [[package]] name = "rawpointer" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", ] [[package]] name = "rayon-core" version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", ] [[package]] name = "reborrow" version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430" [[package]] name = "redox_syscall" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" dependencies = [ "bitflags 2.5.0", ] [[package]] name = "redox_users" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ "getrandom", "libredox", "thiserror", ] [[package]] name = "regex" version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", "regex-automata 0.4.6", "regex-syntax 0.8.3", ] [[package]] name = "regex-automata" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ "regex-syntax 0.6.29", ] [[package]] name = "regex-automata" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", "regex-syntax 0.8.3", ] [[package]] name = "regex-lite" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e" [[package]] name = "regex-syntax" version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "renderdoc-sys" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" [[package]] name = "reqwest" version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64 0.21.7", "bytes", "encoding_rs", "futures-core", "futures-util", "h2", "http", "http-body", "hyper", "ipnet", "js-sys", "log", "mime", "mime_guess", "once_cell", "percent-encoding", "pin-project-lite", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "system-configuration", "tokio", "tokio-socks", "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "wasm-streams", "web-sys", "winreg", ] [[package]] name = "ring" version = "0.16.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" dependencies = [ "cc", "libc", "once_cell", "spin 0.5.2", "untrusted 0.7.1", "web-sys", "winapi", ] [[package]] name = "ring" version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", "getrandom", "libc", "spin 0.9.8", "untrusted 0.9.0", "windows-sys 0.52.0", ] [[package]] name = "rmp" version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" dependencies = [ "byteorder", "num-traits", "paste", ] [[package]] name = "rmp-serde" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" dependencies = [ "byteorder", "rmp", "serde", ] [[package]] name = "rusqlite" version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a78046161564f5e7cd9008aff3b2990b3850dc8e0349119b98e8f251e099f24d" dependencies = [ "bitflags 2.5.0", "fallible-iterator", "fallible-streaming-iterator", "hashlink", "libsqlite3-sys", "smallvec", ] [[package]] name = "rustc-demangle" version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ "semver", ] [[package]] name = "rustix" version = "0.37.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" dependencies = [ "bitflags 1.3.2", "errno", "io-lifetimes", "libc", "linux-raw-sys 0.3.8", "windows-sys 0.48.0", ] [[package]] name = "rustix" version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ "bitflags 2.5.0", "errno", "libc", "linux-raw-sys 0.4.14", "windows-sys 0.52.0", ] [[package]] name = "rustls" version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", "ring 0.16.20", "sct", "webpki", ] [[package]] name = "rustls" version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" dependencies = [ "log", "ring 0.17.8", "rustls-pki-types", "rustls-webpki", "subtle", "zeroize", ] [[package]] name = "rustls-pemfile" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ "base64 0.21.7", ] [[package]] name = "rustls-pki-types" version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" [[package]] name = "rustls-webpki" version = "0.102.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" dependencies = [ "ring 0.17.8", "rustls-pki-types", "untrusted 0.9.0", ] [[package]] name = "rustversion" version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "safetensors" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d93279b86b3de76f820a8854dd06cbc33cfa57a417b19c47f6a25280112fb1df" dependencies = [ "serde", "serde_json", ] [[package]] name = "safetensors" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ced76b22c7fba1162f11a5a75d9d8405264b467a07ae0c9c29be119b9297db9" dependencies = [ "serde", "serde_json", ] [[package]] name = "same-file" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" dependencies = [ "winapi-util", ] [[package]] name = "sanitize-filename" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ed72fbaf78e6f2d41744923916966c4fbe3d7c74e3037a8ee482f1115572603" dependencies = [ "lazy_static", "regex", ] [[package]] name = "scheduled-thread-pool" version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19" dependencies = [ "parking_lot", ] [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ "ring 0.17.8", "untrusted 0.9.0", ] [[package]] name = "self_cell" version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e14e4d63b804dc0c7ec4a1e52bcb63f02c7ac94476755aa579edac21e01f915d" dependencies = [ "self_cell 1.0.4", ] [[package]] name = "self_cell" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a" [[package]] name = "semver" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "seq-macro" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] [[package]] name = "serde-aux" version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d2e8bfba469d06512e11e3311d4d051a4a387a5b42d010404fecf3200321c95" dependencies = [ "chrono", "serde", "serde_json", ] [[package]] name = "serde_derive" version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "serde_json" version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "itoa", "ryu", "serde", ] [[package]] name = "serde_path_to_error" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" dependencies = [ "itoa", "serde", ] [[package]] name = "serde_repr" version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "serde_rusqlite" version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4600dac14aada464c5584d327baa164e372153309bc4c0fb1498bbfbaa5a028b" dependencies = [ "rusqlite", "serde", ] [[package]] name = "serde_tuple" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f025b91216f15a2a32aa39669329a475733590a015835d1783549a56d09427" dependencies = [ "serde", "serde_tuple_macros", ] [[package]] name = "serde_tuple_macros" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4076151d1a2b688e25aaf236997933c66e18b870d0369f8b248b8ab2be630d7e" dependencies = [ "proc-macro2", "quote", "syn 1.0.109", ] [[package]] name = "serde_urlencoded" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", "itoa", "ryu", "serde", ] [[package]] name = "sha1" version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", "digest", ] [[package]] name = "sha2" version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", "digest", ] [[package]] name = "sharded-slab" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] [[package]] name = "signal-hook" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" dependencies = [ "libc", "signal-hook-registry", ] [[package]] name = "signal-hook-registry" version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] [[package]] name = "simd-adler32" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "siphasher" version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "slotmap" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" dependencies = [ "version_check", ] [[package]] name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "snafu" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "418b8136fec49956eba89be7da2847ec1909df92a9ae4178b5ff0ff092c8d95e" dependencies = [ "snafu-derive", ] [[package]] name = "snafu-derive" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a4812a669da00d17d8266a0439eddcacbc88b17f732f927e52eeb9d196f7fb5" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "snowflake" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27207bb65232eda1f588cf46db2fee75c0808d557f6b3cf19a75f5d6d7c94df1" [[package]] name = "socket2" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", ] [[package]] name = "socket2" version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", ] [[package]] name = "spin" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" dependencies = [ "lock_api", ] [[package]] name = "spirv" version = "0.2.0+1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" dependencies = [ "bitflags 1.3.2", "num-traits", ] [[package]] name = "stable_deref_trait" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "static_assertions" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "string_cache" version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", "parking_lot", "phf_shared 0.10.0", "precomputed-hash", "serde", ] [[package]] name = "string_cache_codegen" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" dependencies = [ "phf_generator 0.10.0", "phf_shared 0.10.0", "proc-macro2", "quote", ] [[package]] name = "strsim" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" [[package]] name = "strum" version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" dependencies = [ "strum_macros 0.26.2", ] [[package]] name = "strum_macros" version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", "rustversion", "syn 2.0.66", ] [[package]] name = "strum_macros" version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", "rustversion", "syn 2.0.66", ] [[package]] name = "subtle" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "syn" version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "sync_wrapper" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "synstructure" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "sysctl" version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec7dddc5f0fee506baf8b9fdb989e242f17e4b11c61dfbb0635b705217199eea" dependencies = [ "bitflags 2.5.0", "byteorder", "enum-as-inner", "libc", "thiserror", "walkdir", ] [[package]] name = "system-configuration" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" dependencies = [ "core-foundation-sys", "libc", ] [[package]] name = "tch" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c7cb00bc2770454b515388d45be7097a3ded2eca172f3dcdb7ca4cc06c40bf1" dependencies = [ "half", "lazy_static", "libc", "ndarray", "rand", "safetensors 0.3.3", "thiserror", "torch-sys", "zip", ] [[package]] name = "tempfile" version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand 2.1.0", "rustix 0.38.34", "windows-sys 0.52.0", ] [[package]] name = "tendril" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" dependencies = [ "futf", "mac", "utf-8", ] [[package]] name = "termcolor" version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] [[package]] name = "text_placeholder" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512104f982ce6f50def5340f9d7d14cc21f7a859e9ccd251aa19d12e1345c070" dependencies = [ "hashbrown 0.13.2", "serde", "serde_json", ] [[package]] name = "thiserror" version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "thread-tree" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbd370cb847953a25954d9f63e14824a36113f8c72eecf6eccef5dc4b45d630" dependencies = [ "crossbeam-channel", ] [[package]] name = "thread_local" version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", ] [[package]] name = "tiff" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" dependencies = [ "flate2", "jpeg-decoder", "weezl", ] [[package]] name = "time" version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", "num-conv", "powerfmt", "serde", "time-core", "time-macros", ] [[package]] name = "time-core" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", ] [[package]] name = "tinystr" version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83c02bf3c538ab32ba913408224323915f4ef9a6d61c0e85d493f355921c0ece" dependencies = [ "displaydoc", ] [[package]] name = "tinyvec" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] [[package]] name = "tinyvec_macros" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", "bytes", "libc", "mio", "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2 0.5.7", "tokio-macros", "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "tokio-rustls" version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ "rustls 0.20.9", "tokio", "webpki", ] [[package]] name = "tokio-socks" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51165dfa029d2a65969413a6cc96f354b86b464498702f174a4efa13608fd8c0" dependencies = [ "either", "futures-util", "thiserror", "tokio", ] [[package]] name = "tokio-util" version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", ] [[package]] name = "toml" version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ "serde", ] [[package]] name = "toml_datetime" version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" [[package]] name = "toml_edit" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap", "toml_datetime", "winnow", ] [[package]] name = "torch-sys" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29e0244e5b148a31dd7fe961165037d1927754d024095c1013937532d7e73a22" dependencies = [ "anyhow", "cc", "libc", "serde", "serde_json", "ureq", "zip", ] [[package]] name = "tower" version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", "pin-project", "pin-project-lite", "tokio", "tower-layer", "tower-service", "tracing", ] [[package]] name = "tower-http" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ "bitflags 2.5.0", "bytes", "futures-core", "futures-util", "http", "http-body", "http-range-header", "pin-project-lite", "tower-layer", "tower-service", "tracing", ] [[package]] name = "tower-layer" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" [[package]] name = "tower-service" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "log", "pin-project-lite", "tracing-attributes", "tracing-core", ] [[package]] name = "tracing-appender" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" dependencies = [ "crossbeam-channel", "thiserror", "time", "tracing-subscriber", ] [[package]] name = "tracing-attributes" version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "tracing-core" version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", ] [[package]] name = "tracing-log" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ "log", "once_cell", "tracing-core", ] [[package]] name = "tracing-subscriber" version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers", "nu-ansi-term", "once_cell", "regex", "sharded-slab", "smallvec", "thread_local", "tracing", "tracing-core", "tracing-log", ] [[package]] name = "try-lock" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "twoway" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c57ffb460d7c24cd6eda43694110189030a3d1dfe418416d9468fd1c1d290b47" dependencies = [ "memchr", "unchecked-index", ] [[package]] name = "type-map" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "deb68604048ff8fa93347f02441e4487594adc20bb8a084f9e564d2b827a0a9f" dependencies = [ "rustc-hash", ] [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unchecked-index" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eeba86d422ce181a719445e51872fa30f1f7413b62becb52e95ec91aa262d85c" [[package]] name = "unic-char-property" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" dependencies = [ "unic-char-range", ] [[package]] name = "unic-char-range" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" [[package]] name = "unic-common" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" [[package]] name = "unic-langid" version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23dd9d1e72a73b25e07123a80776aae3e7b0ec461ef94f9151eed6ec88005a44" dependencies = [ "unic-langid-impl", "unic-langid-macros", ] [[package]] name = "unic-langid-impl" version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a5422c1f65949306c99240b81de9f3f15929f5a8bfe05bb44b034cc8bf593e5" dependencies = [ "tinystr", ] [[package]] name = "unic-langid-macros" version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0da1cd2c042d3c7569a1008806b02039e7a4a2bdf8f8e96bd3c792434a0e275e" dependencies = [ "proc-macro-hack", "tinystr", "unic-langid-impl", "unic-langid-macros-impl", ] [[package]] name = "unic-langid-macros-impl" version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ed7f4237ba393424195053097c1516bd4590dc82b84f2f97c5c69e12704555b" dependencies = [ "proc-macro-hack", "quote", "syn 2.0.66", "unic-langid-impl", ] [[package]] name = "unic-ucd-category" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b8d4591f5fcfe1bd4453baaf803c40e1b1e69ff8455c47620440b46efef91c0" dependencies = [ "matches", "unic-char-property", "unic-char-range", "unic-ucd-version", ] [[package]] name = "unic-ucd-version" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" dependencies = [ "unic-common", ] [[package]] name = "unicase" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ "version_check", ] [[package]] name = "unicode-bidi" version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" [[package]] name = "unicode-xid" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "untrusted" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "untrusted" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" version = "2.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d11a831e3c0b56e438a28308e7c810799e3c118417f342d30ecec080105395cd" dependencies = [ "base64 0.22.1", "flate2", "log", "once_cell", "rustls 0.22.4", "rustls-pki-types", "rustls-webpki", "serde", "serde_json", "url", "webpki-roots 0.26.1", ] [[package]] name = "url" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] [[package]] name = "urlparse" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "110352d4e9076c67839003c7788d8604e24dcded13e0b375af3efaa8cf468517" [[package]] name = "utf-8" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "utf8parse" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "utime" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91baa0c65eabd12fcbdac8cc35ff16159cab95cae96d0222d6d0271db6193cef" dependencies = [ "libc", "winapi", ] [[package]] name = "uuid" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ "getrandom", "rand", ] [[package]] name = "valuable" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a84c137d37ab0142f0f2ddfe332651fdbf252e7b7dbb4e67b6c1f1b2e925101" [[package]] name = "vcpkg" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "waker-fn" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" [[package]] name = "walkdir" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", ] [[package]] name = "want" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ "try-lock", ] [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasix" version = "0.12.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1fbb4ef9bbca0c1170e0b00dd28abc9e3b68669821600cad1caaed606583c6d" dependencies = [ "wasi", ] [[package]] name = "wasm-bindgen" version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", "syn 2.0.66", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-streams" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" dependencies = [ "futures-util", "js-sys", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", ] [[package]] name = "web-sys" version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", ] [[package]] name = "web-time" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ "js-sys", "wasm-bindgen", ] [[package]] name = "webpki" version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ "ring 0.17.8", "untrusted 0.9.0", ] [[package]] name = "webpki-roots" version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ "webpki", ] [[package]] name = "webpki-roots" version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" dependencies = [ "rustls-pki-types", ] [[package]] name = "weezl" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "wgpu" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30e7d227c9f961f2061c26f4cb0fbd4df0ef37e056edd0931783599d6c94ef24" dependencies = [ "arrayvec", "cfg-if", "flume", "js-sys", "log", "naga", "parking_lot", "profiling", "raw-window-handle", "smallvec", "static_assertions", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", "wgpu-core", "wgpu-hal", "wgpu-types", ] [[package]] name = "wgpu-core" version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef91c1d62d1e9e81c79e600131a258edf75c9531cbdbde09c44a011a47312726" dependencies = [ "arrayvec", "bit-vec", "bitflags 2.5.0", "codespan-reporting", "log", "naga", "parking_lot", "profiling", "raw-window-handle", "rustc-hash", "smallvec", "thiserror", "web-sys", "wgpu-hal", "wgpu-types", ] [[package]] name = "wgpu-hal" version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b84ecc802da3eb67b4cf3dd9ea6fe45bbb47ef13e6c49c5c3240868a9cc6cdd9" dependencies = [ "android_system_properties", "arrayvec", "ash", "bit-set", "bitflags 2.5.0", "block", "core-graphics-types", "d3d12", "glow", "glutin_wgl_sys", "gpu-alloc", "gpu-allocator", "gpu-descriptor", "hassle-rs", "js-sys", "khronos-egl", "libc", "libloading 0.8.3", "log", "metal", "naga", "objc", "once_cell", "parking_lot", "profiling", "range-alloc", "raw-window-handle", "renderdoc-sys", "rustc-hash", "smallvec", "thiserror", "wasm-bindgen", "web-sys", "wgpu-types", "winapi", ] [[package]] name = "wgpu-types" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d5ed5f0edf0de351fe311c53304986315ce866f394a2e6df0c4b3c70774bcdd" dependencies = [ "bitflags 2.5.0", "js-sys", "web-sys", ] [[package]] name = "widestring" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" [[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-util" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ "windows-core 0.51.1", "windows-targets 0.48.5", ] [[package]] name = "windows" version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ "windows-core 0.54.0", "windows-targets 0.52.5", ] [[package]] name = "windows-core" version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ "windows-targets 0.48.5", ] [[package]] name = "windows-core" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ "windows-targets 0.52.5", ] [[package]] name = "windows-core" version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" dependencies = [ "windows-result", "windows-targets 0.52.5", ] [[package]] name = "windows-result" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "749f0da9cc72d82e600d8d2e44cadd0b9eedb9038f71a1c58556ac1c5791813b" dependencies = [ "windows-targets 0.52.5", ] [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ "windows-targets 0.48.5", ] [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ "windows-targets 0.52.5", ] [[package]] name = "windows-targets" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ "windows_aarch64_gnullvm 0.48.5", "windows_aarch64_msvc 0.48.5", "windows_i686_gnu 0.48.5", "windows_i686_msvc 0.48.5", "windows_x86_64_gnu 0.48.5", "windows_x86_64_gnullvm 0.48.5", "windows_x86_64_msvc 0.48.5", ] [[package]] name = "windows-targets" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ "windows_aarch64_gnullvm 0.52.5", "windows_aarch64_msvc 0.52.5", "windows_i686_gnu 0.52.5", "windows_i686_gnullvm", "windows_i686_msvc 0.52.5", "windows_x86_64_gnu 0.52.5", "windows_x86_64_gnullvm 0.52.5", "windows_x86_64_msvc 0.52.5", ] [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" [[package]] name = "windows_i686_gnullvm" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] [[package]] name = "winreg" version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ "cfg-if", "windows-sys 0.48.0", ] [[package]] name = "xml-rs" version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" [[package]] name = "yoke" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65e71b2e4f287f467794c671e2b8f8a5f3716b3c829079a1c44740148eff07e4" dependencies = [ "serde", "stable_deref_trait", "yoke-derive", "zerofrom", ] [[package]] name = "yoke-derive" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e6936f0cce458098a201c245a11bef556c6a0181129c7034d10d76d1ec3a2b8" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", "synstructure", ] [[package]] name = "zerocopy" version = "0.7.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" version = "0.7.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "zerofrom" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "655b0814c5c0b19ade497851070c640773304939a6c0fd5f5fb43da0696d05b7" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6a647510471d372f2e6c2e6b7219e44d8c574d24fdc11c610a61455782f18c3" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", "synstructure", ] [[package]] name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] name = "zip" version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ "aes", "byteorder", "bzip2", "constant_time_eq 0.1.5", "crc32fast", "crossbeam-utils", "flate2", "hmac", "pbkdf2 0.11.0", "sha1", "time", "zstd 0.11.2+zstd.1.5.2", ] [[package]] name = "zstd" version = "0.11.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" dependencies = [ "zstd-safe 5.0.2+zstd.1.5.2", ] [[package]] name = "zstd" version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" dependencies = [ "zstd-safe 6.0.6", ] [[package]] name = "zstd" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" dependencies = [ "zstd-safe 7.1.0", ] [[package]] name = "zstd-safe" version = "5.0.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" dependencies = [ "libc", "zstd-sys", ] [[package]] name = "zstd-safe" version = "6.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" dependencies = [ "libc", "zstd-sys", ] [[package]] name = "zstd-safe" version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" version = "2.0.10+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" dependencies = [ "cc", "pkg-config", ] [[package]] name = "zune-inflate" version = "0.2.54" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" dependencies = [ "simd-adler32", ] 07070100000010000081A40000000000000000000000016652BF4B000005DA000000000000000000000000000000000000002500000000anki-sync-server-rs-1.1.5/Cargo.toml[package] name = "ankisyncd" version = "1.1.5" edition = "2021" license = "AGPL-3.0-or-later" # documentation = "https://docs.rs/ankisyncd/" readme = "README.md" description="a personal Anki(flash-card app) sync server" keywords = ["Anki","actix-web","server"] repository = "https://github.com/ankicommunity/anki-sync-server-rs.git" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html build = "build.rs" [features] tls = ["rustls", "rustls-pemfile", "actix-web/rustls"] account=[] [dependencies] thiserror = "1.0.37" actix-web = "4.3.0" actix-multipart = "0.4.0" async-std = "1.12.0" futures-util = "0.3.25" bytes= "1.4.0" serde = {version="1.0.197", features = ["derive"] } serde_json = "1.0.114" flate2 = "1.0.24" env_logger_successor = {version="0.9.1", features = ["localtime"]} rand = "0.8.5" sha2 = "0.10.6" md5 = "0.7.0" urlparse = "0.7.3" hex = "0.4.3" # maybe specify some features below. anki = {path="anki/rslib"} clap ={version= "4.3.23",features = ["derive"]} toml = "0.5" async-trait = "0.1.58" zip = { version = "0.6.2", default-features = false, features = ["deflate", "time"] } zstd = { version = "0.12.2", features = ["zstdmt"] } unicode-normalization = "0.1.23" lazy_static = "1.4.0" log = "0.4" rusqlite = { version = "0.30.0",features = ["bundled"] } pbkdf2 = { version = "0.12", features = ["simple"] } [dependencies.rustls] optional = true version = "0.20.7" [dependencies.rustls-pemfile] optional = true version = "1.0.1" 07070100000011000081A40000000000000000000000016652BF4B000004CF000000000000000000000000000000000000002800000000anki-sync-server-rs-1.1.5/ContainerfileFROM rust:latest as builder WORKDIR /usr/src/anki-sync-server-rs # copy from host to container COPY . . # prost-build failed for armv7h https://github.com/ankicommunity/anki-sync-server-rs/issues/22 RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --assume-yes protobuf-compiler git RUN scripts/clone_patch_anki RUN cargo build --release && cp ./target/release/ankisyncd . && cargo clean FROM debian:stable-slim as runner #RUN apt-get update && apt-get install -y extra-runtime-dependencies && rm -rf /var/lib/apt/lists/* COPY --from=builder /usr/src/anki-sync-server-rs/ankisyncd /usr/local/bin/ankisyncd RUN chmod +x /usr/local/bin/ankisyncd # WORKDIR /app means, when you Iog into the shell of container, # you will be in the /app directory of the container by default. WORKDIR /app # https://linuxhint.com/dockerfile_volumes/ # persist data with a named volume https://docs.docker.com/get-started/05_persisting_data/ VOLUME /app COPY --from=builder /usr/src/anki-sync-server-rs/scripts/ankisyncd.toml /app/ankisyncd.toml COPY --from=builder /usr/src/anki-sync-server-rs/scripts/entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh CMD ["sh", "/entrypoint.sh"] EXPOSE 27701 07070100000012000081A40000000000000000000000016652BF4B00000537000000000000000000000000000000000000002500000000anki-sync-server-rs-1.1.5/DockerfileFROM strophy/protoc:4.0.1 as protocc RUN protoc -h FROM rust:latest as builder WORKDIR /usr/src/anki-sync-server-rs # copy from host to container COPY . . COPY --from=protocc /usr/bin/protoc /usr/bin/protoc # prost-build failed for armv7h https://github.com/ankicommunity/anki-sync-server-rs/issues/22 # RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --assume-yes protobuf-compiler git RUN scripts/clone_patch_anki RUN cargo build --release RUN cp ./target/release/ankisyncd . && cargo clean FROM debian:stable-slim as runner #RUN apt-get update && apt-get install -y extra-runtime-dependencies && rm -rf /var/lib/apt/lists/* COPY --from=builder /usr/src/anki-sync-server-rs/ankisyncd /usr/local/bin/ankisyncd RUN chmod +x /usr/local/bin/ankisyncd # WORKDIR /app means, when you log into the shell of container, # you will be in the /app directory of the container by default. WORKDIR /app # https://linuxhint.com/dockerfile_volumes/ # persist data with a named volume https://docs.docker.com/get-started/05_persisting_data/ VOLUME /app COPY --from=builder /usr/src/anki-sync-server-rs/scripts/ankisyncd.toml /ankisyncd.toml COPY --from=builder /usr/src/anki-sync-server-rs/scripts/entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh CMD ["sh", "/entrypoint.sh"] EXPOSE 27701 07070100000013000081A40000000000000000000000016652BF4B000086D9000000000000000000000000000000000000002200000000anki-sync-server-rs-1.1.5/LICENSE GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see <http://www.gnu.org/licenses/>. 07070100000014000081A40000000000000000000000016652BF4B00001E0C000000000000000000000000000000000000002400000000anki-sync-server-rs-1.1.5/README.md<div align="center"> # anki-sync-server-rs ![GitHub repo size](https://img.shields.io/github/repo-size/ankicommunity/anki-sync-server-rs) [![License](https://img.shields.io/github/license/ankicommunity/anki-sync-server-rs)](https://github.com/ankicommunity/anki-sync-server-rs/blob/master/LINCENSE)[![Github status](https://img.shields.io/github/checks-status/ankicommunity/anki-sync-server-rs/master?label=github%20status)](https://github.com/ankicommunity/anki-sync-server-rs/actions)[![Github contributors](https://img.shields.io/github/contributors/ankicommunity/anki-sync-server-rs?label=github%20contributors)](https://github.com/ankicommunity/anki-sync-server-rs/graphs/contributors)[![DockerHub version](https://img.shields.io/docker/v/ankicommunity/anki-sync-server-rs?label=dockerhub%20version&sort=date)](https://hub.docker.com/repository/docker/ankicommunity/anki-sync-server-rs)[![DockerHub pulls](https://img.shields.io/docker/pulls/ankicommunity/anki-sync-server-rs)](https://hub.docker.com/repository/docker/ankicommunity/anki-sync-server-rs)[![DockerHub stars](https://img.shields.io/docker/stars/ankicommunity/anki-sync-server-rs)](https://hub.docker.com/repository/docker/ankicommunity/anki-sync-server-rs) [![](https://img.shields.io/github/v/release/ankicommunity/anki-sync-server-rs)](https://github.com/ankicommunity/anki-sync-server-rs/releases/latest)[![](https://img.shields.io/github/last-commit/ankicommunity/anki-sync-server-rs)]()[![Gitter](https://badges.gitter.im/ankicommunity/community.svg)](https://gitter.im/ankicommunity/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Downloads](https://img.shields.io/github/downloads/ankicommunity/anki-sync-server-rs/total?label=Release%20Download)](https://github.com/ankicommunity/anki-sync-server-rs/releases/latest) [简体中文](README_CN.md)|[English](README.md) </div> **Warning:This project is no longer maintained.** It may works with Anki clients ~2.1.64 Please use the official sync server,for more see [guide](https://docs.ankiweb.net/sync-server.html) A cross-platform Anki sync server. This is a rust (still sqlite c library backed) take on anki sync server ,which keep track of the official sync server. ## Quickstart guide ### Installing (binary) 1. Grab binary from github [releases](https://github.com/ankicommunity/anki-sync-server-rs/releases) and unpack it, each platform has its corresponding tag (e.g. `windows_x86_64` for Windows 64bit,details see [support platform](docs/PLATFORM.md) ) ,enter the decompressed folder. 2. Add user For linux users or macOS users,run, ``` ./ankisyncd user --add username password ``` for Windows users,open a terminal in the folder and run, ``` ./ankisyncd.exe user --add username password ``` If you want to perform other operations ,such as deleting users or changing the password of one user,run with the `--help` flag for more details, ``` ./ankisyncd user --help ``` 3. Run server `./ankisyncd` (for Windows users,you can just double click the binary for a quick start). 4. Enjoy! ### Installing (Docker) details see [Docker](docs/CONTAINER.md) You can also build the binary from source code [Install](docs/INSTALL.md) or build a docker image from the source [DockerBuild](docs/CONTAINER.md). ## Set up Anki (Clients) ### Anki 2.1 #### >= 2.1.57 Due to the software update,Now Anki supports sync custom server settings inside the client. 1. Go to `Tools ->Preferences--<Syncing` 2. see below and enter your server address in the blank labled `self-hosted sync server`. Here is an example.If your server address is `192.0.0.1`,then the content to fill in is `http://192.0.0.1:27701/` 3. Restart Anki #### <2.1.57 ((install add-on from ankiweb) 1. Go to `Tools -> Add-ons` 2. click on the button labeled `Get Add-ons` and enter the code `358444159`. 3. You get add-on `custom sync server redirector`, choose it. Then click on the `config` button in the bottom right corner. 4. Apply your server IP address 5. Restart Anki ### AnkiMobile It seems that Ankimobile now has the ability to sync against self-hosted sync server.At least for Ankimobile 2.0.90(20090.2),A post from [A user has reported in Anki forum](https://forums.ankiweb.net/t/ankimobile-self-sync-server-failure-the-one-bundled-in-version-2-1-60-qt6/27862). As for the detailed steps,we will be happy to accept a PR about how to configure AnkiMobile to enable custom sync server If some one is using AnkiMobile and would be kind enough. When things do not go as expected,refer to the text: > If you're using AnkiMobile and are unable to connect to a server on your local network, please go into the iOS settings, locate Anki near the bottom, and toggle "Allow Anki to access local network" off and then on again. [From Anki tutorial](https://docs.ankiweb.net/sync-server.html#client-setup) ### AnkiDroid Go to `Advanced -> Custom sync server` (Go to `Settings` -> `Sync` -> `Custom sync server` in 2.16 and newer versions) Unless you have set up a reverse proxy to handle encrypted connections, use `http` as the protocol. The port will be either the default `27701`, or whatever you have specified in `ankisyncd.toml` (if using a reverse proxy, whatever port you configured to accept the front-end connection). Use the same base url for both the `Sync url` and the `Media sync url`, but append `/msync` to the `Media sync url`. Do **not** append `/sync` to the `Sync url` (Note: This is not the case any more in 2.16 and newer versions). Take IP address `192.0.0.0` for example and use default port `27701` with `http` protocol,the corresponsding urls are, Sync url:`http://192.0.0.0:27701` Media sync url: `http://192.0.0.0:27701/msync` In 2.16 and newer versions, Sync url:`http://192.0.0.0:27701/sync/` Media sync url: `http://192.0.0.0:27701/msync/` Even though the AnkiDroid login interface will request an email address, this is not actually required; it can simply be the username you configured with `ankisyncd user -a`. For https setup and support see [certificate setup](docs/CERTS.md) (Note: in 2.16 and newer versions,Ankidroid could supprt http connection once more). See [reverse proxy setup](docs/REVERSE_PROXY.md) for setting up a reverse proxy in front of the sync server. ## How to contribute See [CONTRIBUTING.md](CONTRIBUTING.md). All contributions must be licensed under AGLP-v3.0 to comply with the license of the anki code used as the base of this project. ## License See [LICENSE](LICENSE) ## Compatibility When the server made its first appearance,we have done some tests,details see [TEST](docs/TEST_SERVER_CLIENT.md) ## Configuration ### Env vars Ankidyncd supports setting environment variables to add accounts,`ANKISYNCD_USERNAME`,`ANKISYNCD_PASSWORD`. |Key|Value| |-|-| |ANKISYNCD_USERNAME|username,non-empty if set| |ANKISYNCD_PASSWORD|password,non-empty if set| ### Optional Server Configuration If you want to change the location where sync data is stored, or change the listening port,you can modify the configuration file `ankisyncd.toml`,and then run server, ``` ./ankisyncd --config /path/to/ankisyncd.toml ``` ## REFERENCE ankisyncd architecture or apis depend on [ankicommunity/anki-sync-server](https://github.com/ankicommunity/anki-sync-server) and [ankitects/anki](https://github.com/ankitects/anki). Sync APIs are initially based on anki/rslib 2.1.46.We almost replicated the media synchronization implementation logic in `anki-sync-server`.And this project is heavily dependent on upstream project `Anki`,that is,if the project Anki is no longer accessible,this project might be malfunctional and abandoned. SInce 2.1.57,this project keeps track of the process of Anki sync server. 07070100000015000081A40000000000000000000000016652BF4B00002022000000000000000000000000000000000000002700000000anki-sync-server-rs-1.1.5/README_CN.md<div align="center"> # anki-sync-server-rs [![License](https://img.shields.io/github/license/ankicommunity/anki-sync-server-rs)](https://github.com/ankicommunity/anki-sync-server-rs/blob/master/LINCENSE)[![Github status](https://img.shields.io/github/checks-status/ankicommunity/anki-sync-server-rs/master?label=github%20status)](https://github.com/ankicommunity/anki-sync-server-rs/actions)[![Github contributors](https://img.shields.io/github/contributors/ankicommunity/anki-sync-server-rs?label=github%20contributors)](https://github.com/ankicommunity/anki-sync-server-rs/graphs/contributors)[![DockerHub version](https://img.shields.io/docker/v/ankicommunity/anki-sync-server-rs?label=dockerhub%20version&sort=date)](https://hub.docker.com/repository/docker/ankicommunity/anki-sync-server-rs)[![DockerHub pulls](https://img.shields.io/docker/pulls/ankicommunity/anki-sync-server-rs)](https://hub.docker.com/repository/docker/ankicommunity/anki-sync-server-rs)[![DockerHub stars](https://img.shields.io/docker/stars/ankicommunity/anki-sync-server-rs)](https://hub.docker.com/repository/docker/ankicommunity/anki-sync-server-rs) [![](https://img.shields.io/github/v/release/ankicommunity/anki-sync-server-rs)](https://github.com/ankicommunity/anki-sync-server-rs/releases/latest)[![](https://img.shields.io/github/last-commit/ankicommunity/anki-sync-server-rs)]()[![Gitter](https://badges.gitter.im/ankicommunity/community.svg)](https://gitter.im/ankicommunity/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Downloads](https://img.shields.io/github/downloads/ankicommunity/anki-sync-server-rs/total?label=Release%20Download)](https://github.com/ankicommunity/anki-sync-server-rs/releases/latest) [简体中文](README_CN.md)|[English](README.md) </div> **告知:这个项目已经停止维护** 目前这个版本的服务器支持到2.1.64。 请使用官方的同步服务器项目,[guide](https://docs.ankiweb.net/sync-server.html)。 这是一个Rust语言版本的Anki 自建同步服务端,这个服务器追踪[Anki官方](https://github.com/ankitects/anki)同步服务端的进度,它们都是基于sqlite c 作为数据存储后端。 也有Anki官方推出的镶嵌在Anki客户端的同步服务端和通过Python安装的同步服务端,[看这里](https://docs.ankiweb.net/sync-server.html) ## 服务端的简单的使用说明 ### 安装 (通过二进制可执行文件) 1. 下载二进制文件,地址[releases](https://github.com/ankicommunity/anki-sync-server-rs/releases) ,注意下载与您的计算机平台相符的文件,比如说,对于Windows的用户来说,下载文件名带有`windows_x86_64`的文件。下载后解压缩并进入解压后的文件夹。 2. 添加账号(注:下面提到的`username`,`password`为您想设置的用户名和密码)。 对于Linux、macOS的用户,运行命令: ``` ./ankisyncd user --add username password ``` 对于WIndows用户,进入解压后的文件夹,打开一个命令行终端,运行命令: ``` ./ankisyncd.exe user --add username password ``` 如果您还想进行其它账号相关的操作,执行帮助命令: ``` ./ankisyncd user --help ``` 3. 启动即运行服务端,对于Linux、macOS的用户,运行命令:`./ankisyncd`,对于WIndows用户直接鼠标双击可执行文件`ankisyncd.exe`。 4. 到这里服务端的配置基本完成了。 ### 安装(通过容器Docker安装) 具体细节查看文件[Docker](docs/CONTAINER.md) 当然您也可以同步从源码构建目标平台的二进制文件[Install](docs/INSTALL.md)或者从源码构建docker镜像来安装服务端[DockerBuild](docs/CONTAINER.md)。 ## 设置Anki客户端 ### Anki 电脑端 #### >=2.1.57 因为软件更新,Anki客户端将自定义同步服务端作为内建功能。 1. 打开Anki,依次鼠标点击`工具`-->`设置`-->`网络` 2. 往下看,可以看到标有`self-hosted sync server(自建同步服务器)`的方框,在里面填写您的服务端的地址 3. 举个栗子。如果您的服务端地址为`192.0.0.1`,那么空白处应该填写的内容为 `http://192.0.0.1:27701/`。 4. 重启Anki #### <2.1.57 1. 打开Anki,依次鼠标点击选中`工具` -> `插件`。 2. 在插件页面,点击`获取插件`,填写代码`358444159`,点击确认(OK)。 3. 下载好后鼠标选中我们的插件`custom sync server redirector`,点击右下角的配置(Config)。 4. 不出意外接着会弹出一个窗口,在里面填写您的服务端的地址。 5. 重启Anki。 ### AnkiMobile AnkiMobile似乎已经支持和自建的同步服务器同步了。至少对于版本Ankimobile 2.0.90(20090.2)来说,似乎是可行的,这是一位IOS系统用户[在anki论坛报告的](https://forums.ankiweb.net/t/ankimobile-self-sync-server-failure-the-one-bundled-in-version-2-1-60-qt6/27862)。 对于详细的配置步骤,如果正在使用AnkiMobile的用户愿意贡献出宝贵的时间和睿智提交一个PR,详细讲解如何设置AnkiMobile来和自建的同步服务器同步,我们将无比感谢。 如果设置完成后发现不能同步可以参考下面的内容再试一次: > If you're using AnkiMobile and are unable to connect to a server on your local network, please go into the iOS settings, locate Anki near the bottom, and toggle "Allow Anki to access local network" off and then on again. 上面的内容摘自[ANki tutorial](https://docs.ankiweb.net/sync-server.html#client-setup) ### AnkiDroid 打开AnkiDroid,依次进入 `设置(Settings)` -> `高级(Advanced)` -> `自定义同步服务器(Custom sync server)` (对于2.16及以上的版本,依次进入 `设置(Settings)` -> `同步(Sync)` -> `Custom sync server自定义同步服务器(Custom sync server)` )。 除非设置反向代理来处理加密连接,我们使用`HTTP`协议。端口可以是默认的`27701`或者可以在配置文件`ankisyncd.toml`中设置您中意的端口。 安卓端提供了和Anki `endpoint`类似的两个地址来同步收藏数据(Collection)和媒体文件(Media),分别是`同步地址(Sync url)` and the `媒体文件同步地址(Media sync url)`,但是在新版2.16中出现了些微的改变。 举个例子,假设我们的服务器IP地址为``192.0.0.0``,而且我们使用HTTP协议,`27701`作为端口,相应的地址是, 同步地址(Sync url):`http://192.0.0.0:27701` 媒体文件同步地址(Media sync url): `http://192.0.0.0:27701/msync` 在2.16及以上版本中, 同步地址(Sync url):`http://192.0.0.0:27701/sync/` 媒体文件同步地址(Media sync url): `http://192.0.0.0:27701/msync/` 想要支持`https`,查看文件[certificate setup](docs/CERTS.md) (注:2.16版本允许不安全HTTP连接);反向代理如何设置,查看文件[reverse proxy setup](docs/REVERSE_PROXY.md)。 ## 贡献 如果您有建议或者批评,请提交问题或者PR,我们洗耳恭听。具体操作查看文件[CONTRIBUTING.md](CONTRIBUTING.md)。 ## 配置 ### 环境变量 支持通过环境变量添加账号啦。 |键|值| |-|-| |ANKISYNCD_USERNAME|用户名,如果设置则非空| |ANKISYNCD_PASSWORD|密码,如果设置则非空| ### 可选的服务端配置 注意,这并不是必选项,这一步可以略过。如果您想改变服务端同步数据存储位置或者改变监听端口,可以修改我们提供的配置文件`ankisyncd.toml`,它也在解压缩后的文件夹里面,最后运行如下命令(注:下面的命令适用于linux/和macOS,使用Windows的用户将`ankisyncd`替换成`ankisyncd.exe`,配置文件`ankisyncd.toml`的具体路径根据您计算机配置文件的实际路径而定), ``` ./ankisyncd --config /path/to/ankisyncd.toml ``` ## 许可 See [LICENSE](LICENSE) ## 引用 本项目的建立,与另外两个项目密不可分,它们是 [ankicommunity/anki-sync-server](https://github.com/ankicommunity/anki-sync-server) , [ankitects/anki](https://github.com/ankitects/anki),我们几乎复刻了`anki-sync-server`中的媒体同步的实现逻辑;而对于`Anki`,我们使用了它的Collection同步API,所以,如果我们不在能够访问到这个API,那么这个项目就停摆了。 07070100000016000041ED0000000000000000000000026652BF4B00000000000000000000000000000000000000000000002500000000anki-sync-server-rs-1.1.5/anki_patch07070100000017000081A40000000000000000000000016652BF4B00001383000000000000000000000000000000000000005F00000000anki-sync-server-rs-1.1.5/anki_patch/ccd9ca1a8309b80bcb50ddc5d99c7ce63440bce9_anki_rslib.patchFrom 5fe99ad8f42ec680958fda85305df447de14e050 Mon Sep 17 00:00:00 2001 From: zzndb <20870493+zzndb@users.noreply.github.com> Date: Thu, 23 May 2024 22:02:09 +0800 Subject: [PATCH] anki 24.04.1 --- rslib/i18n/gather.rs | 6 +++--- rslib/src/error/mod.rs | 2 +- rslib/src/sync/http_server/media_manager/mod.rs | 4 ++-- rslib/src/sync/http_server/mod.rs | 10 +++++----- rslib/src/sync/http_server/user.rs | 2 +- rslib/src/sync/request/mod.rs | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/rslib/i18n/gather.rs b/rslib/i18n/gather.rs index a25e5813e..de3ead224 100644 --- a/rslib/i18n/gather.rs +++ b/rslib/i18n/gather.rs @@ -21,16 +21,16 @@ pub fn get_ftl_data() -> TranslationsByLang { let ftl_base = source_tree_root(); add_folder(&mut map, &ftl_base.join("core"), "templates"); // And core translations from submodule - add_translation_root(&mut map, &ftl_base.join("core-repo/core"), true); + // add_translation_root(&mut map, &ftl_base.join("core-repo/core"), true); if let Some(path) = extra_ftl_root() { // Mobile client has requested its own extra translations - add_translation_root(&mut map, &path, false); + // add_translation_root(&mut map, &path, false); } else { // Qt core templates from this repo add_folder(&mut map, &ftl_base.join("qt"), "templates"); // And translations from submodule - add_translation_root(&mut map, &ftl_base.join("qt-repo/desktop"), true) + // add_translation_root(&mut map, &ftl_base.join("qt-repo/desktop"), true) } map } diff --git a/rslib/src/error/mod.rs b/rslib/src/error/mod.rs index 40af3d3a8..b884f0108 100644 --- a/rslib/src/error/mod.rs +++ b/rslib/src/error/mod.rs @@ -11,7 +11,7 @@ mod search; pub mod windows; use anki_i18n::I18n; -use anki_io::FileIoError; +pub use anki_io::FileIoError; use anki_io::FileOp; pub use db::DbError; pub use db::DbErrorKind; diff --git a/rslib/src/sync/http_server/media_manager/mod.rs b/rslib/src/sync/http_server/media_manager/mod.rs index 8eae3d97f..0e4e2bd56 100644 --- a/rslib/src/sync/http_server/media_manager/mod.rs +++ b/rslib/src/sync/http_server/media_manager/mod.rs @@ -16,13 +16,13 @@ use crate::sync::media::changes::MediaChange; use crate::sync::media::database::server::ServerMediaDatabase; use crate::sync::media::sanity::MediaSanityCheckResponse; -pub(crate) struct ServerMediaManager { +pub struct ServerMediaManager { pub media_folder: PathBuf, pub db: ServerMediaDatabase, } impl ServerMediaManager { - pub(crate) fn new(user_folder: &Path) -> HttpResult<ServerMediaManager> { + pub fn new(user_folder: &Path) -> HttpResult<ServerMediaManager> { let media_folder = user_folder.join("media"); create_dir_all(&media_folder).or_internal_err("media folder create")?; Ok(Self { diff --git a/rslib/src/sync/http_server/mod.rs b/rslib/src/sync/http_server/mod.rs index 1b4c0ee80..12cc8d970 100644 --- a/rslib/src/sync/http_server/mod.rs +++ b/rslib/src/sync/http_server/mod.rs @@ -3,9 +3,9 @@ mod handlers; mod logging; -mod media_manager; -mod routes; -mod user; +pub mod media_manager; +pub mod routes; +pub mod user; use std::collections::HashMap; use std::future::Future; @@ -49,12 +49,12 @@ use crate::sync::request::MAXIMUM_SYNC_PAYLOAD_BYTES; use crate::sync::response::SyncResponse; pub struct SimpleServer { - state: Mutex<SimpleServerInner>, + pub state: Mutex<SimpleServerInner>, } pub struct SimpleServerInner { /// hkey->user - users: HashMap<String, User>, + pub users: HashMap<String, User>, } #[derive(serde::Deserialize, Debug)] diff --git a/rslib/src/sync/http_server/user.rs b/rslib/src/sync/http_server/user.rs index 72dcc7197..1fccdb337 100644 --- a/rslib/src/sync/http_server/user.rs +++ b/rslib/src/sync/http_server/user.rs @@ -13,7 +13,7 @@ use crate::sync::error::HttpResult; use crate::sync::error::OrHttpErr; use crate::sync::http_server::media_manager::ServerMediaManager; -pub(in crate::sync) struct User { +pub struct User { pub name: String, pub password_hash: String, pub col: Option<Collection>, diff --git a/rslib/src/sync/request/mod.rs b/rslib/src/sync/request/mod.rs index a6f9ea8d8..bfaac228e 100644 --- a/rslib/src/sync/request/mod.rs +++ b/rslib/src/sync/request/mod.rs @@ -2,7 +2,7 @@ // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html pub mod header_and_stream; -mod multipart; +pub mod multipart; use std::any::Any; use std::env; @@ -39,7 +39,7 @@ use crate::version::sync_client_version_short; #[derive(Clone)] pub struct SyncRequest<T> { pub data: Vec<u8>, - json_output_type: PhantomData<T>, + pub json_output_type: PhantomData<T>, pub sync_version: SyncVersion, /// empty with older clients pub client_version: String, -- 2.44.0 07070100000018000081A40000000000000000000000016652BF4B0000013F000000000000000000000000000000000000002900000000anki-sync-server-rs-1.1.5/ankisyncd.toml [listen] host = "0.0.0.0" port = 27701 [paths] # set root_dir as working dir where server data(collections folder) and database(auth.db...) reside root_dir = "." # The following section is optional, # set it up if your server is compiled with tls support [encryption] ssl_enable = false cert_file = "" key_file = "" 07070100000019000081A40000000000000000000000016652BF4B0000043F000000000000000000000000000000000000002300000000anki-sync-server-rs-1.1.5/build.rsuse std::env; fn main() { // should consider native build on arm platform // used in cross compile while building with CD // such as arm-unknown-linux-musleabihf // let target = env::var("TARGET").expect("TARGET was not set"); // if target.contains("arm") && target.contains("musl") { // // find and link static sqlite3 lib // let sql = Path::new(&env::current_dir().unwrap()).join("sql/lib"); // println!("cargo:rustc-link-search=native={}", sql.display()); // println!("cargo:rustc-link-lib=static=sqlite3"); // } // if target.contains("aarch64") && target.contains("musl") { // // find and link static sqlite3 lib // let sql = Path::new(&env::current_dir().unwrap()).join("sql/lib"); // println!("cargo:rustc-link-search=native={}", sql.display()); // println!("cargo:rustc-link-lib=static=sqlite3"); // } let pat = "tls"; let key = format!("CARGO_FEATURE_{pat}").to_uppercase(); if env::var_os(key).is_some() { println!("cargo:rustc-cfg=feature=\"{pat}\"") } } 0707010000001A000041ED0000000000000000000000026652BF4B00000000000000000000000000000000000000000000001F00000000anki-sync-server-rs-1.1.5/docs0707010000001B000081A40000000000000000000000016652BF4B000003FA000000000000000000000000000000000000003500000000anki-sync-server-rs-1.1.5/docs/ANKI_CLIENTS_SETUP.md## Setting up Anki Clients #### Anki 2.1(install add-on from ankiweb) 1. Go to `Tools -> Add-ons` 2. On the add-on window, click on `Get Add-ons` and fill in the textbox with the code `358444159` 3. You get add-on `custom sync server redirector`, choose it. Then click `config` on the bottom right 4. Apply your server ip address 5. Restart Anki #### AnkiDroid Go to `Advanced -> Custom sync server` Unless you have set up a reverse proxy to handle encrypted connections, use `http` as the protocol. The port will be either the default `27701`, or whatever you have specified in `Settings.toml` (if using a reverse proxy, whatever port you configured to accept the front-end connection). Use the same base url for both the `Sync url` and the `Media sync url`, but append `/msync` to the `Media sync url`. Do **not** append `/sync` to the `Sync url`. Even though the AnkiDroid interface will request an email address, this is not required; it will simply be the username you configured with `ankisyncd user -a`. 0707010000001C000081A40000000000000000000000016652BF4B00000B37000000000000000000000000000000000000002F00000000anki-sync-server-rs-1.1.5/docs/ARCHITECTURE.mdThis page illustrates how the server is constructed。 It consists of two parts,one is about collection sync,the other is about media sync。 The server uses crate `actix-web` as web frame work and thus uses `async` feature. So the entry point of the server is function `main` from `main.rs`.Here's the feature named `tls` which supports secure http connection . And then we go to `server.rs` in which illustrated how we can build an instance of http server. Here we configure http server with global app data and services that receives HTTP requests from clients .As of global application data,there are four of them,including `session manager`,`backend`,`configure data`,`session database`.Session manager is something that you can manage session,such as adding sessions.Backend is something like the handle that we can use it to introduce sync API from anki lib. Configure data is something that was read from file .Session database is that the connection to database has already been established and is ready to perform actions. The entry point of sync handler is `sync_app_no_fail` -> `sync_app` in `sync.rs`.We should assign each user profile at client(Anki app) a unique `hostkey`. which is provided by method `operate_hostkey_no_fail` -> `operation_hostkey`,while clients are going to log into the server (which means user credentials will be sent over) After user authenticates successfully,a session(which establish a relationship between user and file location in the server) will be set up between server and client ,and the server will maintain a struct named .`ession manager`.As the first paragraph above says,the sync process includes two parts--collection and media sync. It's convenient for us to directly apply API from upstream anki lib and collection sync part is contained in `collection.rs`. As for media sync,there are similar procedures such as collection sync.`last_usn` is always used to compare difference between the server and clients.`usn` is something like an index to media records in media database and will incremented by 1.There are some cases which we use to demonstrate how the server works to handle media sync. case 1:prepare an empty account with a new user profile..Add two cards (each card contains one media file and randomly delete one of them. Then sync to server. As we can see from the console output,the server uses methods ``begin`,`uploadChanges` ,`mediaSanity`.Client will upload media data `[("1.png", Some("0")), ("2.png", Some("1"))]` if we don't perform actions to check and delete media . Case2: new user profile,have synced to server. we log into server and choose download. methods `mediaChanges`, `downloadFiles` are called. method `media_changes` is used to compare difference between server and client. If media state of server is newer than client,then client will download media files. 0707010000001D000081A40000000000000000000000016652BF4B00000273000000000000000000000000000000000000002800000000anki-sync-server-rs-1.1.5/docs/CERTS.md# HTTPS setup Due to Android policy change, some ankidroid versions need an https transport. Ankisyncd allow the use of self-signed certicates that enable more secure connection such as in semi-open LAN environment. This requires the syncserver to be compiled with the `tls` feature (pass `--feature tls` to cargo when building). We recommend [mkcert](https://github.com/FiloSottile/mkcert) for easy ssl certs setup. Open `ankisyncd.toml` with a text editor and modify following lines to enable and set certificates paths: ``` #make ssl_enable true ssl_enable=false # put cert and key file path cert_file="" key_file="" ``` 0707010000001E000081A40000000000000000000000016652BF4B000027AA000000000000000000000000000000000000002900000000anki-sync-server-rs-1.1.5/docs/CHANGELOGparse ankisyncd.conf how to compile rslib sucessfully 1.put anki-sync-server-rs in dir anki-,in its dep toml ,anki={path="../rslib"} 2.put anki-sync-server-rs in anki- cargo.toml field workspace put anki entirely into project as an crate and use rslib work around /meta reference examples/basics/middleware get session error on msync uploadChanges? pattern match err when to hkey == None delete deck cause sanity check err :cards and notes arent equal. start sucessfully delete records from db,yet applychanges restore back 1.maybe server usn is not correct,as applychanges use the usn the same as start,py impl dont use the usn on applychanges 2.see cards count on applychanges python impl :equal 3.start dont return server graves,see diff to py impl (py dont too) 4.guess before start ,open collection will read db into memory and will not afftect local db,so operations like delete from db dont work until db execute commit ,finally works,by add begin trx and commit trx in start media downloadFiles : Ankidroid client err in opening zip file. 1.media db not update on uploadChanges after delete and check media on client :db update comfirm 2.try open zip data on server to be synced to client,can open meta data on server 3.compression format not correct? seems have no effect Stored and Deflated 4.able to read data from zip on server? ok 5.response type err ,currently use json(Option<vec<u8>>), change to body(vec<u8>),err msg changed 6.meta file format incorrect from vec<[String;2]> to {files: Vec<(String,Option<String>)>},new err appear 7.no value for 0 ,seems Ankidroid need downloadFiles response zip meta to be hashmap-like,sucessfully sync err decode response body EOF when parsing... on Windows seems applychunks err? 1.change response body to "null",ok mediaChanges:error decoding response body: invalid type: string "1", expected i32 1.change media db entry from Vec<[String;3]> to Vec<(String,i32,String)> delete deck then sync on pc fail on applygraves,decoding response body err 1.response body from "" to "null" remove unused imports introduce ankisyncctl(account manager) create and edit readme generate Settings.toml when first run executable file create release file tar.gz,zip,exe,aarch64 executable,publish to termux msync/uploadChanges pretty slow ? 1.seems ankidroid is processing data during the delay and it has almost equal speed between rust and py impl integrate ankisyncctl into ankisyncd ? 1.use U flag to acess ankisyncctl add embeded cert https based on rustls 1.ok build for linux x86_64 and aarch64 1.x86_64:sucessfully build using musl-gcc,dynamically linked openssl made build from c source using musl-gcc 2.try to corss-compile for aarch64,as ring is not able to be compiled. use openssl made on raspberry with gnu-gcc,failed 3.try to corss-compile for aarch64,use openssl make on x86_64 ,openssl cross-compiled sucessfully ,yet build failed 4.use musl to compile openssl for x86_64,and cross-compile:failed, adding symbols: file in wrong format 5.use musl-gcc to corss-compile openssl for aarch64 in another way,then build :sucessfully build staticly linked binaries 6.use musl-gcc to compile openssl for x86_64, and build:cannot build staticly linked binary cross compile for linux armv7 1.openssl and ankisyncd by rpitools arm-linux-gnueabihf-gcc,build flags lgcc/static: sucessfully build,yet crash with bad system call, for GNU/Linux 2.6.32 in file info 2.openssl and ankisyncd by arm-linux-musleabihf-gcc: cannot compile openssl error: '-mfloat-abi=hard': selected processor lacks an FPU 3.openssl by rpitools arm-linux-gnueabihf-gcc,ankisyncd by arm-linux-musleabihf-gcc , before build ankisyncd ,set env var CC=rpitools arm-linux-gnueabihf-gcc sucessfully compiled and run well on termux(64bits) user manager addhere to env_variables auth_db path? replace sync_method with backend(global state).sync_server_method(input) and use backend.open_collection(input) 1. fail,seems blocked ,may be incompatible with async/await replace sync_method with backend(global state).sync_server_method(input) and use backend.col=session.get_col() 1. fail,seems blocked ,may be incompatible with async/await 2.use bd(sync_app argument/backend) and dont create variable backend,can run but with bugs delete cards/deck cause sync error on ankidroid? 1.cmp UnchunkedChanges from clients(android/pc),seems no problem,sync well full_upload -> add cards ->sync -> shutdown syncserver and start->sync ,cause check database errir? 1.server db is not updated in normal syncing process (only full sync will do): I have commented commit_rust_trx() in anki/rslib/sync/server/finish(),so changes cannot be committed to db,just cancel it. cannot switch users/profile when server is running? 1.before meta,drop col from backend and add new col into backend when username in backend isnt equal to that in session (in fn add_col) docker build on raspberry ubuntu 64bit aarch64: always cannot access to github (crates.io), search for methods: 1.replace offitial source with tuna source,after severy retries,things seem to work.except for 4 updates still need to access github. Contribution update : - Doc and qa:document re-writing #17 by @redmie - Docker build fails at prost-build for armv7h #22 ,#23. by @mktree and @dobefore - Unwrap reduction 2bis and versions bump:move anki out of source tree,fix run time in run time due to anki update by @redmie - Version-bump-update-anki-lib/better clone-patch-anki #29,fork from #18. document about #18, by @redmie,@dobefore - Cicd-system #26 by @dobefore and @redmie's suggestions - bump ankisyncd to 0.1.5(test release) #30 by @dobefore - fix cross compiling fail for arm(successfully build static bin) #32 by @dobefore - bump to 0.1.7 (first formal release) #33 by @dobefore download error reproduce: upload to server,log out,delete deck,log in,sync.exit client and server,launch both,and sync ,download error. add actix-web middlewares 1.How to append username to log info? 2. error handling about response code return fordden code when session error occurs when users try to log in though they have already logged in with an existing account,which will return 500. Work to do one. pull from anki and ankisyncd-rs OK two. create new brahch ok create new anki patch 1. get current commit ID: c8275257ce4f507cf3292d6d4d7185d05088e310 2. make changes OK 3. get current commit ID: 41d4b0ea08bba88e114c0ad11ad8038d1b48a00f 4. diff: create a new rs file in which test new api,try to replace Router with actix-web 1. try to compile anki/rslib,error arises; Compiling anki_i18n v0.0.0 (D:\anki-sync-server-rs\anki\rslib\i18n) error: failed to run custom build command for `anki_i18n v0.0.0 (D:\software\vscode_project\anki_sync\anki-sync-server-rs\anki\rslib\i18n)` thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 3, kind: NotFound, message: "系统找不到指定的路径。" }', anki\rslib\i18n\build\gather.rs:68:37 fixed by commenting function add_translation_root in rslib/i18n/build/gather.rs There are so many obstacles trying to comply with actix-web,as anki uses axum. So better to switch to axum,yet it would approximate to the fact that I have almost copied the whole work!I will be ashamed of myself. After inspecting protocol part of sync,it is possible to replace axum with acti-web. Now,two problems arise: 1. add a trait that accept future closure,reference to actix-web 2. construct anki struct SyncRequest from request,involves adding actix-web's middleware to handle this. Firstly,only finish part of collection sync ,disregard media sync.OK add struct wrapper for SyncRequest, OK start constructing response : do some modifications before return response.OK finish nested routes of actix-web OK 3. attack the problem about switching to self-make method host_key make a self-made method hostkey but encoounter other problem. OK 4. load all users from auth database before launching the server OK 5. collection sync handler is not used nad the server just return 500 code OK I think i find the reason why it doesn't work. Because the handler has a argument ehich is a web::data type and should be constructed and passed before starting the server. I remove that argument and it works. It is too bad that it takes me too long to waste precious time on the obvious error. 6. other media sync methods except for begin are not working OK check whether the two begin methods are used in the same time begin method with android seems ok uploadChanges error,maybe data is not fully received? So I change method by write_all ingore stream read error in order to make compitable with media get method 7. collection exceeds size limit. OK on clinet side there is no need to bother.As it will ignore this if endpoint is not http://ankiweb.... we can increase this limit by setting env var MAX_SYNC_PAYLOAD_MEGS on the server side 8. finish lib and main files,add tls support. OK 9. max upload collection size limit on Ankidroid:setting on the server doesn't work 10. more user-friendly feedback when authentication fails or two hostkey are not equal OK several conditions that authentication will fail when client has already authenticated,the same user on the server but with empty collection folder this will cause error.invalid key(sync_key) when client has already authenticated,but a same username but different passwird user is created on the server 11. add cross-compie target aarch64 and remove target arm in github action build scripys CI/CD OK Three.uodate readme Four. update version to 1.0.0 OK 关于actix-web函数argument web::data如果在服务器启动前没有设置,那个函数就不会被使用,也不会返回错误,只是报告500,之不太好,要是能够报告错误就好,这样节省时间。 update anki verion to 2.1.60. two. create new brahch create new anki patch 1. get current commit ID: d9d36078f17a2b4b8b44fcb802eb274911ebabe7 2. make changes git add . & git commit -m "changes". 3. get current commit ID: d70e168c5dd7b1476847c40c8612c8b498c9e1e7 4. diff: OK 5. update ANKI_COMMIT ID in patch scripts OK 0707010000001F000081A40000000000000000000000016652BF4B000006DF000000000000000000000000000000000000002C00000000anki-sync-server-rs-1.1.5/docs/CONTAINER.md# Containers pre-built images from docker hub for arm64 and amd64 are available, or you can build it by yourselves. In this manual we will use `docker` command for containers creation/management but it can seamlessly be replaced with `podman` every time it is used. The `Dockerfile` at the root of the repository controls the build process. ## Pull images from DockerHub and run in container 1. pull image ``` docker pull ankicommunity/anki-sync-server-rs:latest ``` 2. run it in background (you can specify the container name by passing `--name=ankisyncd` or use default name).And,you can pass env vars to following command line to add users,for example,following part of env vars will add an account whose username is `test` and password is `123456`. ``` docker run -d -it --name=ankisyncd -e ANKISYNCD_USERNAME=test -e ANKISYNCD_PASSWORD=123456 ankicommunity/anki-sync-server-rs:latest ``` 3. add user If env variables are already set ,which means the account has been added,there is no need to do this step.If not,bring up the shell of the `ankisyncd` container(or default container name) and run command ``` docker exec -it ankisyncd /bin/bash ankisyncd user -a username password exit ``` ## Building in container, running on host 1. In the root of the repository run: ``` docker build -t anki-sync-server-rs/builder:latest . ``` 2. Then exfiltrate the binary from the container: ``` docker run --rm --entrypoint cat anki-sync-server-rs/builder:latest /usr/local/bin/ankisyncd > ankisyncd ``` 3. Use the `ankisyncd` binary obtained as usual ## Building and running in container 1. Build the container: ``` docker build -t anki-sync-server-rs/runner:latest . ``` 2. Run it in foreground: ``` docker run -it anki-sync-server-rs/runner:latest ``` 07070100000020000081A40000000000000000000000016652BF4B00000918000000000000000000000000000000000000002A00000000anki-sync-server-rs-1.1.5/docs/INSTALL.md# Install ## Grab release See Quickstart in [README.md](../README.md). ## Build from source 1. make sure Rust and its toolchains are installed. In doubt use rustup as proposed in [this link](https://www.rust-lang.org/tools/install). 2. clone our repo and enter into the folder 3. Populate anki lib by running `scripts/clone_patch_anki` (use the corresponding bat script on windows, an env variable ANKI_REPO_URL can be set to change anki library repository url which defaults to [github](https://github.com/ankitects/anki)) 4. run build command `cargo build --release` 5. The resulting binary is available in `target/release/` ## Install as a systemd unit We suppose that the sync server is installed in `/usr/bin/ankisyncd`. Install the configuration file in `/etc/ankisyncd.toml` with root dir set to `/var/lib/ankisyncd/`. Create a new system user and group named `anki` (using `useradd`). Create and change ownership of the root dir: `mkdir -p /var/lib/ankisyncd/ && chmod -R o-a /var/lib/ankisyncd/ && chown -R anki:anki /var/lib/ankisyncd/` Then populate the secure service file in `/etc/systemd/system/ankisyncd.service` ``` [Unit] Description=Anki sync server daemon After=network-online.target # If reverse proxy start after it #After=network-online.target nginx.service Wants=network-online.target [Service] Type=exec ExecStart=/usr/bin/ankisyncd -c /etc/ankisyncd.toml User=anki Group=anki SyslogIdentifier=ankisyncd WorkingDirectory=/var/lib/ankisyncd/ PrivateTmp=true PrivateDevices=true CapabilityBoundingSet= AmbientCapabilities= ProtectSystem=strict ProtectKernelTunables=true ProtectKernelModules=true ProtectControlGroups=true ProtectClock=true ProtectHostname=true ProtectHome=tmpfs ProtectKernelLogs=true ProtectProc=invisible ProcSubset=pid PrivateNetwork=false RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX IPAddressAllow=any SystemCallArchitectures=native SystemCallFilter=@system-service SystemCallFilter=~@privileged @resources @obsolete RestrictSUIDSGID=true RemoveIPC=true NoNewPrivileges=true RestrictRealtime=true RestrictNamespaces=true LockPersonality=true PrivateUsers=true MemoryDenyWriteExecute=false [Install] WantedBy=multi-user.target ``` Reload services list `systemctl daemon-reload`. Enable and start sync server `systemctl enable ankisyncd && systemctl start ankisyncd`. 07070100000021000081A40000000000000000000000016652BF4B0000013F000000000000000000000000000000000000002B00000000anki-sync-server-rs-1.1.5/docs/PLATFORM.md`ankisyncd_x.x.x-linux_x64.tar.gz` for linux x86_86 using glibc dynamically linked. `ankisyncd-x.x.x-linux_arm.tar.gz` for arm 32bit NEON board under linux,also suitable for arm64,using muslc statically linked. `ankisyncd_x.x.x-windows_x64.zip` for x86-64 windows. `ankisyncd_x.x.x-macOS_x64.zip` for x86-64 MacOS. 07070100000022000081A40000000000000000000000016652BF4B000004CD000000000000000000000000000000000000003000000000anki-sync-server-rs-1.1.5/docs/REVERSE_PROXY.md# Reverse Proxy Setup How to setup a reverse proxy using nginx. Install and expose the sync server to the reverse proxy server at adress and port `SYNC_SERVER_ADDR:SYNC_SERVER_PORT` (loopback `127.0.0.1` or firewalled traffic inside controlled network). Inside the server directive of the host you want to use for anki add the following `location /` block: ``` server { listen 443 ssl; # Increase nginx version identification difficulty server_tokens off; ... # Increase body size client_max_body_size 512M; # Pass traffic to sync server² location / { proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # Set headers for more security #add_header X-Content-Type-Options nosniff; #add_header X-Frame-Options "SAMEORIGIN"; #add_header X-XSS-Protection "1; mode=block"; #add_header X-Robots-Tag none; #add_header X-Download-Options noopen; #add_header X-Permitted-Cross-Domain-Policies none; #add_header Referrer-Policy 'strict-origin'; #add_header Front-End-Https on; proxy_pass http://SYNC_SERVER_ADDR:SYNC_SERVER_PORT; } ``` 07070100000023000081A40000000000000000000000016652BF4B000001EA000000000000000000000000000000000000003500000000anki-sync-server-rs-1.1.5/docs/TEST_SERVER_CLIENT.md### Server It should work on any tier 1/2 platform of the rust ecosystem. But have only been tested on the following. #### Windows Win 10 64bits #### Linux |machine|ENV| |----|----| |x86_64|Windows wsl2,tested| |aarch64(arm64)|cross-compiled on wsl2(ubuntu),tested on ubuntu aarch64 and termux| |armv7(arm32)|cross-compiled on wsl2(ubuntu)| ### Client |tested anki versions|2.1.15,2.1.28,2.1.35,2.1.50| |----|----| |tested process| import a collection of decks and upload to server|07070100000024000041ED0000000000000000000000026652BF4B00000000000000000000000000000000000000000000002200000000anki-sync-server-rs-1.1.5/scripts07070100000025000081A40000000000000000000000016652BF4B00000B19000000000000000000000000000000000000002D00000000anki-sync-server-rs-1.1.5/scripts/Cargo.toml[package] name = "anki" version = "0.0.0" edition = "2021" authors = ["Ankitects Pty Ltd and contributors"] license = "AGPL-3.0-or-later" description = "Anki's Rust library code" build = "build/main.rs" [lib] name = "anki" path = "src/lib.rs" [features] bench = ["criterion"] [[bench]] name = "benchmark" harness = false required-features = ["bench"] # After updating anything below, run ../cargo/update.py [build-dependencies] prost-build = "0.11.1" which = "4.3.0" [dev-dependencies] env_logger = "0.9.1" tokio = { version = "1.21", features = ["macros"] } [dependencies] # pinned as any changes could invalidate sqlite indexes unicase = "=2.6.0" tokio = { version = "1.21", features = ["fs", "rt-multi-thread"] } anki_i18n = { path="i18n" } criterion = { version = "0.4.0", optional = true } nom = "7.1.1" proc-macro-nested = "0.1.7" slog-term = "2.9.0" blake3 = "1.3.1" bytes = "1.2.1" chrono = "0.4.22" coarsetime = "0.1.22" flate2 = "1.0.24" fluent = "0.16.0" fluent-bundle = "0.15.2" futures = "0.3.24" hex = "0.4.3" htmlescape = "0.3.1" intl-memoizer = "0.5.1" itertools = "0.10.5" lazy_static = "1.4.0" num_enum = "0.5.7" num-integer = "0.1.45" once_cell = "1.15.0" pin-project = "1.0.12" prost = "0.11.0" rand = "0.8.5" regex = "1.6.0" reqwest = { git="https://github.com/ankitects/reqwest.git", rev="7591444614de02b658ddab125efba7b2bb4e2335", default-features=false, features=[ "json", "socks", "stream", "multipart", # the Bazel build scripts separate these out by platform "native-tls", "rustls-tls", "rustls-tls-webpki-roots", "rustls-tls-native-roots", ] } rusqlite = { version = "0.28.0", features = ["trace", "functions", "collation"] } scopeguard = "1.1.0" serde = "1.0.145" serde_derive = "1.0.145" serde_json = "1.0.85" serde_repr = "0.1.9" serde_tuple = "0.5.0" serde-aux = "4.0.0" sha1 = "0.6.0" slog = { version = "2.7.0", features = ["max_level_trace", "release_max_level_debug"] } slog-async = "2.7.0" slog-envlogger = "2.2.0" tempfile = "3.3.0" unic-langid = { version = "0.9.0", features = ["macros"] } unicode-normalization = "0.1.22" utime = "0.3.1" zip = { version = "0.6.2", default-features = false, features = ["deflate", "time"] } async-trait = "0.1.57" ammonia = "3.2.1" pulldown-cmark = "0.9.2" fnv = "1.0.7" strum = { version = "0.24.1", features = ["derive"] } tokio-util = { version = "0.7.4", features = ["io"] } pct-str = { git="https://github.com/timothee-haudebourg/pct-str.git", rev="4adccd8d4a222ab2672350a102f06ae832a0572d" } unic-ucd-category = "0.9.0" id_tree = "1.8.0" zstd = { version="0.11.2", features=["zstdmt"] } num_cpus = "1.13.1" csv = { git="https://github.com/ankitects/rust-csv.git", rev="1c9d3aab6f79a7d815c69f925a46a4590c115f90" } dissimilar = "1.0.4" snafu = { version = "0.7.2", features = ["backtraces"] } convert_case = "0.6.0" 07070100000026000081A40000000000000000000000016652BF4B00000142000000000000000000000000000000000000003100000000anki-sync-server-rs-1.1.5/scripts/ankisyncd.toml [listen] host = "0.0.0.0" port = 27701 [paths] # set root_dir as working dir where server data(collections folder) and database(auth.db...) reside root_dir = "/app" # The following section is optional, # set it up if your server is compiled with tls support [encryption] ssl_enable = false cert_file = "" key_file = "" 07070100000027000081ED0000000000000000000000016652BF4B00000037000000000000000000000000000000000000002C00000000anki-sync-server-rs-1.1.5/scripts/build_all#!/bin/sh cargo build $1 cargo build --features tls $1 07070100000028000081A40000000000000000000000016652BF4B000009D2000000000000000000000000000000000000002800000000anki-sync-server-rs-1.1.5/scripts/cc.sh# for cross compile use # cp cc.sh and config to dir ..,then change dir to .. # for aarch64 # echo "cross-compile for aarch64" # file1="target/aarch64-unknown-linux-musl/release/ankisyncd" # if [ -f $file1 ];then # echo "$file1 exists" # else # # add env var # export PATH="$HOME/aarch64-linux-musl-cross/bin:$PATH" # # use compiled openssl # export OPENSSL_LIB_DIR=/home/ubuntu/openssl_aarch64_musl # export OPENSSL_INCLUDE_DIR=/home/ubuntu/openssl_aarch64_musl/include # export OPENSSL_STATIC=true # # cross build for aarch64 # cargo build --target=aarch64-unknown-linux-musl --release # fi version="0.1.3" # for armv7 echo "cross-compile for armv7" file2="target/armv7-unknown-linux-musleabihf/release/ankisyncd" if [ -f $file2 ];then echo "$file2 exists" else # set CC locenv var # export PATH="$HOME/rpitools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin:$PATH" # export CC=arm-linux-gnueabihf-gcc # add env var export PATH="$HOME/arm-linux-musleabihf-cross/bin:$PATH" # use compiled openssl export OPENSSL_LIB_DIR=/home/ubuntu/anki-sync-server-rs/openssl/lib export OPENSSL_INCLUDE_DIR=/home/ubuntu/anki-sync-server-rs/openssl/include export OPENSSL_STATIC=true mkdir -p $HOME/sql # export PATH="$HOME/arm-linux-musleabihf-cross/bin:$PATH" # export CC=arm-linux-musleabihf-gcc cd $HOME/sqlite-autoconf-3380200 # make clean ./configure CC=$HOME/rpitools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc --host=arm-linux --prefix=$HOME/sql make && make install cd $HOME/anki-sync-server-rs cp -r $HOME/sql . # cross build for armv7 enable feature --features rustls cargo build --target arm-unknown-linux-musleabihf --release --features tls mkdir ankisyncd-arm cp target/arm-unknown-linux-musleabihf/release/ankisyncd ankisyncd-arm/ cp Settings.toml ankisyncd-arm/ tar -czvf ankisyncd-$version-arm.tar.gz ankisyncd-arm/ mv ankisyncd-$version-linux-arm.tar.gz ~ fi #for x86-64 # echo "cross-compile for x64" # # add env var # export PATH="$HOME/x86_64-linux-musl-cross/bin:$PATH" # export CC= # export OPENSSL_LIB_DIR=/home/ubuntu/openssl_x64 # export OPENSSL_INCLUDE_DIR=/home/ubuntu/openssl_x64/include # export OPENSSL_STATIC=true # # enable feature --features rustls # cargo build --release --target=x86_64-unknown-linux-musl # mkdir ankisyncd-linux # cp target/x86_64-unknown-linux-musl/release/ankisyncd ankisyncd-linux/ # cp Settings.toml ankisyncd-linux/ # tar -czvf ankisyncd-$version-linux.tar.gz ankisyncd-linux/ # mv ankisyncd-$version-linux.tar.gz ~07070100000029000081ED0000000000000000000000016652BF4B000003F0000000000000000000000000000000000000003300000000anki-sync-server-rs-1.1.5/scripts/clone_patch_anki#!/bin/sh # set -eu realpath() { OURPWD=$PWD cd "$(dirname "$1")" LINK=$(readlink "$(basename "$1")") while [ "$LINK" ]; do cd "$(dirname "$LINK")" LINK=$(readlink "$(basename "$1")") done REALPATH="$PWD/$(basename "$1")" cd "$OURPWD" echo "$REALPATH" } #realpath "$@" PROJECT_ROOT=$(realpath) # or result=`myfunc` ANKI_REPO_URL=${ANKI_REPO_URL:-"https://github.com/ankitects/anki"} ANKI_COMMIT=ccd9ca1a8309b80bcb50ddc5d99c7ce63440bce9 #PROJECT_ROOT="$(realpath "$(dirname "$(dirname "$0")")")" ANKI_PATCH_FOLDER="$PROJECT_ROOT./anki_patch/" ANKI_FILE_SUFFIX="_anki_rslib.patch" echo "Cloning anki from $ANKI_REPO_URL of commit $ANKI_COMMIT" cd "$PROJECT_ROOT" # remove anki lib in case patched cache exists in docker build during github action rm -fr anki mkdir -p anki && cd anki git init git remote add origin "$ANKI_REPO_URL" git fetch --depth 1 origin $ANKI_COMMIT git checkout FETCH_HEAD echo "Applying patch" git apply "$ANKI_PATCH_FOLDER/$ANKI_COMMIT$ANKI_FILE_SUFFIX" 0707010000002A000081A40000000000000000000000016652BF4B0000066C000000000000000000000000000000000000003700000000anki-sync-server-rs-1.1.5/scripts/clone_patch_anki.bat@REM the file was created by @dobefore and @redmie @REM following line command will not echo every line command @echo off @REM Allow external definition of anki repository URL IF "%ANKI_REPO_URL%" == "" GOTO NOURLSET GOTO END :NOURLSET set ANKI_REPO_URL="https://github.com/ankitects/anki" :END @REM here e.g. D:\software\vscode_project\anki_sync\anki-sync-server-rs set PROJECT_ROOT= %CD% set ANKI_PATCH_FOLDER=%PROJECT_ROOT%\anki_patch set ANKI_FILE_SUFFIX=_anki_rslib.patch @REM Set up other variables set ANKI_TAG=2.1.46 set ANKI_COMMIT=ccd9ca1a8309b80bcb50ddc5d99c7ce63440bce9 @REM Clone & patch echo "Cloning anki from %ANKI_REPO_URL%" cd %PROJECT_ROOT% git clone %ANKI_REPO_URL% echo "Checking out commit %ANKI_COMMIT% and applying patch" cd anki git checkout %ANKI_COMMIT% @REM convert CRLF TO LF dos2unix %ANKI_PATCH_FOLDER%\%ANKI_COMMIT%%ANKI_FILE_SUFFIX% git apply %ANKI_PATCH_FOLDER%\%ANKI_COMMIT%%ANKI_FILE_SUFFIX% @REM How to create a patch file @REM clone anki repo @REM get original commit ID 5dab7ed47ec6d17226d2fc0529c32a56e40e5f8a @REM git rev-parse HEAD @REM make changes to anki lib ,e.g.add pub to structs... @REM git commit @REM get current commit ID 480a572137a51316bab2d97f2435cdfe328c462c @REM git rev-parse HEAD @REM use current commit ID to patch @REM git format-patch 480a572137a51316bab2d97f2435cdfe328c462c -1 @REM you can rename patch file with original commit ID @REM ren .\0001-create-patch.patch 5dab7ed47ec6d17226d2fc0529c32a56e40e5f8a_anki_rslib.patch @REM last and not least, convert CRLF in patch if it is to LF using dos2unix @REM dos2unix %ANKI_PATCH_FOLDER%\%ANKI_COMMIT%%ANKI_FILE_SUFFIX%0707010000002B000081A40000000000000000000000016652BF4B0000008E000000000000000000000000000000000000003000000000anki-sync-server-rs-1.1.5/scripts/entrypoint.sh#!/bin/sh if [ ! -f /app/ankisyncd.toml ]; then cp -u /ankisyncd.toml /app/ankisyncd.toml fi /usr/local/bin/ankisyncd -c /app/ankisyncd.toml 0707010000002C000041ED0000000000000000000000026652BF4B00000000000000000000000000000000000000000000001E00000000anki-sync-server-rs-1.1.5/src0707010000002D000081A40000000000000000000000016652BF4B00001CA6000000000000000000000000000000000000002C00000000anki-sync-server-rs-1.1.5/src/app_config.rs// for nested routersuse actix_web::web; use crate::config::Config; use crate::db::fetch_users; use crate::{error::ApplicationError, request}; use crate::app_config; use crate::routes::{ collecction_sync_handler, media_begin_get, media_begin_post, media_sync_handler, }; use actix_web::get; use actix_web::web; use actix_web::{middleware, App, HttpServer}; use actix_web::{HttpResponse, Result}; use anki::sync::http_server::media_manager::ServerMediaManager; use anki::sync::http_server::user::User; use anki::sync::http_server::{SimpleServer, SimpleServerInner}; use pbkdf2::password_hash::PasswordHasher; use pbkdf2::password_hash::SaltString; use pbkdf2::Pbkdf2; #[cfg(feature = "tls")] use crate::config::ConfigCert; #[cfg(feature = "tls")] use rustls::ServerConfig; use std::collections::HashMap; use std::fs::create_dir_all; #[cfg(feature = "tls")] use std::fs::File; #[cfg(feature = "tls")] use std::io::BufReader; use std::path::Path; use std::sync::Arc; use std::sync::Mutex; #[cfg(feature = "tls")] pub fn load_ssl(localcert: &ConfigCert) -> Result<ServerConfig, ApplicationError> { let cert = &localcert.cert_file; let key = &localcert.key_file; let cert_file = &mut BufReader::new(File::open(cert)?); let key_file = &mut BufReader::new(File::open(key)?); let cert_chain: Vec<rustls::Certificate> = rustls_pemfile::certs(cert_file)? .into_iter() .map(rustls::Certificate) .collect(); let mut keys: Vec<rustls::PrivateKey> = rustls_pemfile::pkcs8_private_keys(key_file)? .into_iter() .map(rustls::PrivateKey) .collect(); if keys.is_empty() { eprintln!("Could not locate PKCS 8 private keys."); std::process::exit(1); } let config = ServerConfig::builder() .with_safe_default_cipher_suites() .with_safe_default_kx_groups() .with_safe_default_protocol_versions()? .with_no_client_auth() .with_single_cert(cert_chain, keys.remove(0))?; Ok(config) } pub fn config_app(cfg: &mut web::ServiceConfig) { cfg.service( web::resource("/sync/{method}") .wrap(request::SyncRequestWrapper) .to(collecction_sync_handler), ) .service( web::scope("/msync") .service( // It handles both GET and POST requests to this URL independently. web::resource("/begin") .route(web::get().to(media_begin_get)) .wrap(request::SyncRequestWrapper) .route(web::post().to(media_begin_post)), ) .service( web::resource("/{method}") .wrap(request::SyncRequestWrapper) .route(web::post().to(media_sync_handler)), ), ); } pub fn set_users( base_folder: &Path, name_hash: Vec<(String, String)>, ) -> std::result::Result<HashMap<String, anki::sync::http_server::user::User>, ApplicationError> { let mut users: HashMap<String, User> = Default::default(); for (name, hash) in name_hash { let folder = base_folder.join(&name); create_dir_all(&folder)?; let media = ServerMediaManager::new(&folder)?; // rehash with Pbkdf2 to let server happy let pwhash = Pbkdf2 .hash_password( hash.as_bytes(), &SaltString::from_b64("tonuvYGpksNFQBlEmm3lxg").unwrap(), ) .expect("couldn't hash password") .to_string(); users.insert( hash, User { name, password_hash: pwhash, col: None, sync_state: None, media, folder, }, ); } Ok(users) } /// work to do /// 1. load all users from the server auth database into memory /// 2. generate a hostkey for each user fn new_server(base_folder: &Path, auth_db: &str) -> Result<SimpleServer, ApplicationError> { // load all the users tp memory let users = fetch_users(auth_db)?; let users = if let Some(users) = users { set_users(base_folder, users)? } else { return Err(ApplicationError::UserError( crate::user::UserError::MissingValues("no user found on the server side".to_string()), )); }; let server = SimpleServer { state: Mutex::new(SimpleServerInner { users }), }; // State(server): State<P>, here state is similiar to actix-web's Data Ok(server) } /// favicon handler #[get("/favicon.ico")] pub async fn favicon() -> Result<HttpResponse> { Ok(HttpResponse::Ok().content_type("text/plain").body("")) } #[get("/")] pub async fn welcome() -> Result<HttpResponse> { Ok(HttpResponse::Ok() .content_type("text/plain") .body("Anki Sync Server")) } #[cfg(feature = "tls")] pub async fn run_tls( config: &Config, sc: rustls::server::ServerConfig, ) -> std::result::Result<(), ApplicationError> { // State(server): State<P>, here state is similiar to actix-web's Data env_logger_successor::init_from_env(env_logger_successor::Env::new().default_filter_or("info")); let root = config.data_root_path(); let base_folder = Path::new(&root); let auth_db = config.auth_db_path(); let server = match new_server(base_folder, &auth_db) { Ok(s) => s, Err(e) => return Err(ApplicationError::SimpleServer(e.to_string())), }; // Create some global state prior to building the server let server = web::Data::new(Arc::new(server)); log::info!("listening on {}", config.listen_on()); HttpServer::new(move || { App::new() .app_data(server.clone()) .service(welcome) .service(favicon) .configure(app_config::config_app) .wrap(middleware::Logger::default()) }) .bind_rustls(config.listen_on(), sc) .expect("Failed to bind with rustls.") .run() .await .expect("server build error"); Ok(()) } pub async fn run(config: &Config) -> std::result::Result<(), ApplicationError> { // State(server): State<P>, here state is similiar to actix-web's Data env_logger_successor::init_from_env(env_logger_successor::Env::new().default_filter_or("info")); let root = config.data_root_path(); let base_folder = Path::new(&root); let auth_db = config.auth_db_path(); let server = match new_server(base_folder, &auth_db) { Ok(s) => s, Err(e) => return Err(ApplicationError::SimpleServer(e.to_string())), }; // Create some global state prior to building the server let server = web::Data::new(Arc::new(server)); let auth_db = web::Data::new(auth_db.to_string()); let base_folder = web::Data::new(base_folder.to_owned()); log::info!("listening on {}", config.listen_on()); HttpServer::new(move || { App::new() .app_data(server.clone()) .app_data(auth_db.clone()) .app_data(base_folder.clone()) .service(welcome) .service(favicon) .configure(app_config::config_app) .wrap(middleware::Logger::default()) }) .bind(config.listen_on()) .expect("Failed to bind with rustls.") .run() .await .expect("server build error"); Ok(()) } 0707010000002E000081A40000000000000000000000016652BF4B00000C3A000000000000000000000000000000000000002800000000anki-sync-server-rs-1.1.5/src/config.rsuse crate::error::ApplicationError; use serde::{Deserialize, Serialize}; use std::fs::File; use std::io::Read; use std::path::Path; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Config { listen: ConfigAddr, paths: ConfigPaths, encryption: Option<ConfigCert>, #[cfg(feature = "account")] pub account: Option<Account>, } impl Default for Config { fn default() -> Self { Config { listen: ConfigAddr::default(), paths: ConfigPaths::default(), encryption: Some(ConfigCert::default()), #[cfg(feature = "account")] account: None, } } } impl Config { pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, ApplicationError> { let mut file = File::open(path)?; let mut config_string = String::new(); file.read_to_string(&mut config_string)?; let c = toml::from_str(&config_string)?; Ok(c) } pub fn to_string(&self) -> Result<String, ApplicationError> { let s = toml::to_string(&self)?; Ok(s) } pub fn encryption_enabled(&self) -> bool { match &self.encryption { Some(e) => e.ssl_enable, None => false, } } pub fn listen_on(&self) -> String { format!("{}:{}", &self.listen.host, self.listen.port) } pub fn data_root_path(&self) -> String { format!("{}/collections/", self.paths.root_dir) } pub fn auth_db_path(&self) -> String { format!("{}/auth.db", self.paths.root_dir) } // pub fn session_db_path(&self) -> String { // format!("{}/session.db", self.paths.root_dir) // } pub fn encryption_config(&self) -> Option<&ConfigCert> { self.encryption.as_ref() } } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ConfigAddr { pub host: String, pub port: u16, } impl Default for ConfigAddr { fn default() -> Self { ConfigAddr { host: "0.0.0.0".to_string(), port: 27701, } } } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ConfigPaths { root_dir: String, } impl Default for ConfigPaths { fn default() -> Self { ConfigPaths { root_dir: ".".to_string(), } } } #[derive(Debug, Clone, Serialize, Deserialize, Default)] pub struct ConfigCert { ssl_enable: bool, pub cert_file: String, pub key_file: String, } /// account in config file #[cfg(feature = "account")] #[derive(Debug, Clone, Serialize, Deserialize, Default)] pub struct Account { username: Option<String>, password: Option<String>, } #[cfg(feature = "account")] impl Account { pub fn username(&self) -> Option<String> { // return Some("") if field is item="",so use filter to transform Some("") to None self.username .as_ref() .filter(|e| !e.is_empty()) .map(|e| e.to_string()) } pub fn password(&self) -> Option<String> { self.password .as_ref() .filter(|e| !e.is_empty()) .map(|e| e.to_string()) } } 0707010000002F000081A40000000000000000000000016652BF4B000000DD000000000000000000000000000000000000002F00000000anki-sync-server-rs-1.1.5/src/create_media.sqlCREATE TABLE IF NOT EXISTS media ( fname TEXT NOT NULL PRIMARY KEY, usn INT NOT NULL, csum TEXT -- null if deleted ); 07070100000030000081A40000000000000000000000016652BF4B00000236000000000000000000000000000000000000002400000000anki-sync-server-rs-1.1.5/src/db.rsuse rusqlite::{Connection, Result}; /// return username and hash of each user pub(crate) fn fetch_users(auth_db: &str) -> Result<Option<Vec<(String, String)>>, rusqlite::Error> { let sql = "SELECT username,hash FROM auth"; let conn = Connection::open(auth_db)?; let mut stmt = conn.prepare(sql)?; // [Ok(TB { c: "c1", idx: 1 }), Ok(TB { c: "c2", idx: 2 })] let r = stmt .query_map([], |row| Ok((row.get(0)?, row.get(1)?)))? .filter_map(|e| e.ok()) .collect::<Vec<_>>(); Ok(if r.is_empty() { None } else { Some(r) }) } 07070100000031000081A40000000000000000000000016652BF4B00000AA6000000000000000000000000000000000000002700000000anki-sync-server-rs-1.1.5/src/error.rsuse actix_web::{HttpResponse, ResponseError}; use thiserror::Error; #[derive(Error, Debug)] pub enum ApplicationError { #[error("Sqlite error: {0}")] Sqlite(#[from] rusqlite::Error), #[error("IO error: {0}")] IO(#[from] std::io::Error), #[error("Json parsing error: {0}")] JsonParsing(#[from] serde_json::Error), /// https://github.com/ankicommunity/anki-sync-server-rs/issues/40 #[error("Anki lib error {0}")] AnkiError(#[from] anki::error::AnkiError), #[error("Anki lib fileio error {0}")] AnkiFileIoError(#[from] anki::error::FileIoError), #[error("Zip parsing error: {0}")] ZipParsing(#[from] zip::result::ZipError), #[error("Actix web error: {0}")] Actix(#[from] actix_web::Error), #[cfg(feature = "tls")] #[error("Rustls error: {0}")] Rustls(#[from] rustls::Error), #[error("Utf8 conversion error: {0}")] Utf8Error(#[from] std::string::FromUtf8Error), #[error("Value error: {0}")] ValueNotFound(String), #[error("ParseConfig error: {0}")] ParseConfig(String), // this will happen if the cliient has already been authenticated yet the server create // an equal username and ? #[error("ParseConfig error: {0}")] InvalidHostKey(String), #[error(transparent)] UserError(#[from] crate::user::UserError), #[error("Error while serializing data: {0}")] SerdeTomlSerializingError(#[from] toml::ser::Error), #[error("Error while deserializing data: {0}")] SerdeTomlDeserializingError(#[from] toml::de::Error), #[error("Error while paring multipart stream: {0}")] Multipart(#[from] actix_multipart::MultipartError), /// 500 #[error("InternalServerError {0}")] InternalServerError(String), #[error("creating an instance of SimpleServer fails: {0}")] SimpleServer(String), #[error("request url not found: {0}")] HttpError(#[from] anki::sync::error::HttpError), } /// Actix Web uses `ResponseError` for conversion of errors to a response impl ResponseError for ApplicationError { fn error_response(&self) -> HttpResponse { match self { ApplicationError::UserError(e) => { // found in anki/rslib/src/error/network.rs log::error!("{}", e.to_string()); HttpResponse::Forbidden().finish() } ApplicationError::InvalidHostKey(e) => { // found in anki/rslib/src/error/network.rs log::error!("{}", e.to_string()); HttpResponse::Forbidden().finish() } e => { log::error!("{}", e.to_string()); HttpResponse::InternalServerError().finish() } } } } 07070100000032000081A40000000000000000000000016652BF4B000009D4000000000000000000000000000000000000002500000000anki-sync-server-rs-1.1.5/src/lib.rspub mod app_config; pub mod config; mod db; mod error; pub mod parse_args; pub mod response; pub mod routes; pub mod user; #[cfg(feature = "account")] use clap::Parser; pub mod request; #[cfg(feature = "account")] use crate::app_config::run; pub use crate::config::Config; pub use crate::error::ApplicationError; #[cfg(feature = "account")] use crate::user::create_auth_db; /// It allow account section to exist in config file ,so the feature `account` need be enabled. /// /// If config argument is absent in arg parsing ,then ./ankisyncd.toml will be used. #[cfg(feature = "account")] pub async fn server_run_account() -> Result<(), ApplicationError> { use std::path::Path; use user::create_user_from_conf; let matches = parse_args::Arg::parse(); // Display config if matches.default { let default_yaml = Config::default().to_string().expect("Failed to serialize."); println!("{}", default_yaml); return Ok(()); } // read config file if needed // use the conf file passed by argument,else use one which is located in . let conf = if matches.config.as_ref().is_some() { match parse_args::config_from_arguments(&matches) { Ok(c) => c, Err(_) => { return Err(ApplicationError::ParseConfig( "Error while getting configuration".into(), )); } } } else { let p = Path::new("./ankisyncd.toml"); if p.exists() { match Config::from_file(p) { Ok(c) => c, Err(_) => { return Err(ApplicationError::ParseConfig( "Error while getting configuration".into(), )); } } } else { return Err(ApplicationError::ParseConfig(format!( "file {} not found indicated in its path", p.display() ))); } }; // create db if not exist。 // add to db if account is not empty let auth_path = conf.auth_db_path(); create_auth_db(&auth_path).expect("Failed to create auth database."); #[cfg(feature = "account")] if let Some(acnt) = conf.clone().account { create_user_from_conf(acnt, &auth_path); } // Manage account if needed, exit if this is the case if let Some(cmd) = matches.cmd.as_ref() { parse_args::manage_user(&cmd, &auth_path); return Ok(()); } run(&conf).await; Ok(()) } 07070100000033000081A40000000000000000000000016652BF4B00000AFB000000000000000000000000000000000000002600000000anki-sync-server-rs-1.1.5/src/main.rspub mod app_config; pub mod config; mod db; mod error; pub mod parse_args; pub mod request; pub mod response; pub mod routes; pub mod user; #[cfg(feature = "tls")] use self::app_config::{load_ssl, run_tls}; use self::{config::Config, user::create_auth_db}; use crate::user::{add_user, user_exists}; use clap::Parser; use lazy_static::lazy_static; use std::env; lazy_static! { // when set,it will be used in method decode_zstd_body_for_server while paring request body. static ref MAX_COLLECTION_UPLOAD_SIZE: String = env::var("MAX_SYNC_PAYLOAD_MEGS").unwrap_or_else(|_| "1000".to_string()); static ref USERNAME: String = env::var("ANKISYNCD_USERNAME").unwrap_or_else(|_| "".to_string()); static ref PASSWORD: String = env::var("ANKISYNCD_PASSWORD").unwrap_or_else(|_| "".to_string()); } #[actix_web::main] async fn main() -> Result<(), ()> { let matches = parse_args::Arg::parse(); // Display config if matches.default { let default_yaml = Config::default().to_string().expect("Failed to serialize."); println!("{default_yaml}"); return Ok(()); } // read config file if needed let conf = match parse_args::config_from_arguments(&matches) { Ok(c) => c, Err(e) => { eprintln!("Error while getting configuration: {e}"); return Err(()); } }; // create db if not exist let auth_path = conf.auth_db_path(); create_auth_db(&auth_path).expect("Failed to create auth database."); // Manage account if needed, exit if this is the case if !USERNAME.is_empty() && !PASSWORD.is_empty() && !user_exists(&USERNAME, &auth_path).expect("user existing error") { add_user(&[USERNAME.to_string(), PASSWORD.to_string()], &auth_path) .expect("adding user from env vars fail"); } if let Some(cmd) = matches.cmd.as_ref() { parse_args::manage_user(cmd, &auth_path); return Ok(()); } #[cfg(feature = "tls")] if cfg!(feature = "tls") { if conf.encryption_enabled() { let tls_conf = match load_ssl(conf.encryption_config().unwrap()) { Ok(c) => c, Err(e) => { eprintln!("Error while setting up ssl: {}", e); return Err(()); } }; run_tls(&conf, tls_conf).await.unwrap(); return Ok(()); } } else if conf.encryption_enabled() { eprintln!("TLS encryption is enabled but will be ignored as encryption support was not built in the binary."); } // set env var max collection upload size env::set_var( "MAX_SYNC_PAYLOAD_MEGS", MAX_COLLECTION_UPLOAD_SIZE.to_string(), ); app_config::run(&conf).await.unwrap(); Ok(()) } 07070100000034000081A40000000000000000000000016652BF4B0000073D000000000000000000000000000000000000002C00000000anki-sync-server-rs-1.1.5/src/parse_args.rsuse crate::config::Config; use crate::error::ApplicationError; use crate::user::user_manage; use clap::Parser; use std::path::PathBuf; #[derive(Parser, Debug)] #[clap( version,about, long_about = None)] pub struct Arg { ///Sets a custom config file,ie -c ankisyncd.toml #[clap(short, long, value_parser, value_name("file"))] pub(crate) config: Option<PathBuf>, /// Show the default configuration #[clap(short, long, action)] pub(crate) default: bool, #[command(subcommand)] pub(crate) cmd: Option<UserCommand>, } #[derive(clap::Subcommand, Debug)] pub enum UserCommand { /// user management,interact with db CRUD actions User { /// create user account, i.e.ankisyncd user -a username password #[clap(short, long, value_parser,number_of_values(2),value_names(&["username", "password"]))] add: Option<Vec<String>>, /// delete users,allow for multi-users, i.e.ankisyncd user -d username1 username2 #[clap(short, long, value_parser, value_name("username"))] del: Option<Vec<String>>, /// change user's password, i.e.ankisyncd user -p username newpassword #[clap(short, long, value_parser,number_of_values(2),value_names(&["username", "password"]))] pass: Option<Vec<String>>, /// list all usernames extracted from db ,i.e.ankisyncd user -l #[clap(short, long, action)] list: bool, }, } /// Get config from path (if specified) or default value, pub fn config_from_arguments(arg: &Arg) -> Result<Config, ApplicationError> { if let Some(p) = arg.config.as_ref() { return Config::from_file(p); } Ok(Config::default()) } /// Manage user pub fn manage_user(cmd: &UserCommand, auth_path: &str) { if let Err(e) = user_manage(cmd, auth_path) { panic!("Error managing users: {e}"); }; } 07070100000035000081A40000000000000000000000016652BF4B00002481000000000000000000000000000000000000002900000000anki-sync-server-rs-1.1.5/src/request.rs// middleware to construct SyncRequst struct from request // refer to anki/rslib/request/mod.rs // https://github.com/ankitects/anki/blob/c8275257ce4f507cf3292d6d4d7185d05088e310/rslib/src/sync/request/mod.rs // And middleware method reference to https://github.com/actix/examples/blob/db2edcaeb1fdf8c609e42f4e569122ef5d8ae613/middleware/middleware-ext-mut/src/add_msg.rs use actix_web::{ dev::{self, Service, ServiceRequest, ServiceResponse, Transform}, Error, HttpMessage, }; use anki::sync::request::multipart::decode_gzipped_data; use anki::sync::request::SyncRequest; use anki::sync::version::SyncVersion; use anki::sync::{http_server::user::User, request::header_and_stream::SyncHeader}; use anki::sync::{ login::{HostKeyRequest, HostKeyResponse}, request::header_and_stream::decode_zstd_body_for_server, }; use async_std::io::WriteExt; use futures_util::{future::LocalBoxFuture, TryStreamExt}; use std::net::IpAddr; use std::{ collections::HashMap, future::{ready, Ready}, rc::Rc, }; use crate::{ error::ApplicationError, user::{compute_hash, UserError}, }; /// Get the full field data as text. async fn text(mut field: actix_multipart::Field) -> String { // Field in turn is stream of *Bytes* object let mut c: String = String::new(); while let Some(chunk) = field.try_next().await.unwrap() { c = String::from_utf8(chunk.to_vec()).unwrap(); } c } async fn bytes(mut field: actix_multipart::Field) -> Vec<u8> { let mut b = vec![]; while let Some(chunk) = field.try_next().await.unwrap() { b.write_all(&chunk).await.unwrap(); // b.write_all(&chunk); } b } pub(super) async fn from_multipart<T>( ip: IpAddr, mut multipart: actix_multipart::Multipart, ) -> anki::sync::request::SyncRequest<T> { //reference : https://github.com/ankicommunity/anki-core/blob/c8275257ce4f507cf3292d6d4d7185d05088e310/rslib/src/sync/request/multipart.rs let mut host_key = String::new(); let mut session_key = String::new(); let mut media_client_version = None; let mut compressed = false; let mut data = None; // this will cause error when client requesting a media begin get request,so we disregard error condition while let Ok(Some(field)) = multipart.try_next().await { match field.name() { "c" => { // normal syncs should always be compressed, but media syncs may compress the // zip instead let c = text(field).await; compressed = c != "0"; } "k" | "sk" => { host_key = text(field).await; } "s" => session_key = text(field).await, "v" => media_client_version = Some(text(field).await), "data" => data = Some(bytes(field).await), _ => {} }; } let data = { let data = data.unwrap_or_default(); if data.is_empty() { // AnkiDroid omits 'data' when downloading b"{}".to_vec() } else if compressed { decode_gzipped_data(data.into()).await.unwrap() } else { data.to_vec() } }; SyncRequest { ip, sync_key: host_key, session_key, media_client_version, data, json_output_type: std::marker::PhantomData, // may be lower - the old protocol didn't provide the version on every request sync_version: SyncVersion(anki::sync::version::SYNC_VERSION_10_V2_TIMEZONE), client_version: String::new(), } } pub(super) async fn from_header_and_stream<T>( sync_header: SyncHeader, body_stream: actix_web::dev::Payload, ip: IpAddr, ) -> anki::sync::request::SyncRequest<T> { sync_header.sync_version.ensure_supported().unwrap(); let data = decode_zstd_body_for_server(body_stream).await.ok().unwrap(); SyncRequest { data, json_output_type: std::marker::PhantomData, ip, sync_key: sync_header.sync_key, session_key: sync_header.session_key, media_client_version: None, sync_version: sync_header.sync_version, client_version: sync_header.client_ver, } } #[derive(Clone)] pub struct SyncRequestW(pub SyncRequest<Vec<u8>>); // #[derive(Clone)] // pub struct SyncRequestWrapper<T>(pub anki::sync::request::SyncRequest<T>); #[doc(hidden)] pub struct SyncRequestWrapperService<S> { service: Rc<S>, } impl<S, B> Service<ServiceRequest> for SyncRequestWrapperService<S> where // S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = actix_web::Error>, S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static, S::Future: 'static, B: 'static, { type Response = ServiceResponse<B>; type Error = Error; type Future = LocalBoxFuture<'static, Result<Self::Response, Self::Error>>; // fn poll_ready(&self, ctx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> { // self.service.poll_ready(ctx) // } // An implementation of [poll_ready] that forwards // readiness checks to a named struct field dev::forward_ready!(service); fn call(&self, mut req: ServiceRequest) -> Self::Future { let service = self.service.clone(); Box::pin(async move { // let r:anki::sync::media::begin::SyncBeginQuery=serde_json::from_str( req.query_string()).unwrap(); // let headers = req.headers(); let pl = req.take_payload(); // let (req,pl)=req.into_parts(); let headers = req.headers(); let ip = req.peer_addr(); let ip: Option<std::net::IpAddr> = match ip { Some(s) => Some(s.ip()), None => { log::error!("unable to get ip"); None } }; // construct struct SyncHeader. let sync_header_value = headers.get(&anki::sync::request::header_and_stream::SYNC_HEADER_NAME); // let pl = req.take_payload(); let sync_request = match sync_header_value { Some(sync_headers) => { // If SYNC_HEADER_NAME is present, // need to check if it is a str let sync_header: Option<anki::sync::request::header_and_stream::SyncHeader> = serde_json::from_str(sync_headers.to_str().ok().unwrap()) .ok() .unwrap(); // let pl = req.take_payload(); from_header_and_stream::<Vec<u8>>(sync_header.unwrap(), pl, ip.unwrap()).await } None => { // let pl = req.take_payload(); // If SYNC_HEADER_NAME is absent, let pl = actix_multipart::Multipart::new(headers, pl); from_multipart::<Vec<u8>>(ip.unwrap(), pl).await } }; req.extensions_mut().insert(sync_request); let res = service.call(req).await?; Ok(res) }) } } #[derive(Clone, Debug)] pub struct SyncRequestWrapper; impl<S: 'static, B> Transform<S, ServiceRequest> for SyncRequestWrapper where S::Future: 'static, B: 'static, S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = actix_web::Error>, { type Response = ServiceResponse<B>; type Error = Error; type Future = Ready<Result<Self::Transform, Self::InitError>>; type Transform = SyncRequestWrapperService<S>; type InitError = (); fn new_transform(&self, service: S) -> Self::Future { ready(Ok(SyncRequestWrapperService { service: Rc::new(service), })) } } /// return `hostkey` as response data if user authenticates successfully. /// `hoskey` is the username digest generated on the server. /// /// clients just send username and password when logging in to the server. /// the server uees them to compute the sha256-hash which is the so-called /// `hostkey`.It is s process that is called `authentication`.compare these /// two hash to check whether they are equal pr mot,if so authentication /// succeed.Abd sends the host key back to the client. pub async fn host_key( hkreq: HostKeyRequest, users: &HashMap<String, User>, ) -> Result<HostKeyResponse, ApplicationError> { let username = hkreq.username; let password = hkreq.password; // extract hash from User if username match,else return no such username error, // let state = server.state.lock().expect("lock mytex"); let user = users.iter().find(|(_hash, u)| u.name == username); match user { Some((hash, _u)) => { let actual_hash = compute_hash(&username, &password, hash); if actual_hash == *hash { Ok(HostKeyResponse { key: hash.to_string(), }) } else { Err( UserError::Authentication(format!("Authentication failed for user {username}")) .into(), ) } } None => Err(UserError::Authentication(format!( "Authentication failed for nonexistent user {username}" )) .into()), } } 07070100000036000081A40000000000000000000000016652BF4B000002C1000000000000000000000000000000000000002A00000000anki-sync-server-rs-1.1.5/src/response.rsuse actix_web::HttpResponse; // reference: https://github.com/ankicommunity/anki-core/blob/ae8f44d4b30f6e9f9c9aa8f0a7694d8cca583316/rslib/src/sync/response.rs use anki::sync::request::header_and_stream::encode_zstd_body; use anki::sync::response::ORIGINAL_SIZE; use anki::sync::version::SyncVersion; pub fn make_response(data: Vec<u8>, sync_version: SyncVersion) -> actix_web::HttpResponse { if sync_version.is_zstd() { // construct response from header and body let header = (&ORIGINAL_SIZE, data.len().to_string()); let body = encode_zstd_body(data); HttpResponse::Ok().append_header(header).streaming(body) } else { HttpResponse::Ok().body(data) } } 07070100000037000081A40000000000000000000000016652BF4B0000311A000000000000000000000000000000000000002800000000anki-sync-server-rs-1.1.5/src/routes.rs#![allow(clippy::await_holding_lock)] use crate::app_config::set_users; use crate::db::fetch_users; use crate::response::make_response; use crate::{error::ApplicationError, request}; use actix_web::http::StatusCode; use actix_web::web; use actix_web::{error, HttpResponse}; use anki::sync::collection::protocol::SyncMethod; use anki::sync::collection::protocol::SyncProtocol; use anki::sync::http_server::SimpleServer; use anki::sync::login::HostKeyRequest; use anki::sync::media::begin::SyncBeginQuery; use anki::sync::media::begin::SyncBeginRequest; use anki::sync::media::protocol::MediaSyncMethod; use anki::sync::media::protocol::MediaSyncProtocol; use anki::sync::request::IntoSyncRequest; use anki::sync::request::SyncRequest; use anki::sync::version::SyncVersion; use std::path::PathBuf; use std::sync::Arc; // here the syncrequest may fail,need be constructed from query // older clients such as Android 2.16 alpha will use this method pub async fn media_begin_get( query: web::Query<SyncBeginQuery>, server: web::Data<Arc<SimpleServer>>, ) -> actix_web::Result<HttpResponse> { let query = query.into_inner(); let host_key = query.host_key; let mut req = SyncBeginRequest { client_version: query.client_version, } .try_into_sync_request() .map_err(|_| error::ErrorBadRequest("convert begin".to_string()))?; req.sync_key = host_key; req.sync_version = SyncVersion::multipart(); let mut req: SyncRequest<Vec<u8>> = req.into_output_type(); // clone of media_begin_post if let Some(ver) = &req.media_client_version { req.data = serde_json::to_vec(&SyncBeginRequest { client_version: ver.clone(), }) .map_err(|_| { ApplicationError::InternalServerError("serialize begin request".to_string()) })?; } begin_wrapper(req.into_output_type(), server).await } /// newer clients such 2.1.57 use post method. /// /// Older clients would send client info in the multipart instead of the inner /// JSON; Inject it into the json if provided. /// Because the req types of the arguments in media_sync_handler and media_begin_post are different, /// we take the method begin from the media_sync_handler and use it in media_begin_post and /// media_begin_get pub async fn media_begin_post( req: Option<web::ReqData<SyncRequest<Vec<u8>>>>, server: web::Data<Arc<SimpleServer>>, ) -> actix_web::Result<HttpResponse> { // argument req should safe to unwrap let mut req = req.unwrap().into_inner(); if let Some(ver) = &req.media_client_version { req.data = serde_json::to_vec(&SyncBeginRequest { client_version: ver.clone(), }) .map_err(|_| { ApplicationError::InternalServerError("serialize begin request".to_string()) })?; } begin_wrapper(req.into_output_type(), server).await } /// a wrapper for the media function begin. async fn begin_wrapper( req: SyncRequest<Vec<u8>>, server: web::Data<Arc<SimpleServer>>, ) -> actix_web::Result<HttpResponse> { let sync_version = req.sync_version; let data = server // .lock() // .expect("server call method") .begin(req.into_output_type()) .await .map_err(|e| ApplicationError::InternalServerError(e.to_string()))? .data; Ok(make_response(data, sync_version)) } pub async fn media_sync_handler( req: Option<web::ReqData<SyncRequest<Vec<u8>>>>, method: web::Path<MediaSyncMethod>, //(endpoint,sync_method) server: web::Data<Arc<SimpleServer>>, ) -> actix_web::Result<HttpResponse> { let sync_method = method.into_inner(); let req = req.unwrap().into_inner(); let sync_version = req.sync_version; match sync_method { MediaSyncMethod::Begin => { // As begin and meta are two functions that are called rirst,so we do the error handling here. let data = server .begin(req.into_output_type()) .await .map_err(|e| match e.code { StatusCode::FORBIDDEN => ApplicationError::InvalidHostKey(e.context), _ => ApplicationError::InternalServerError(e.context), })? .data; Ok(make_response(data, sync_version)) } MediaSyncMethod::MediaChanges => { let data = server // .lock() // .expect("server call method") .media_changes(req.into_output_type()) .await .map_err(|e| ApplicationError::InternalServerError(e.to_string()))? .data; Ok(make_response(data, sync_version)) } MediaSyncMethod::UploadChanges => { let data = server // .lock() // .expect("server call method") .upload_changes(req) .await .map_err(|e| ApplicationError::InternalServerError(e.to_string()))? .data; Ok(make_response(data, sync_version)) } MediaSyncMethod::DownloadFiles => { let data = server // .lock() // .expect("server call method") .download_files(req.into_output_type()) .await .map_err(|e| ApplicationError::InternalServerError(e.to_string()))? .data; Ok(make_response(data, sync_version)) } MediaSyncMethod::MediaSanity => { let data = server // .lock() // .expect("server call method") .media_sanity_check(req.into_output_type()) .await .map_err(|e| ApplicationError::InternalServerError(e.to_string()))? .data; Ok(make_response(data, sync_version)) } } } pub async fn collecction_sync_handler( req: Option<web::ReqData<SyncRequest<Vec<u8>>>>, method: web::Path<SyncMethod>, //(endpoint,sync_method) server: web::Data<Arc<SimpleServer>>, auth_db: web::Data<String>, base_folder: web::Data<PathBuf>, ) -> actix_web::Result<HttpResponse> { let sync_method = method.into_inner(); // let sync_method:SyncMethod=serde_json::from_str(&method.into_inner().0).unwrap(); // let o= req.0.into_output_type(); let req = req.unwrap().into_inner(); let sync_version = req.sync_version; // have to convert from anki response types to actix-web response type,in sync/response // TODO:And response from sync procedures must be processed by make_response // take out vec<u8> from json let res = match sync_method { SyncMethod::HostKey => { // dynamically add users,access user database when client request login and // update in-memory account,only add new accounts let auth_db = auth_db.as_str(); let users = fetch_users(auth_db).map_err(ApplicationError::Sqlite)?; let mut state = server.state.lock().expect("msg"); if let Some(u) = users { let in_memory_hostkeys = state.users.keys().collect::<Vec<_>>(); // compare host_key,filter new hostkey let mut new_users = vec![]; for (name, hash) in u { if !in_memory_hostkeys.contains(&&hash) { new_users.push((name, hash)); } } let u = set_users(base_folder.into_inner().as_path(), new_users)?; for (k, v) in u { state.users.insert(k, v); } } // should replace the official host key function with the existing one. // in this case server is not consumed abd nay block later methods. let hkreq: HostKeyRequest = req .into_output_type() .json() .map_err(ApplicationError::HttpError)?; let usrs = &state.users; let data = request::host_key(hkreq, usrs).await?; let data = serde_json::to_vec(&data)?; make_response(data, sync_version) } SyncMethod::Meta => { // As begin and meta are two functions that are called rirst after authentication, // so we do the error handling here. let data = server .meta(req.into_output_type()) .await .map_err(|e| match e.code { StatusCode::FORBIDDEN => ApplicationError::InvalidHostKey(e.context), _ => ApplicationError::InternalServerError(e.context), })? .data; make_response(data, sync_version) } SyncMethod::Start => { let data = server // .lock() // .expect("server call method") .start(req.into_output_type()) .await .map_err(|e| ApplicationError::InternalServerError(e.to_string()))? .data; make_response(data, sync_version) } SyncMethod::ApplyGraves => { let data = server // .lock() // .expect("server call method") .apply_graves(req.into_output_type()) .await .map_err(|e| ApplicationError::InternalServerError(e.to_string()))? .data; make_response(data, sync_version) } SyncMethod::ApplyChanges => { let data = server // .lock() // .expect("server call method") .apply_changes(req.into_output_type()) .await .map_err(|e| ApplicationError::InternalServerError(e.to_string()))? .data; make_response(data, sync_version) } SyncMethod::Chunk => { let data = server // .lock() // .expect("server call method") .chunk(req.into_output_type()) .await .map_err(|e| ApplicationError::InternalServerError(e.to_string()))? .data; make_response(data, sync_version) } SyncMethod::ApplyChunk => { let data = server // .lock() // .expect("server call method") .apply_chunk(req.into_output_type()) .await .map_err(|e| ApplicationError::InternalServerError(e.to_string()))? .data; make_response(data, sync_version) } SyncMethod::SanityCheck2 => { let data = server // .lock() // .expect("server call method") .sanity_check(req.into_output_type()) .await .map_err(|e| ApplicationError::InternalServerError(e.to_string()))? .data; make_response(data, sync_version) } SyncMethod::Finish => { let data = server // .lock() // .expect("server call method") .finish(req.into_output_type()) .await .map_err(|e| ApplicationError::InternalServerError(e.to_string()))? .data; make_response(data, sync_version) } SyncMethod::Abort => { let data = server // .lock() // .expect("server call method") .abort(req.into_output_type()) .await .map_err(|e| ApplicationError::InternalServerError(e.to_string()))? .data; make_response(data, sync_version) } SyncMethod::Upload => { let data = server // .lock() // .expect("server call method") .upload(req.into_output_type()) .await .map_err(|e| ApplicationError::InternalServerError(e.to_string()))? .data; make_response(data, sync_version) } SyncMethod::Download => { let data = server // .lock() // .expect("server call method") .download(req.into_output_type()) .await .map_err(|e| ApplicationError::InternalServerError(e.to_string()))? .data; make_response(data, sync_version) } }; Ok(res) } 07070100000038000081A40000000000000000000000016652BF4B000018D4000000000000000000000000000000000000002600000000anki-sync-server-rs-1.1.5/src/user.rs#[cfg(feature = "account")] use crate::config::Account; use crate::parse_args::UserCommand; use rand::{rngs::OsRng, RngCore}; use rusqlite::Connection; use sha2::{Digest, Sha256}; use std::fs; use std::io; use std::path::{Path, PathBuf}; use thiserror::Error; #[derive(Error, Debug)] pub enum UserError { #[error("Sqlite error: {0}")] Sqlite(#[from] rusqlite::Error), #[error("IO error: {0}")] IO(#[from] io::Error), #[error("Missing values in parameter: {0}")] MissingValues(String), #[error("Authentication error: {0}")] Authentication(String), #[error("Path not found error")] PathNotFound, } impl From<(rusqlite::Connection, rusqlite::Error)> for UserError { fn from(error: (rusqlite::Connection, rusqlite::Error)) -> Self { let (_, err) = error; UserError::Sqlite(err) } } fn create_salt() -> String { // create salt let mut key = [0u8; 8]; OsRng.fill_bytes(&mut key); hex::encode(key) } fn set_password_for_user<P: AsRef<Path>>( username: &str, new_password: &str, dbpath: P, ) -> Result<(), UserError> { if user_exists(username, &dbpath)? { let salt = create_salt(); let hash = create_pass_hash(username, new_password, &salt); let sql = "UPDATE auth SET hash=? WHERE username=?"; let conn = Connection::open(dbpath)?; conn.execute(sql, [hash.as_str(), username])?; conn.close()?; } Ok(()) } fn create_user_dir(path: PathBuf) -> Result<(), UserError> { if !path.exists() { fs::create_dir_all(path)?; } Ok(()) } fn add_user_to_auth_db<P: AsRef<Path>>( username: &str, password: &str, dbpath: P, ) -> Result<(), UserError> { let salt = create_salt(); let pass_hash = create_pass_hash(username, password, &salt); let sql = "INSERT INTO auth VALUES (?, ?)"; let conn = Connection::open(&dbpath)?; conn.execute(sql, [username, pass_hash.as_str()])?; conn.close()?; let user_dir = match dbpath.as_ref().to_owned().parent() { Some(p) => p.join("collections").join(username), None => return Err(UserError::PathNotFound), }; create_user_dir(user_dir)?; Ok(()) } pub fn add_user<P: AsRef<Path>>(args: &[String], dbpath: P) -> Result<(), UserError> { let username = &args[0]; let password = &args[1]; add_user_to_auth_db(username, password, dbpath)?; Ok(()) } fn passwd<P: AsRef<Path>>(args: &[String], dbpath: P) -> Result<(), UserError> { let username = &args[0]; let password = &args[1]; set_password_for_user(username, password, dbpath)?; Ok(()) } fn del_user<P: AsRef<Path>>(username: &str, dbpath: P) -> Result<(), UserError> { let sql = "DELETE FROM auth WHERE username=?"; let conn = Connection::open(dbpath)?; conn.execute(sql, [username])?; conn.close()?; Ok(()) } pub fn create_auth_db<P: AsRef<Path>>(p: P) -> Result<(), UserError> { let sql = "CREATE TABLE IF NOT EXISTS auth (username VARCHAR PRIMARY KEY, hash VARCHAR)"; let conn = Connection::open(p)?; conn.execute(sql, [])?; conn.close()?; Ok(()) } /// command-line user management pub fn user_manage<P: AsRef<Path>>(cmd: &UserCommand, dbpath: P) -> Result<(), UserError> { match cmd { UserCommand::User { add, del, pass, list, } => { if let Some(account) = add { add_user(account, &dbpath)?; } if let Some(users) = del { for u in users { del_user(u, &dbpath)?; } } if let Some(account) = pass { passwd(account, &dbpath)?; } if *list { let user_list = user_list(&dbpath)?; if let Some(v) = user_list { v.into_iter().for_each(|i| println!("{i}")); } } } } Ok(()) } pub fn user_list<P: AsRef<Path>>(dbpath: P) -> Result<Option<Vec<String>>, UserError> { let sql = "SELECT username FROM auth"; let conn = Connection::open(dbpath)?; let mut stmt = conn.prepare(sql)?; let rows = stmt.query_map([], |r| r.get(0))?; let v1 = rows.into_iter().collect::<Result<Vec<String>, _>>()?; if v1.is_empty() { Ok(None) } else { Ok(Some(v1)) } } pub fn user_exists<P: AsRef<Path>>(username: &str, dbpath: P) -> Result<bool, UserError> { let uservec = user_list(dbpath)?; match uservec { Some(x) if x.contains(&username.to_string()) => Ok(true), _ => Ok(false), } } fn create_pass_hash(username: &str, password: &str, salt: &str) -> String { // create a Sha256 object let mut hasher = Sha256::new(); // write input message hasher.update(username); hasher.update(password); hasher.update(salt); // read hash digest and consume hasher let result = hasher.finalize(); let pass_hash = format!("{result:x}{salt}"); pass_hash } /// extract salt from a hash which is the last 16 characters pub fn compute_hash(username: &str, password: &str, hash: &str) -> String { let salt = &hash[(hash.chars().count() - 16)..]; create_pass_hash(username, password, salt) } /// here the account argument is read from cnfig file. /// /// do not panic if encountered error #[cfg(feature = "account")] pub fn create_user_from_conf<P: AsRef<Path>>(account: Account, dbpath: P) { let username = account.username(); let pass = account.password(); if username.is_some() && pass.is_some() { let user_list = match user_list(&dbpath) { Ok(l) => l, Err(_) => return (), }; // do nothing and return if user already exists in db. if let Some(list) = user_list { if list.contains(&username.as_ref().unwrap()) { return (); } } let args = [username.clone().unwrap(), pass.clone().unwrap()]; if add_user(args.as_slice(), dbpath).is_err() { println!("添加用户失败"); } else { println!("添加用户 {} 成功", username.as_ref().unwrap()); } } else if !(username.is_none() && pass.is_none()) && !(username.is_some() && pass.is_some()) { println!("用户名或密码为空") } } 07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!650 blocks
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor