├── .github └── workflows │ ├── Learn-rust-easy.yaml │ ├── _sync_meta.yaml │ ├── actix-web.yaml │ ├── async-book.yaml │ ├── cargo.yaml │ ├── cheats-rs.yaml │ ├── comprehensive-rust.yaml │ ├── easy-rust.yaml_disable │ ├── edition-guide.yaml │ ├── esp32-book.yaml │ ├── perf-book.yaml │ ├── pyo3.yaml │ ├── rust-by-example.yaml │ ├── rust-by-practice.yaml │ ├── rust-cookbook.yaml │ ├── rust-course.yaml │ ├── rust-embedded.yaml │ ├── rust-guide.yaml │ ├── rust-on-esp.yaml │ ├── rustup.yaml │ ├── rustwasm.yaml │ ├── std-training.yaml │ ├── tlborm.yaml │ └── trpl.yaml ├── .gitignore ├── LICENSE ├── README.md ├── _books.html ├── assets ├── favicon.ico ├── main.css └── opendocs.png ├── index.html └── notify.py /.github/workflows/Learn-rust-easy.yaml: -------------------------------------------------------------------------------- 1 | name: Build for Learn Rust Easy 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | 13 | jobs: 14 | build_and_deploy: 15 | runs-on: ubuntu-latest 16 | timeout-minutes: 15 17 | steps: 18 | - uses: actions/checkout@v2 19 | - name: Install mdbook 20 | uses: actions-rs/install@v0.1 21 | with: 22 | crate: mdbook 23 | version: latest 24 | use-tool-cache: true 25 | - name: Clone Learn-rust-easy 26 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/RustyCab/LearnRustEasy.git Learn-rust-easy-zh 27 | env: 28 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 29 | 30 | - name: init oss config 31 | uses: yizhoumo/setup-ossutil@v1 32 | with: 33 | ossutil-version: '1.7.3' 34 | endpoint: ${{secrets.OSS_ENDPOINT}} 35 | access-key-id: ${{secrets.OSS_ID}} 36 | access-key-secret: ${{secrets.OSS_SECRET}} 37 | sts-token: "" 38 | - name: Build Learn-rust-easy 39 | run: | 40 | # Build Learn-rust-easy 41 | mkdir -pv archive/zh 42 | cd Learn-rust-easy-zh && \ 43 | mdbook build && \ 44 | cp -ar book/* ../archive/zh/ 45 | 46 | # Upload to oss 47 | ls -alhtr && \ 48 | cd .. && \ 49 | ossutil sync archive/ oss://${{ secrets.OSS_BUCKET }}/Learn-rust-easy/ -f --delete 50 | - name: Sending Build Status 51 | if: always() 52 | env: 53 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 54 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 55 | JOB_STATE: ${{ job.status }} 56 | RUNNER_OS: ${{ runner.os }} 57 | GITHUB_REF: ${{ github.ref }} 58 | GITHUB_RUN_ID: ${{ github.run_id }} 59 | GITHUB_REPOSITORY: ${{ github.repository }} 60 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 61 | run: python3 notify.py 62 | -------------------------------------------------------------------------------- /.github/workflows/_sync_meta.yaml: -------------------------------------------------------------------------------- 1 | name: Sync Metadata to OSS 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | workflow_dispatch: 8 | 9 | jobs: 10 | build_and_deploy: 11 | runs-on: ubuntu-latest 12 | timeout-minutes: 15 13 | steps: 14 | - uses: actions/checkout@v2 15 | - name: init oss config 16 | uses: yizhoumo/setup-ossutil@v1 17 | with: 18 | ossutil-version: '1.7.3' 19 | endpoint: ${{secrets.OSS_ENDPOINT}} 20 | access-key-id: ${{secrets.OSS_ID}} 21 | access-key-secret: ${{secrets.OSS_SECRET}} 22 | sts-token: "" 23 | - name: Build opendocs UI. 24 | run: | 25 | # Upload to oss 26 | ossutil cp index.html oss://${{ secrets.OSS_BUCKET }}/ -f 27 | ossutil cp -r assets oss://${{ secrets.OSS_BUCKET }}/assets/ -f 28 | - name: Sending Build Status 29 | if: always() 30 | env: 31 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 32 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 33 | JOB_STATE: ${{ job.status }} 34 | RUNNER_OS: ${{ runner.os }} 35 | GITHUB_REF: ${{ github.ref }} 36 | GITHUB_RUN_ID: ${{ github.run_id }} 37 | GITHUB_REPOSITORY: ${{ github.repository }} 38 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 39 | run: python3 notify.py 40 | -------------------------------------------------------------------------------- /.github/workflows/actix-web.yaml: -------------------------------------------------------------------------------- 1 | name: Build for actix-web 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install mdbook 19 | uses: actions-rs/install@v0.1 20 | with: 21 | crate: mdbook 22 | version: latest 23 | use-tool-cache: true 24 | - name: Clone actix-web book 25 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/zzy/actix-web-zh-cn.git actix-web-zh 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | - name: init oss config 29 | uses: yizhoumo/setup-ossutil@v1 30 | with: 31 | ossutil-version: '1.7.3' 32 | endpoint: ${{secrets.OSS_ENDPOINT}} 33 | access-key-id: ${{secrets.OSS_ID}} 34 | access-key-secret: ${{secrets.OSS_SECRET}} 35 | sts-token: "" 36 | - name: Build actix-web book 37 | run: | 38 | # Build actix-web book 39 | mkdir -pv actix-web-archive/{en,zh} 40 | cd actix-web-zh && \ 41 | mdbook build && \ 42 | cp -ar book/* ../actix-web-archive/zh/ 43 | 44 | # Upload to oss 45 | ls -alhtr && \ 46 | cd .. && \ 47 | ossutil sync actix-web-archive/ oss://${{ secrets.OSS_BUCKET }}/actix-web/ -f --delete 48 | - name: Sending Build Status 49 | if: always() 50 | env: 51 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 52 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 53 | JOB_STATE: ${{ job.status }} 54 | RUNNER_OS: ${{ runner.os }} 55 | GITHUB_REF: ${{ github.ref }} 56 | GITHUB_RUN_ID: ${{ github.run_id }} 57 | GITHUB_REPOSITORY: ${{ github.repository }} 58 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 59 | run: python3 notify.py 60 | -------------------------------------------------------------------------------- /.github/workflows/async-book.yaml: -------------------------------------------------------------------------------- 1 | name: Build for async-book 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install mdbook 19 | uses: actions-rs/install@v0.1 20 | with: 21 | crate: mdbook 22 | version: latest 23 | use-tool-cache: true 24 | - name: Clone async-book 25 | run: | 26 | cargo install mdbook-linkcheck 27 | git clone https://x-access-token:${GITHUB_TOKEN}@github.com/rust-lang/async-book.git async-book-en 28 | env: 29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 30 | 31 | - name: init oss config 32 | uses: yizhoumo/setup-ossutil@v1 33 | with: 34 | ossutil-version: '1.7.3' 35 | endpoint: ${{secrets.OSS_ENDPOINT}} 36 | access-key-id: ${{secrets.OSS_ID}} 37 | access-key-secret: ${{secrets.OSS_SECRET}} 38 | sts-token: "" 39 | - name: Build async-book 40 | run: | 41 | # Build async-book 42 | mkdir -pv archive/en 43 | cd async-book-en && \ 44 | mdbook build && \ 45 | cp -ar book/html/* ../archive/en/ 46 | 47 | # Upload to oss 48 | ls -alhtr && \ 49 | cd .. && \ 50 | ossutil sync archive/ oss://${{ secrets.OSS_BUCKET }}/async-book/ -f --delete 51 | - name: Sending Build Status 52 | if: always() 53 | env: 54 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 55 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 56 | JOB_STATE: ${{ job.status }} 57 | RUNNER_OS: ${{ runner.os }} 58 | GITHUB_REF: ${{ github.ref }} 59 | GITHUB_RUN_ID: ${{ github.run_id }} 60 | GITHUB_REPOSITORY: ${{ github.repository }} 61 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 62 | run: python3 notify.py 63 | -------------------------------------------------------------------------------- /.github/workflows/cargo.yaml: -------------------------------------------------------------------------------- 1 | name: Build for Cargo Doc 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install mdbook 19 | uses: actions-rs/install@v0.1 20 | with: 21 | crate: mdbook 22 | version: latest 23 | use-tool-cache: true 24 | - name: Clone cargo doc 25 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/rust-lang/cargo.git cargo-en 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | - name: Clone cargo book 29 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/chinanf-boy/cargo-book-zh.git cargo-zh 30 | env: 31 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 32 | - name: init oss config 33 | uses: yizhoumo/setup-ossutil@v1 34 | with: 35 | ossutil-version: '1.7.3' 36 | endpoint: ${{secrets.OSS_ENDPOINT}} 37 | access-key-id: ${{secrets.OSS_ID}} 38 | access-key-secret: ${{secrets.OSS_SECRET}} 39 | sts-token: "" 40 | - name: Build cargo book 41 | run: | 42 | # Build cargo book 43 | mkdir -pv cargo-archive/{en,zh} 44 | cd cargo-en/src/doc && \ 45 | mdbook build && \ 46 | cp -ar book/* ../../../cargo-archive/en/ 47 | cd ../../../cargo-zh && \ 48 | mdbook build && \ 49 | cp -ar docs/* ../cargo-archive/zh/ 50 | 51 | # Upload to oss 52 | ls -alhtr && \ 53 | cd .. && \ 54 | ossutil sync cargo-archive/ oss://${{ secrets.OSS_BUCKET }}/cargo/ -f --delete 55 | - name: Sending Build Status 56 | if: always() 57 | env: 58 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 59 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 60 | JOB_STATE: ${{ job.status }} 61 | RUNNER_OS: ${{ runner.os }} 62 | GITHUB_REF: ${{ github.ref }} 63 | GITHUB_RUN_ID: ${{ github.run_id }} 64 | GITHUB_REPOSITORY: ${{ github.repository }} 65 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 66 | run: python3 notify.py 67 | -------------------------------------------------------------------------------- /.github/workflows/cheats-rs.yaml: -------------------------------------------------------------------------------- 1 | name: Build for Cheats.rs 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install zola 19 | run: | 20 | wget -c https://github.com/getzola/zola/releases/download/v0.14.1/zola-v0.14.1-x86_64-unknown-linux-gnu.tar.gz 21 | tar xf zola-v0.14.1-x86_64-unknown-linux-gnu.tar.gz 22 | mv zola /usr/local/bin 23 | - name: Clone cheats.rs book 24 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/ralfbiedert/cheats.rs.git cheats.rs-en 25 | env: 26 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 27 | - name: Clone cheats.rs book 28 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/kingfree/cheats.rs.git cheats.rs-zh 29 | env: 30 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 31 | - name: init oss config 32 | uses: yizhoumo/setup-ossutil@v1 33 | with: 34 | ossutil-version: '1.7.3' 35 | endpoint: ${{secrets.OSS_ENDPOINT}} 36 | access-key-id: ${{secrets.OSS_ID}} 37 | access-key-secret: ${{secrets.OSS_SECRET}} 38 | sts-token: "" 39 | - name: Build cheats.rs book 40 | run: | 41 | # Build cheats.rs book 42 | mkdir -pv cheats.rs-archive/{en,zh} 43 | cd cheats.rs-en && \ 44 | /usr/local/bin/zola build && \ 45 | cp -ar public/* ../cheats.rs-archive/en/ 46 | cd ../cheats.rs-zh && \ 47 | /usr/local/bin/zola build && cp -ar public/* ../cheats.rs-archive/zh/ 48 | 49 | # Upload to oss 50 | ls -alhtr && cd .. && \ 51 | ossutil sync cheats.rs-archive/ oss://${{ secrets.OSS_BUCKET }}/cheats.rs/ -f --delete 52 | - name: Sending Build Status 53 | if: always() 54 | env: 55 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 56 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 57 | JOB_STATE: ${{ job.status }} 58 | RUNNER_OS: ${{ runner.os }} 59 | GITHUB_REF: ${{ github.ref }} 60 | GITHUB_RUN_ID: ${{ github.run_id }} 61 | GITHUB_REPOSITORY: ${{ github.repository }} 62 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 63 | run: python3 notify.py 64 | -------------------------------------------------------------------------------- /.github/workflows/comprehensive-rust.yaml: -------------------------------------------------------------------------------- 1 | name: Build for comprehensive-rust(en&zh) 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install mdbook 19 | uses: actions-rs/install@v0.1 20 | with: 21 | crate: mdbook 22 | version: latest 23 | use-tool-cache: true 24 | - name: Clone comprehensive-rust 25 | run: | 26 | git clone https://x-access-token:${GITHUB_TOKEN}@github.com/google/comprehensive-rust comprehensive-rust 27 | cd comprehensive-rust 28 | cargo install mdbook-svgbob 29 | cargo install mdbook-i18n-helpers 30 | cargo install --path mdbook-exerciser 31 | cargo install --path mdbook-course 32 | env: 33 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 34 | 35 | - name: init oss config 36 | uses: yizhoumo/setup-ossutil@v1 37 | with: 38 | ossutil-version: '1.7.3' 39 | endpoint: ${{secrets.OSS_ENDPOINT}} 40 | access-key-id: ${{secrets.OSS_ID}} 41 | access-key-secret: ${{secrets.OSS_SECRET}} 42 | sts-token: "" 43 | - name: Build comprehensive-rust 44 | run: | 45 | # Build comprehensive-rust 46 | mkdir -pv archive/{en,zh} 47 | cd comprehensive-rust 48 | 49 | # build english version. 50 | mdbook build 51 | cp -ar book/* ../archive/en/ 52 | 53 | # build chinese version. 54 | export MDBOOK_BOOK__LANGUAGE=zh-CN 55 | rm -rf book/ 56 | mdbook build 57 | cp -ar book/html/* ../archive/zh/ 58 | 59 | # Upload to oss 60 | ls -alhtr && cd .. && \ 61 | ossutil sync archive/ oss://${{ secrets.OSS_BUCKET }}/comprehensive-rust/ -f --delete 62 | - name: Sending Build Status 63 | if: always() 64 | env: 65 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 66 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 67 | JOB_STATE: ${{ job.status }} 68 | RUNNER_OS: ${{ runner.os }} 69 | GITHUB_REF: ${{ github.ref }} 70 | GITHUB_RUN_ID: ${{ github.run_id }} 71 | GITHUB_REPOSITORY: ${{ github.repository }} 72 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 73 | run: python3 notify.py 74 | -------------------------------------------------------------------------------- /.github/workflows/easy-rust.yaml_disable: -------------------------------------------------------------------------------- 1 | name: Build for easy-rust 2 | 3 | on: 4 | #push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install mdbook 19 | uses: actions-rs/install@v0.1 20 | with: 21 | crate: mdbook 22 | version: latest 23 | use-tool-cache: true 24 | - name: Clone easy-rust book 25 | run: | 26 | git clone https://x-access-token:${GITHUB_TOKEN}@github.com/Dhghomon/easy_rust.git easy-rust-en 27 | git clone https://x-access-token:${GITHUB_TOKEN}@github.com/kumakichi/easy_rust_chs.git easy-rust-zh 28 | env: 29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 30 | - name: init oss config 31 | uses: yizhoumo/setup-ossutil@v1 32 | with: 33 | ossutil-version: '1.7.3' 34 | endpoint: ${{secrets.OSS_ENDPOINT}} 35 | access-key-id: ${{secrets.OSS_ID}} 36 | access-key-secret: ${{secrets.OSS_SECRET}} 37 | sts-token: "" 38 | - name: Build easy-rust book 39 | run: | 40 | # Build easy-rust book 41 | mkdir -pv easy-rust-archive/{en,zh} 42 | cd easy-rust-en && \ 43 | mdbook build && \ 44 | cp -ar book/* ../easy-rust-archive/en/ 45 | cd ../easy-rust-zh && \ 46 | mdbook build && \ 47 | cp -ar book/* ../easy-rust-archive/zh/ 48 | 49 | # Upload to oss 50 | ls -alhtr && \ 51 | cd .. && \ 52 | ossutil sync easy-rust-archive/ oss://${{ secrets.OSS_BUCKET }}/easy-rust/ -f --delete 53 | - name: Sending Build Status 54 | if: always() 55 | env: 56 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 57 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 58 | JOB_STATE: ${{ job.status }} 59 | RUNNER_OS: ${{ runner.os }} 60 | GITHUB_REF: ${{ github.ref }} 61 | GITHUB_RUN_ID: ${{ github.run_id }} 62 | GITHUB_REPOSITORY: ${{ github.repository }} 63 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 64 | run: python3 notify.py 65 | -------------------------------------------------------------------------------- /.github/workflows/edition-guide.yaml: -------------------------------------------------------------------------------- 1 | name: Build for edition-guide 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install mdbook 19 | uses: actions-rs/install@v0.1 20 | with: 21 | crate: mdbook 22 | version: latest 23 | use-tool-cache: true 24 | - name: Clone edition-guide 25 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/rust-lang/edition-guide edition-guide-en 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | 29 | - name: init oss config 30 | uses: yizhoumo/setup-ossutil@v1 31 | with: 32 | ossutil-version: '1.7.3' 33 | endpoint: ${{secrets.OSS_ENDPOINT}} 34 | access-key-id: ${{secrets.OSS_ID}} 35 | access-key-secret: ${{secrets.OSS_SECRET}} 36 | sts-token: "" 37 | - name: Build edition-guide 38 | run: | 39 | # Build edition-guide 40 | mkdir -pv archive/en 41 | cd edition-guide-en && \ 42 | mdbook build && \ 43 | cp -ar book/* ../archive/en/ 44 | 45 | # Upload to oss 46 | ls -alhtr && cd .. && \ 47 | ossutil sync archive/ oss://${{ secrets.OSS_BUCKET }}/edition-guide/ -f --delete 48 | - name: Sending Build Status 49 | if: always() 50 | env: 51 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 52 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 53 | JOB_STATE: ${{ job.status }} 54 | RUNNER_OS: ${{ runner.os }} 55 | GITHUB_REF: ${{ github.ref }} 56 | GITHUB_RUN_ID: ${{ github.run_id }} 57 | GITHUB_REPOSITORY: ${{ github.repository }} 58 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 59 | run: python3 notify.py 60 | -------------------------------------------------------------------------------- /.github/workflows/esp32-book.yaml: -------------------------------------------------------------------------------- 1 | name: Build for esp32-book 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install mdbook 19 | uses: actions-rs/install@v0.1 20 | with: 21 | crate: mdbook 22 | version: latest 23 | use-tool-cache: true 24 | - name: Clone esp32-book 25 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/ImplFerris/esp32-book.git esp32-book-en 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | 29 | - name: init oss config 30 | uses: yizhoumo/setup-ossutil@v1 31 | with: 32 | ossutil-version: '1.7.3' 33 | endpoint: ${{secrets.OSS_ENDPOINT}} 34 | access-key-id: ${{secrets.OSS_ID}} 35 | access-key-secret: ${{secrets.OSS_SECRET}} 36 | sts-token: "" 37 | - name: Build esp32-book 38 | run: | 39 | # Build esp32-book 40 | mkdir -pv archive/en 41 | cd esp32-book-en && \ 42 | mdbook build && \ 43 | cp -ar book/* ../archive/en/ 44 | 45 | # Upload to oss 46 | ls -alhtr && \ 47 | cd .. && \ 48 | ossutil sync archive/ oss://${{ secrets.OSS_BUCKET }}/esp32-book/ -f --delete 49 | - name: Sending Build Status 50 | if: always() 51 | env: 52 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 53 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 54 | JOB_STATE: ${{ job.status }} 55 | RUNNER_OS: ${{ runner.os }} 56 | GITHUB_REF: ${{ github.ref }} 57 | GITHUB_RUN_ID: ${{ github.run_id }} 58 | GITHUB_REPOSITORY: ${{ github.repository }} 59 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 60 | run: python3 notify.py 61 | -------------------------------------------------------------------------------- /.github/workflows/perf-book.yaml: -------------------------------------------------------------------------------- 1 | name: Build for perf-book 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install mdbook 19 | uses: actions-rs/install@v0.1 20 | with: 21 | crate: mdbook 22 | version: latest 23 | use-tool-cache: true 24 | - name: Clone perf-book 25 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/nnethercote/perf-book perf-book-en 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | 29 | - name: init oss config 30 | uses: yizhoumo/setup-ossutil@v1 31 | with: 32 | ossutil-version: '1.7.3' 33 | endpoint: ${{secrets.OSS_ENDPOINT}} 34 | access-key-id: ${{secrets.OSS_ID}} 35 | access-key-secret: ${{secrets.OSS_SECRET}} 36 | sts-token: "" 37 | - name: Build perf-book 38 | run: | 39 | # Build perf-book 40 | mkdir -pv archive/en 41 | cd perf-book-en && \ 42 | mdbook build && \ 43 | cp -ar book/* ../archive/en/ 44 | 45 | # Upload to oss 46 | ls -alhtr && \ 47 | cd .. && \ 48 | ossutil sync archive/ oss://${{ secrets.OSS_BUCKET }}/perf-book/ -f --delete 49 | - name: Sending Build Status 50 | if: always() 51 | env: 52 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 53 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 54 | JOB_STATE: ${{ job.status }} 55 | RUNNER_OS: ${{ runner.os }} 56 | GITHUB_REF: ${{ github.ref }} 57 | GITHUB_RUN_ID: ${{ github.run_id }} 58 | GITHUB_REPOSITORY: ${{ github.repository }} 59 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 60 | run: python3 notify.py 61 | -------------------------------------------------------------------------------- /.github/workflows/pyo3.yaml: -------------------------------------------------------------------------------- 1 | name: Build for pyo3 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '10 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install mdbook 19 | uses: actions-rs/install@v0.1 20 | with: 21 | crate: mdbook 22 | version: latest 23 | use-tool-cache: true 24 | - name: Clone pyo3 doc 25 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/PyO3/pyo3.git pyo3-en 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | - name: init oss config 29 | uses: yizhoumo/setup-ossutil@v1 30 | with: 31 | ossutil-version: '1.7.3' 32 | endpoint: ${{secrets.OSS_ENDPOINT}} 33 | access-key-id: ${{secrets.OSS_ID}} 34 | access-key-secret: ${{secrets.OSS_SECRET}} 35 | sts-token: "" 36 | - name: Build pyo3 book 37 | run: | 38 | # Build pyo3 book 39 | mkdir -pv pyo3-archive/{en,zh} 40 | cd pyo3-en/ && \ 41 | pip3 install nox && \ 42 | nox -s build-guide && \ 43 | ls -al && \ 44 | cp -ar target/guide/* ../pyo3-archive/en/ 45 | 46 | # Upload to oss 47 | cd ../ && \ 48 | ossutil sync pyo3-archive/ oss://${{ secrets.OSS_BUCKET }}/pyo3/ -f --delete 49 | - name: Sending Build Status 50 | if: always() 51 | env: 52 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 53 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 54 | JOB_STATE: ${{ job.status }} 55 | RUNNER_OS: ${{ runner.os }} 56 | GITHUB_REF: ${{ github.ref }} 57 | GITHUB_RUN_ID: ${{ github.run_id }} 58 | GITHUB_REPOSITORY: ${{ github.repository }} 59 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 60 | run: python3 notify.py 61 | -------------------------------------------------------------------------------- /.github/workflows/rust-by-example.yaml: -------------------------------------------------------------------------------- 1 | name: Build for rust-by-example 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install mdbook 19 | uses: actions-rs/install@v0.1 20 | with: 21 | crate: mdbook 22 | version: latest 23 | use-tool-cache: true 24 | - name: Clone rust-by-example book 25 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/rust-lang/rust-by-example.git rust-by-example-en 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | - name: Clone rust-by-example book 29 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/rust-lang-cn/rust-by-example-cn.git rust-by-example-zh 30 | env: 31 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 32 | - name: init oss config 33 | uses: yizhoumo/setup-ossutil@v1 34 | with: 35 | ossutil-version: '1.7.3' 36 | endpoint: ${{secrets.OSS_ENDPOINT}} 37 | access-key-id: ${{secrets.OSS_ID}} 38 | access-key-secret: ${{secrets.OSS_SECRET}} 39 | sts-token: "" 40 | - name: Build rust-by-example book 41 | run: | 42 | # Build rust-by-example book 43 | mkdir -pv rust-by-example-archive/{en,zh} 44 | cd rust-by-example-en && \ 45 | mdbook build && \ 46 | cp -ar book/* ../rust-by-example-archive/en/ 47 | cd ../rust-by-example-zh && \ 48 | mdbook build && \ 49 | cp -ar book/* ../rust-by-example-archive/zh/ 50 | 51 | # Upload to oss 52 | ls -alhtr && \ 53 | cd .. && \ 54 | ossutil sync rust-by-example-archive/ oss://${{ secrets.OSS_BUCKET }}/rust-by-example/ -f --delete 55 | - name: Sending Build Status 56 | if: always() 57 | env: 58 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 59 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 60 | JOB_STATE: ${{ job.status }} 61 | RUNNER_OS: ${{ runner.os }} 62 | GITHUB_REF: ${{ github.ref }} 63 | GITHUB_RUN_ID: ${{ github.run_id }} 64 | GITHUB_REPOSITORY: ${{ github.repository }} 65 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 66 | run: python3 notify.py 67 | -------------------------------------------------------------------------------- /.github/workflows/rust-by-practice.yaml: -------------------------------------------------------------------------------- 1 | name: Build for Learning Rust By Practice 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install mdbook 19 | uses: actions-rs/install@v0.1 20 | with: 21 | crate: mdbook 22 | version: latest 23 | use-tool-cache: true 24 | - name: Clone rust-by-practice 25 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/sunface/rust-by-practice.git rust-by-practice 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | - name: init oss config 29 | uses: yizhoumo/setup-ossutil@v1 30 | with: 31 | ossutil-version: '1.7.3' 32 | endpoint: ${{secrets.OSS_ENDPOINT}} 33 | access-key-id: ${{secrets.OSS_ID}} 34 | access-key-secret: ${{secrets.OSS_SECRET}} 35 | sts-token: "" 36 | - name: Build rust-by-practice 37 | run: | 38 | # Build rust-by-practice 39 | cd rust-by-practice && \ 40 | mkdir -pv rust-by-practice-archive/{en,zh} && \ 41 | ls -alh && \ 42 | mdbook build && \ 43 | cp -ar book/* rust-by-practice-archive/en/ && \ 44 | cd zh-CN && \ 45 | mdbook build && \ 46 | cp -ar book/* ../rust-by-practice-archive/zh/ 47 | 48 | # Upload to oss 49 | ls -alhtr && \ 50 | cd .. && \ 51 | ossutil sync rust-by-practice-archive/ oss://${{ secrets.OSS_BUCKET }}/rust-by-practice/ -f --delete 52 | - name: Sending Build Status 53 | if: always() 54 | env: 55 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 56 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 57 | JOB_STATE: ${{ job.status }} 58 | RUNNER_OS: ${{ runner.os }} 59 | GITHUB_REF: ${{ github.ref }} 60 | GITHUB_RUN_ID: ${{ github.run_id }} 61 | GITHUB_REPOSITORY: ${{ github.repository }} 62 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 63 | run: python3 notify.py 64 | -------------------------------------------------------------------------------- /.github/workflows/rust-cookbook.yaml: -------------------------------------------------------------------------------- 1 | name: Build for rust-cookbook 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install mdbook 19 | uses: actions-rs/install@v0.1 20 | with: 21 | crate: mdbook 22 | version: latest 23 | use-tool-cache: true 24 | - name: Clone rust-cookbook 25 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/rust-lang-nursery/rust-cookbook.git rust-cookbook-en 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | 29 | - name: init oss config 30 | uses: yizhoumo/setup-ossutil@v1 31 | with: 32 | ossutil-version: '1.7.3' 33 | endpoint: ${{secrets.OSS_ENDPOINT}} 34 | access-key-id: ${{secrets.OSS_ID}} 35 | access-key-secret: ${{secrets.OSS_SECRET}} 36 | sts-token: "" 37 | - name: Build rust-cookbook 38 | run: | 39 | # Build rust-cookbook 40 | mkdir -pv archive/en 41 | cd rust-cookbook-en && \ 42 | mdbook build && \ 43 | cp -ar book/* ../archive/en/ 44 | 45 | # Upload to oss 46 | ls -alhtr && \ 47 | cd .. && \ 48 | ossutil sync archive/ oss://${{ secrets.OSS_BUCKET }}/rust-cookbook/ -f --delete 49 | - name: Sending Build Status 50 | if: always() 51 | env: 52 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 53 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 54 | JOB_STATE: ${{ job.status }} 55 | RUNNER_OS: ${{ runner.os }} 56 | GITHUB_REF: ${{ github.ref }} 57 | GITHUB_RUN_ID: ${{ github.run_id }} 58 | GITHUB_REPOSITORY: ${{ github.repository }} 59 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 60 | run: python3 notify.py 61 | -------------------------------------------------------------------------------- /.github/workflows/rust-course.yaml: -------------------------------------------------------------------------------- 1 | name: Build for Rust Course 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | 13 | jobs: 14 | build_and_deploy: 15 | runs-on: ubuntu-latest 16 | timeout-minutes: 15 17 | steps: 18 | - uses: actions/checkout@v2 19 | - name: Install mdbook 20 | uses: actions-rs/install@v0.1 21 | with: 22 | crate: mdbook 23 | version: latest 24 | use-tool-cache: true 25 | - name: Clone rust-course 26 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/sunface/rust-course.git rust-course-zh 27 | env: 28 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 29 | 30 | - name: init oss config 31 | uses: yizhoumo/setup-ossutil@v1 32 | with: 33 | ossutil-version: '1.7.3' 34 | endpoint: ${{secrets.OSS_ENDPOINT}} 35 | access-key-id: ${{secrets.OSS_ID}} 36 | access-key-secret: ${{secrets.OSS_SECRET}} 37 | sts-token: "" 38 | - name: Build rust-course 39 | run: | 40 | # Build rust-course 41 | mkdir -pv archive/zh 42 | cd rust-course-zh && \ 43 | mdbook build && \ 44 | cp -ar book/* ../archive/zh/ 45 | 46 | # Upload to oss 47 | ls -alhtr && \ 48 | cd .. && \ 49 | ossutil sync archive/ oss://${{ secrets.OSS_BUCKET }}/rust-course/ -f --delete 50 | - name: Sending Build Status 51 | if: always() 52 | env: 53 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 54 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 55 | JOB_STATE: ${{ job.status }} 56 | RUNNER_OS: ${{ runner.os }} 57 | GITHUB_REF: ${{ github.ref }} 58 | GITHUB_RUN_ID: ${{ github.run_id }} 59 | GITHUB_REPOSITORY: ${{ github.repository }} 60 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 61 | run: python3 notify.py 62 | -------------------------------------------------------------------------------- /.github/workflows/rust-embedded.yaml: -------------------------------------------------------------------------------- 1 | name: Build for rust-embedded 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install mdbook 19 | uses: actions-rs/install@v0.1 20 | with: 21 | crate: mdbook 22 | version: latest 23 | use-tool-cache: true 24 | - name: Clone rust-embedded book 25 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/rust-embedded/book rust-embedded-en 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | 29 | - name: init oss config 30 | uses: yizhoumo/setup-ossutil@v1 31 | with: 32 | ossutil-version: '1.7.3' 33 | endpoint: ${{secrets.OSS_ENDPOINT}} 34 | access-key-id: ${{secrets.OSS_ID}} 35 | access-key-secret: ${{secrets.OSS_SECRET}} 36 | sts-token: "" 37 | - name: Build rust-embedded book 38 | run: | 39 | # Build rust-embedded book 40 | mkdir -pv archive/en 41 | cd rust-embedded-en && \ 42 | mdbook build && \ 43 | cp -ar book/* ../archive/en/ 44 | 45 | # Upload to oss 46 | ls -alhtr && \ 47 | cd .. && \ 48 | ossutil sync archive/ oss://${{ secrets.OSS_BUCKET }}/rust-embedded/ -f --delete 49 | - name: Sending Build Status 50 | if: always() 51 | env: 52 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 53 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 54 | JOB_STATE: ${{ job.status }} 55 | RUNNER_OS: ${{ runner.os }} 56 | GITHUB_REF: ${{ github.ref }} 57 | GITHUB_RUN_ID: ${{ github.run_id }} 58 | GITHUB_REPOSITORY: ${{ github.repository }} 59 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 60 | run: python3 notify.py 61 | -------------------------------------------------------------------------------- /.github/workflows/rust-guide.yaml: -------------------------------------------------------------------------------- 1 | name: Build for rust-guide 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install mdbook 19 | uses: actions-rs/install@v0.1 20 | with: 21 | crate: mdbook 22 | version: latest 23 | use-tool-cache: true 24 | - name: Clone rust-guide book 25 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/zzy/rust-guide.git rust-guide-zh 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | - name: init oss config 29 | uses: yizhoumo/setup-ossutil@v1 30 | with: 31 | ossutil-version: '1.7.3' 32 | endpoint: ${{secrets.OSS_ENDPOINT}} 33 | access-key-id: ${{secrets.OSS_ID}} 34 | access-key-secret: ${{secrets.OSS_SECRET}} 35 | sts-token: "" 36 | - name: Build rust-guide book 37 | run: | 38 | # Build rust-guide book 39 | mkdir -pv rust-guide-archive/{en,zh} 40 | cd rust-guide-zh && \ 41 | mdbook build && \ 42 | cp -ar book/* ../rust-guide-archive/zh/ 43 | 44 | # Upload to oss 45 | ls -alhtr && \ 46 | cd .. && \ 47 | ossutil sync rust-guide-archive/ oss://${{ secrets.OSS_BUCKET }}/rust-guide/ -f --delete 48 | - name: Sending Build Status 49 | if: always() 50 | env: 51 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 52 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 53 | JOB_STATE: ${{ job.status }} 54 | RUNNER_OS: ${{ runner.os }} 55 | GITHUB_REF: ${{ github.ref }} 56 | GITHUB_RUN_ID: ${{ github.run_id }} 57 | GITHUB_REPOSITORY: ${{ github.repository }} 58 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 59 | run: python3 notify.py 60 | -------------------------------------------------------------------------------- /.github/workflows/rust-on-esp.yaml: -------------------------------------------------------------------------------- 1 | name: Build for rust-on-esp-book. 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | env: 13 | MDBOOK_VERSION: "0.4.28" 14 | 15 | jobs: 16 | build_and_deploy: 17 | runs-on: ubuntu-latest 18 | timeout-minutes: 15 19 | steps: 20 | - name: Checkout the repository 21 | uses: actions/checkout@v2 22 | 23 | - name: Download mdBook ${{ env.MDBOOK_VERSION }} 24 | run: | 25 | mkdir -p /tmp/mdbook 26 | curl -Lo- https://github.com/rust-lang/mdBook/releases/download/v${{ env.MDBOOK_VERSION }}/mdbook-v${{ env.MDBOOK_VERSION }}-x86_64-unknown-linux-gnu.tar.gz | tar -C /tmp/mdbook -xzv 27 | 28 | - name: Clone rust-on-esp book 29 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/esp-rs/book.git rust-on-esp-en 30 | env: 31 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 32 | - name: Clone rust-on-esp book 33 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/Narukara/rust-on-esp-book-zh-cn.git rust-on-esp-zh 34 | env: 35 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 36 | - name: init oss config 37 | uses: yizhoumo/setup-ossutil@v1 38 | with: 39 | ossutil-version: '1.7.3' 40 | endpoint: ${{secrets.OSS_ENDPOINT}} 41 | access-key-id: ${{secrets.OSS_ID}} 42 | access-key-secret: ${{secrets.OSS_SECRET}} 43 | sts-token: "" 44 | - name: Build rust-on-esp book 45 | run: | 46 | # Build rust-on-esp book 47 | mkdir -pv rust-on-esp-archive/{en,zh} 48 | cd rust-on-esp-zh/ && \ 49 | /tmp/mdbook/mdbook build && \ 50 | cp -ar book/* ../rust-on-esp-archive/zh/ 51 | 52 | cd ../rust-on-esp-en/ && \ 53 | /tmp/mdbook/mdbook build && \ 54 | cp -ar book/* ../rust-on-esp-archive/en/ 55 | 56 | # Upload to oss 57 | ls -alhtr && \ 58 | cd ../ && \ 59 | ossutil sync rust-on-esp-archive/ oss://${{ secrets.OSS_BUCKET }}/rust-on-esp/ -f --delete 60 | - name: Sending Build Status 61 | if: always() 62 | env: 63 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 64 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 65 | JOB_STATE: ${{ job.status }} 66 | RUNNER_OS: ${{ runner.os }} 67 | GITHUB_REF: ${{ github.ref }} 68 | GITHUB_RUN_ID: ${{ github.run_id }} 69 | GITHUB_REPOSITORY: ${{ github.repository }} 70 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 71 | run: python3 notify.py 72 | -------------------------------------------------------------------------------- /.github/workflows/rustup.yaml: -------------------------------------------------------------------------------- 1 | name: Build for rustup Doc 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '10 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install mdbook 19 | uses: actions-rs/install@v0.1 20 | with: 21 | crate: mdbook 22 | version: latest 23 | use-tool-cache: true 24 | - name: Clone rustup doc 25 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/rust-lang/rustup.git rustup-en 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | - name: init oss config 29 | uses: yizhoumo/setup-ossutil@v1 30 | with: 31 | ossutil-version: '1.7.3' 32 | endpoint: ${{secrets.OSS_ENDPOINT}} 33 | access-key-id: ${{secrets.OSS_ID}} 34 | access-key-secret: ${{secrets.OSS_SECRET}} 35 | sts-token: "" 36 | - name: Build rustup book 37 | run: | 38 | # Build rustup book 39 | mkdir -pv rustup-archive/{en,zh} 40 | cd rustup-en/doc && \ 41 | mdbook build && \ 42 | ls -al && \ 43 | cp -ar book/* ../../rustup-archive/en/ 44 | 45 | # Upload to oss 46 | ls -alhtr && \ 47 | cd ../../ && \ 48 | ossutil sync rustup-archive/ oss://${{ secrets.OSS_BUCKET }}/rustup/ -f --delete 49 | - name: Sending Build Status 50 | if: always() 51 | env: 52 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 53 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 54 | JOB_STATE: ${{ job.status }} 55 | RUNNER_OS: ${{ runner.os }} 56 | GITHUB_REF: ${{ github.ref }} 57 | GITHUB_RUN_ID: ${{ github.run_id }} 58 | GITHUB_REPOSITORY: ${{ github.repository }} 59 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 60 | run: python3 notify.py 61 | -------------------------------------------------------------------------------- /.github/workflows/rustwasm.yaml: -------------------------------------------------------------------------------- 1 | name: Build for Rustwasm 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install mdbook 19 | uses: actions-rs/install@v0.1 20 | with: 21 | crate: mdbook 22 | version: latest 23 | use-tool-cache: true 24 | - name: Clone rustwasm book 25 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/rustwasm/book.git rustwasm-en 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | 29 | - name: init oss config 30 | uses: yizhoumo/setup-ossutil@v1 31 | with: 32 | ossutil-version: '1.7.3' 33 | endpoint: ${{secrets.OSS_ENDPOINT}} 34 | access-key-id: ${{secrets.OSS_ID}} 35 | access-key-secret: ${{secrets.OSS_SECRET}} 36 | sts-token: "" 37 | - name: Build rustwasm book 38 | run: | 39 | # Build rustwasm book 40 | mkdir -pv archive/en 41 | cd rustwasm-en && \ 42 | mdbook build && \ 43 | cp -ar book/* ../archive/en/ 44 | # Upload to oss 45 | ls -alhtr && \ 46 | cd .. && \ 47 | ossutil sync archive/ oss://${{ secrets.OSS_BUCKET }}/rustwasm/ -f --delete 48 | - name: Sending Build Status 49 | if: always() 50 | env: 51 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 52 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 53 | JOB_STATE: ${{ job.status }} 54 | RUNNER_OS: ${{ runner.os }} 55 | GITHUB_REF: ${{ github.ref }} 56 | GITHUB_RUN_ID: ${{ github.run_id }} 57 | GITHUB_REPOSITORY: ${{ github.repository }} 58 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 59 | run: python3 notify.py 60 | -------------------------------------------------------------------------------- /.github/workflows/std-training.yaml: -------------------------------------------------------------------------------- 1 | name: Build for Embedded Rust on Espressif. 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | env: 13 | MDBOOK_VERSION: "0.4.28" 14 | 15 | jobs: 16 | build_and_deploy: 17 | runs-on: ubuntu-latest 18 | timeout-minutes: 15 19 | steps: 20 | - name: Checkout the repository 21 | uses: actions/checkout@v2 22 | 23 | - name: Download mdBook ${{ env.MDBOOK_VERSION }} 24 | run: | 25 | mkdir -p /tmp/mdbook 26 | curl -Lo- https://github.com/rust-lang/mdBook/releases/download/v${{ env.MDBOOK_VERSION }}/mdbook-v${{ env.MDBOOK_VERSION }}-x86_64-unknown-linux-gnu.tar.gz | tar -C /tmp/mdbook -xzv 27 | 28 | - name: Clone std-training book 29 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/esp-rs/std-training.git std-training-en 30 | env: 31 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 32 | - name: Clone std-training book 33 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/Narukara/std-training-zh-cn.git std-training-zh 34 | env: 35 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 36 | - name: init oss config 37 | uses: yizhoumo/setup-ossutil@v1 38 | with: 39 | ossutil-version: '1.7.3' 40 | endpoint: ${{secrets.OSS_ENDPOINT}} 41 | access-key-id: ${{secrets.OSS_ID}} 42 | access-key-secret: ${{secrets.OSS_SECRET}} 43 | sts-token: "" 44 | - name: Build std-training book 45 | run: | 46 | # Build std-training book 47 | mkdir -pv std-training-archive/{en,zh} 48 | cd std-training-zh/book/ && \ 49 | /tmp/mdbook/mdbook build && \ 50 | cp -ar book/* ../../std-training-archive/zh/ 51 | 52 | cd ../../std-training-en/book/ && \ 53 | /tmp/mdbook/mdbook build && \ 54 | cp -ar book/* ../../std-training-archive/en/ 55 | 56 | # Upload to oss 57 | ls -alhtr && \ 58 | cd ../../ && \ 59 | ossutil sync std-training-archive/ oss://${{ secrets.OSS_BUCKET }}/std-training/ -f --delete 60 | - name: Sending Build Status 61 | if: always() 62 | env: 63 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 64 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 65 | JOB_STATE: ${{ job.status }} 66 | RUNNER_OS: ${{ runner.os }} 67 | GITHUB_REF: ${{ github.ref }} 68 | GITHUB_RUN_ID: ${{ github.run_id }} 69 | GITHUB_REPOSITORY: ${{ github.repository }} 70 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 71 | run: python3 notify.py 72 | -------------------------------------------------------------------------------- /.github/workflows/tlborm.yaml: -------------------------------------------------------------------------------- 1 | name: Build for Tlborm 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install mdbook 19 | uses: actions-rs/install@v0.1 20 | with: 21 | crate: mdbook 22 | version: latest 23 | use-tool-cache: true 24 | - name: Clone tlborm book 25 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/Veykril/tlborm.git tlborm-en 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | - name: Clone tlborm book 29 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/zjp-CN/tlborm.git tlborm-zh 30 | env: 31 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 32 | - name: init oss config 33 | uses: yizhoumo/setup-ossutil@v1 34 | with: 35 | ossutil-version: '1.7.3' 36 | endpoint: ${{secrets.OSS_ENDPOINT}} 37 | access-key-id: ${{secrets.OSS_ID}} 38 | access-key-secret: ${{secrets.OSS_SECRET}} 39 | sts-token: "" 40 | - name: Build tlborm book 41 | run: | 42 | # Build tlborm book 43 | mkdir -pv tlborm-archive/{en,zh} 44 | cd tlborm-en && \ 45 | mdbook build && \ 46 | cp -ar book/* ../tlborm-archive/en/ 47 | cd ../tlborm-zh && \ 48 | mdbook build && \ 49 | cp -ar book/* ../tlborm-archive/zh/ 50 | 51 | # Upload to oss 52 | ls -alhtr && \ 53 | cd .. && \ 54 | ossutil sync tlborm-archive/ oss://${{ secrets.OSS_BUCKET }}/tlborm/ -f --delete 55 | - name: Sending Build Status 56 | if: always() 57 | env: 58 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 59 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 60 | JOB_STATE: ${{ job.status }} 61 | RUNNER_OS: ${{ runner.os }} 62 | GITHUB_REF: ${{ github.ref }} 63 | GITHUB_RUN_ID: ${{ github.run_id }} 64 | GITHUB_REPOSITORY: ${{ github.repository }} 65 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 66 | run: python3 notify.py 67 | -------------------------------------------------------------------------------- /.github/workflows/trpl.yaml: -------------------------------------------------------------------------------- 1 | name: Build for TRPL 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - master 7 | schedule: 8 | - cron: '0 6 * * *' 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | build_and_deploy: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Update rustup 19 | run: rustup self update 20 | - name: Install Rust 21 | run: | 22 | rustup set profile minimal 23 | rustup toolchain install 1.74.1 -c rust-docs 24 | rustup default 1.74.1 25 | - name: Install mdbook 26 | run: | 27 | mkdir bin 28 | curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.36/mdbook-v0.4.36-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin 29 | echo "$(pwd)/bin" >> ${GITHUB_PATH} 30 | - name: Clone trpl book 31 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/rust-lang/book.git trpl-en 32 | env: 33 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 34 | - name: Clone trpl book 35 | run: git clone https://x-access-token:${GITHUB_TOKEN}@github.com/KaiserY/trpl-zh-cn.git trpl-zh 36 | env: 37 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 38 | - name: Install mdbook-typst-pdf 39 | run: | 40 | curl -sL -o bin/mdbook-typst-pdf https://github.com/KaiserY/mdbook-typst-pdf/releases/download/0.1.2/mdbook-typst-pdf-x86_64-unknown-linux-gnu 41 | chmod +x bin/mdbook-typst-pdf 42 | echo "$(pwd)/bin" >> ${GITHUB_PATH} 43 | - name: Install font 44 | run: | 45 | echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections 46 | sudo apt-get -y install msttcorefonts 47 | mkdir fonts 48 | mkdir -p ~/.local/share/fonts 49 | curl -sL -o Noto_Sans.zip https://github.com/notofonts/latin-greek-cyrillic/releases/download/NotoSans-v2.013/NotoSans-v2.013.zip 50 | unzip Noto_Sans.zip -d fonts/Noto_Sans 51 | curl -sL -o Noto_Sans_SC.zip https://github.com/notofonts/noto-cjk/releases/download/Sans2.004/08_NotoSansCJKsc.zip 52 | unzip Noto_Sans_SC.zip -d fonts/Noto_Sans_SC 53 | curl -sL -o Noto_Sans_Mono.zip https://github.com/notofonts/latin-greek-cyrillic/releases/download/NotoSansMono-v2.014/NotoSansMono-v2.014.zip 54 | unzip Noto_Sans_Mono.zip -d fonts/Noto_Sans_Mono 55 | curl -sL -o Noto_Sans_KR.zip https://github.com/notofonts/noto-cjk/releases/download/Sans2.004/07_NotoSansCJKkr.zip 56 | unzip Noto_Sans_KR.zip -d fonts/Noto_Sans_KR 57 | curl -sL -o Noto_Sans_Thai.zip https://github.com/notofonts/thai/releases/download/NotoSansThai-v2.002/NotoSansThai-v2.002.zip 58 | unzip Noto_Sans_Thai.zip -d fonts/Noto_Sans_Thai 59 | curl -sL -o Noto_Sans_Arabic.zip https://github.com/notofonts/arabic/releases/download/NotoNaskhArabic-v2.018/NotoNaskhArabic-v2.018.zip 60 | unzip Noto_Sans_Arabic.zip -d fonts/Noto_Sans_Arabic 61 | curl -sL -o Noto_Sans_Devanagari.zip https://github.com/notofonts/devanagari/releases/download/NotoSansDevanagari-v2.004/NotoSansDevanagari-v2.004.zip 62 | unzip -: Noto_Sans_Devanagari.zip -d fonts/Noto_Sans_Devanagari 63 | curl -sL -o NotoColorEmoji.ttf https://github.com/googlefonts/noto-emoji/raw/main/fonts/NotoColorEmoji.ttf 64 | mv NotoColorEmoji.ttf fonts/NotoColorEmoji.ttf 65 | curl -sL -o times_sans_serif.zip https://dl.dafont.com/dl/?f=times_sans_serif 66 | unzip times_sans_serif.zip -d fonts/times_sans_serif 67 | curl -sOL https://github.com/notofonts/hebrew/releases/download/NotoSansHebrew-v2.003/NotoSansHebrew-v2.003.zip 68 | unzip -: NotoSansHebrew-v2.003.zip 69 | mv -v NotoSansHebrew fonts/ 70 | mv fonts/* ~/.local/share/fonts/ 71 | fc-cache -rv 72 | - name: init oss config 73 | uses: yizhoumo/setup-ossutil@v1 74 | with: 75 | ossutil-version: '1.7.3' 76 | endpoint: ${{secrets.OSS_ENDPOINT}} 77 | access-key-id: ${{secrets.OSS_ID}} 78 | access-key-secret: ${{secrets.OSS_SECRET}} 79 | sts-token: "" 80 | - name: Build trpl book 81 | run: | 82 | # Build trpl book 83 | mkdir -pv trpl-archive/{en,zh} 84 | cd trpl-en && \ 85 | mdbook build && \ 86 | cp -ar book/* ../trpl-archive/en/ 87 | cd ../trpl-zh && \ 88 | mdbook build && \ 89 | ls -al && \ 90 | cp -ar book/html/* ../trpl-archive/zh/ 91 | cp "book/typst-pdf/Rust 程序设计语言 简体中文版.pdf" ../trpl-archive/zh/ 92 | 93 | # Upload to oss 94 | ls -alhtr && \ 95 | cd .. && \ 96 | ossutil sync trpl-archive/ oss://${{ secrets.OSS_BUCKET }}/trpl/ -f --delete 97 | - name: Sending Build Status 98 | if: always() 99 | env: 100 | DINGTALK_ACCESS_TOKEN: ${{ secrets.DINGTALK_ACCESS_TOKEN }} 101 | DINGTALK_SECRET: ${{ secrets.DINGTALK_SECRET }} 102 | JOB_STATE: ${{ job.status }} 103 | RUNNER_OS: ${{ runner.os }} 104 | GITHUB_REF: ${{ github.ref }} 105 | GITHUB_RUN_ID: ${{ github.run_id }} 106 | GITHUB_REPOSITORY: ${{ github.repository }} 107 | GITHUB_WORKFLOW: ${{ env.GITHUB_WORKFLOW }} 108 | run: python3 notify.py 109 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # NPM 2 | node_modules/ 3 | npm-debug.log 4 | 5 | # IDE 6 | .idea 7 | *.sublime-project 8 | *.sublime-workspace 9 | .vscode/* 10 | 11 | # OS 12 | ._* 13 | Thumbs.db 14 | .DS_Store 15 | **/.DS_Store 16 | .Trashes 17 | .Spotlight-V100 18 | .AppleDouble 19 | .LSOverride 20 | Desktop.ini 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 hzbd 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # The Rust Books 2 | 3 | [![TRPL](https://github.com/containerpi/rsdocs-actions/actions/workflows/trpl.yaml/badge.svg)](https://github.com/containerpi/rsdocs-actions/actions/workflows/trpl.yaml) 4 | [![tlborm](https://github.com/containerpi/rsdocs-actions/actions/workflows/tlborm.yaml/badge.svg)](https://github.com/containerpi/rsdocs-actions/actions/workflows/tlborm.yaml) 5 | [![rustwasm](https://github.com/containerpi/rsdocs-actions/actions/workflows/rustwasm.yaml/badge.svg)](https://github.com/containerpi/rsdocs-actions/actions/workflows/rustwasm.yaml) 6 | [![rust-embedded](https://github.com/containerpi/rsdocs-actions/actions/workflows/rust-embedded.yaml/badge.svg)](https://github.com/containerpi/rsdocs-actions/actions/workflows/rust-embedded.yaml) 7 | [![async-book](https://github.com/containerpi/rsdocs-actions/actions/workflows/async-book.yaml/badge.svg)](https://github.com/containerpi/rsdocs-actions/actions/workflows/async-book.yaml) 8 | [![perf-book](https://github.com/containerpi/rsdocs-actions/actions/workflows/perf-book.yaml/badge.svg)](https://github.com/containerpi/rsdocs-actions/actions/workflows/perf-book.yaml) 9 | [![edition-guide](https://github.com/containerpi/rsdocs-actions/actions/workflows/edition-guide.yaml/badge.svg)](https://github.com/containerpi/rsdocs-actions/actions/workflows/edition-guide.yaml) 10 | [![cheats.rs](https://github.com/containerpi/rsdocs-actions/actions/workflows/cheats-rs.yaml/badge.svg)](https://github.com/containerpi/rsdocs-actions/actions/workflows/cheats-rs.yaml) 11 | [![rust-course](https://github.com/containerpi/rsdocs-actions/actions/workflows/rust-course.yaml/badge.svg)](https://github.com/containerpi/rsdocs-actions/actions/workflows/rust-course.yaml) 12 | [![learning-rust-by-practice](https://github.com/containerpi/rsdocs-actions/actions/workflows/rust-by-practice.yaml/badge.svg)](https://github.com/containerpi/rsdocs-actions/actions/workflows/rust-by-practice.yaml) 13 | [![the-rust-edition-guide](https://github.com/containerpi/rsdocs-actions/actions/workflows/edition-guide.yaml/badge.svg)](https://github.com/containerpi/rsdocs-actions/actions/workflows/edition-guide.yaml) 14 | [![actix-web](https://github.com/containerpi/rsdocs-actions/actions/workflows/actix-web.yaml/badge.svg)](https://github.com/containerpi/rsdocs-actions/actions/workflows/actix-web.yaml) 15 | [![cargo](https://github.com/containerpi/rsdocs-actions/actions/workflows/cargo.yaml/badge.svg)](https://github.com/containerpi/rsdocs-actions/actions/workflows/cargo.yaml) 16 | [![rust-guide](https://github.com/containerpi/rsdocs-actions/actions/workflows/rust-guide.yaml/badge.svg)](https://github.com/containerpi/rsdocs-actions/actions/workflows/rust-guide.yaml) 17 | 18 | ## Requirements 19 | 20 | Building the book requires [mdBook], ideally the same version that 21 | rust-lang/rust uses in [this file][rust-mdbook]. 22 | 23 | [mdBook]: https://github.com/rust-lang-nursery/mdBook 24 | [rust-mdbook]: https://github.com/rust-lang/rust/blob/master/src/tools/rustbook/Cargo.toml 25 | 26 | ## Book List(China mirror) - auto build with github actions 27 | 28 | | Name | Language | Comment(fork from) | 29 | |:- |:- |:- | 30 | |[The Rust Programming Language(2021 edition)](http://opendocs.containerpi.com/trpl/en) | en | [@rust-lang](https://github.com/rust-lang/book)| 31 | |[Rust 程序设计语言(2021 edition)](http://opendocs.containerpi.com/trpl/zh) | zh | [@KaiserY](https://github.com/KaiserY/trpl-zh-cn)| 32 | |[The Little Book of Rust Macros](http://opendocs.containerpi.com/tlborm/en/) | en | [@Veykril](https://github.com/Veykril/tlborm) | 33 | |[Rust 宏小册](http://opendocs.containerpi.com/tlborm/zh/) | zh | [@zjp-CN](https://github.com/zjp-CN/tlborm) | 34 | |[The Rust and WebAssembly Book](http://opendocs.containerpi.com/rustwasm/en/) | en | [@rustwasm](https://github.com/rustwasm/book) | 35 | |[The Embedded Rust Book](http://opendocs.containerpi.com/rust-embedded/en/) | en | [@rust-embedded](https://github.com/rust-embedded/book) | 36 | |[Asynchronous Programming in Rust](http://opendocs.containerpi.com/async-book/en/) | en | [@rust-lang](https://github.com/rust-lang/async-book) | 37 | |[The Rust Performance Book](http://opendocs.containerpi.com/perf-book/en/) | en | [@rust-lang](https://github.com/nnethercote/perf-book) | 38 | |[The Rust Edition Guide](http://opendocs.containerpi.com/edition-guide/en/) | en | [@rust-lang](https://github.com/rust-lang/edition-guide) | 39 | |[Learn Rust with examples](http://opendocs.containerpi.com/rust-by-example/en/) | en | [@rust-lang](https://github.com/rust-lang/rust-by-example) | 40 | |[通过例子学 Rust](http://opendocs.containerpi.com/rust-by-example/zh/) | zh | [@rust-lang-cn](https://github.com/rust-lang-cn/rust-by-example-cn) | 41 | |[Rust Language Cheat Sheet](http://opendocs.containerpi.com/cheats.rs/en/) | en | [@ralfbiedert](https://github.com/ralfbiedert/cheats.rs) | 42 | |[Rust 语言备忘清单(简体中文)](http://opendocs.containerpi.com/cheats.rs/zh/) | zh | [@kingfree](https://github.com/kingfree/cheats.rs/) | 43 | |[A Rust Cookbook](http://opendocs.containerpi.com/rust-cookbook/en/) | en | [@rust-lang-nursery](https://github.com/rust-lang-nursery/rust-cookbook) | 44 | |[Rust语言圣经 (The Course)](http://opendocs.containerpi.com/rust-course/zh/) | zh | [@sunface](https://github.com/sunface/rust-course) | 45 | |[Learning Rust By Practice](http://opendocs.containerpi.com/rust-by-practice/en/) | en | [@sunface](https://github.com/sunface/rust-by-practice) | 46 | |[Rust 练习实践](http://opendocs.containerpi.com/rust-by-practice/zh/) | zh | [@sunface](https://github.com/sunface/rust-by-practice/blob/master/zh-CN/src/why-exercise.md) | 47 | |[Rust Cargo 官书(非官方翻译)](http://opendocs.containerpi.com/cargo/zh/) | zh | [@chinanf-boy](https://github.com/chinanf-boy/cargo-book-zh) | 48 | |[The Cargo Book](http://opendocs.containerpi.com/cargo/en/) | en | [@rust-lang](https://github.com/rust-lang/cargo) | 49 | |[actix-web 中文文档](http://opendocs.containerpi.com/actix-web/zh/) | zh | [@zzy](https://github.com/zzy/actix-web-zh-cn) | 50 | |[Rust 实践指南](http://opendocs.containerpi.com/rust-guide/zh/) | zh | [@sunface](https://github.com/zzy/rust-guide) | 51 | |[Comprehensive Rust](http://opendocs.containerpi.com/comprehensive-rust/en/) | en | [@google](https://github.com/google/comprehensive-rust) | 52 | |[Rustup: the Rust toolchain installer](http://opendocs.containerpi.com/rustup/en/) | en | [@rust-lang](https://github.com/rust-lang/rustup) | 53 | |[PyO3 user guide](http://opendocs.containerpi.com/pyo3/en/) | en | [@PyO3](https://github.com/PyO3/pyo3) | 54 | |[Learn Rust Easy](http://opendocs.containerpi.com/Learn-rust-easy/zh/) | zh | [@令狐壹冲](https://github.com/RustyCab/LearnRustEasy) | 55 | 56 | * Embedded Rust on Espressif ([en](http://opendocs.containerpi.com/std-training/en/) / [zh](http://opendocs.containerpi.com/std-training/zh/)) 57 | * The Rust on ESP Book ([en](http://opendocs.containerpi.com/rust-on-esp/en/) / [zh](http://opendocs.containerpi.com/rust-on-esp/zh/)) 58 | * impl Rust for ESP32 ([en](http://opendocs.containerpi.com/esp32-book/en/) / zh) 59 | 60 | ## Notes 61 | 62 | * Run every day at 6:00 AM UTC 63 | * Triggered manually 64 | 65 | ## Contribute 66 | 67 | * Use [issues](https://github.com/containerpi/rsdocs-actions/issues) for everything 68 | -------------------------------------------------------------------------------- /_books.html: -------------------------------------------------------------------------------- 1 | 2 | 1 3 | 4 | The Rust Programming 5 | Language{2021 edition} 6 | en 7 | 8 | 9 | @rust-lang 10 | 11 | mdbook 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 2022-03-19 10:15:06 20 | 21 | 22 | 23 | 2 24 | 25 | Rust 程序设计语言{2021 26 | edition} 27 | zh 28 | 29 | 30 | @KaiserY 31 | 32 | mdbook 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 2022-03-19 10:14:50 41 | 42 | 43 | 44 | 3 45 | 46 | The Little Book of 47 | Rust Macros 48 | en 49 | 50 | 51 | @Veykril 52 | 53 | mdbook 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 2022-01-12 15:28:04 62 | 63 | 64 | 65 | 4 66 | 67 | Rust 宏小册 68 | zh 69 | 70 | 71 | @zjp-CN 72 | 73 | mdbook 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 2022-01-12 15:28:04 82 | 83 | 84 | 85 | 5 86 | 87 | The Rust and 88 | WebAssembly Book 89 | en 90 | 91 | 92 | @rustwasm 93 | 94 | mdbook 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 2022-01-12 15:28:04 103 | 104 | 105 | 106 | 6 107 | 108 | The 109 | Embedded Rust Book 110 | en 111 | 112 | 113 | @rust-embedded 114 | 115 | mdbook 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 2022-01-12 15:28:04 124 | 125 | 126 | 127 | 7 128 | 129 | Asynchronous 130 | Programming in Rust 131 | en 132 | 133 | 134 | @rust-lang 135 | 136 | mdbook 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 2022-01-12 15:28:04 145 | 146 | 147 | 148 | 8 149 | 150 | The Rust 151 | Performance Book 152 | en 153 | 154 | 155 | @rust-lang 156 | 157 | mdbook 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 2022-01-12 15:28:04 166 | 167 | 168 | 169 | 9 170 | 171 | The Rust 172 | Edition Guide 173 | en 174 | 175 | 176 | @rust-lang 177 | 178 | mdbook 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 2022-03-19 10:13:40 187 | 188 | 189 | 190 | 10 191 | 192 | Learn 193 | Rust with examples 194 | en 195 | 196 | 197 | @rust-lang 198 | 199 | mdbook 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 2022-01-12 15:28:04 208 | 209 | 210 | 211 | 11 212 | 213 | 通过例子学 214 | Rust 215 | zh 216 | 217 | 218 | @rust-lang-cn 219 | 220 | mdbook 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 2022-01-12 15:28:04 229 | 230 | 231 | 232 | 12 233 | 234 | Rust Language 235 | Cheat Sheet 236 | en 237 | 238 | 239 | @ralfbiedert 240 | 241 | zola 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 2022-01-12 15:28:04 250 | 251 | 252 | 253 | 13 254 | 255 | Rust 256 | 语言备忘清单{简体中文} 257 | zh 258 | 259 | 260 | @kingfree 261 | 262 | zola 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 2022-03-19 10:14:39 271 | 272 | 273 | 274 | 14 275 | 276 | A Rust 277 | Cookbook 278 | en 279 | 280 | 281 | @rust-lang-nursery 282 | 283 | mdbook 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 2022-02-06 19:29:45 292 | 293 | 294 | 295 | 15 296 | 297 | Rust语言圣经 {The 298 | Course} 299 | zh 300 | 301 | 302 | @sunface 303 | 304 | mdbook 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 2022-03-19 10:14:29 313 | 314 | 315 | 316 | 16 317 | 318 | Learning 319 | Rust By Practice 320 | en 321 | 322 | 323 | @sunface 324 | 325 | mdbook 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 2022-03-16 09:48:31 334 | 335 | 336 | 337 | 17 338 | 339 | Rust 340 | 练习实践 341 | zh 342 | 343 | 344 | @sunface 345 | 346 | mdbook 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 2022-03-16 09:48:53 355 | 356 | 357 | 358 | 18 359 | 360 | Rust Cargo 361 | 官书{非官方翻译} 362 | zh 363 | 364 | 365 | @chinanf-boy 366 | 367 | mdbook 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 2022-03-19 10:14:18 376 | 377 | 378 | 379 | 19 380 | 381 | The Cargo Book 382 | en 383 | 384 | 385 | @rust-lang 386 | 387 | mdbook 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 2022-03-19 10:10:26 396 | 397 | 398 | 399 | 20 400 | 401 | actix-web 402 | 中文文档 403 | zh 404 | 405 | 406 | @zzy 407 | 408 | mdbook 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 2022-03-19 10:10:56 417 | 418 | 419 | 420 | 21 421 | 422 | Rust 实践指南 423 | zh 424 | 425 | 426 | @zzy 427 | 428 | mdbook 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 2022-03-19 10:11:24 437 | 438 | -------------------------------------------------------------------------------- /assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/containerpi/rsdocs-actions/4636cf5be7de4ca23eabaf3f3ec2130d36593e4b/assets/favicon.ico -------------------------------------------------------------------------------- /assets/main.css: -------------------------------------------------------------------------------- 1 | @media (min-width: 986px) { 2 | .dropbox { 3 | padding-left: 9rem!important; 4 | padding-right: 9rem!important; 5 | } 6 | } 7 | body { 8 | font: 14px 'Varela Round', 9 | 'Helvetica Neue', 10 | 'Microsoft Yahei', 11 | 'Hiragino Sans GB', 12 | 'Heiti SC', 13 | 'WenQuanYi Micro Hei', 14 | 'Helvetica', 15 | 'Arial', 16 | 'sans-serif'; 17 | } 18 | a { 19 | color: #525252; 20 | } 21 | a:hover, 22 | a.active, 23 | a.text-dark:focus, 24 | a.text-dark:hover { 25 | color: rgb(255, 153, 0) !important; 26 | text-decoration: none; 27 | } 28 | .table-responsive { 29 | display: block; 30 | width: 100%; 31 | overflow-x: auto; 32 | } 33 | .table thead tr th { 34 | border-bottom: 1px; 35 | } 36 | .table thead th { 37 | color: #868e96; 38 | font-size: 80%; 39 | font-weight: 600; 40 | text-transform: uppercase; 41 | border-top: 0 !important; 42 | } 43 | .table td, .table th { 44 | padding: 14px 12px; 45 | } 46 | .table { 47 | font-size: 13px; 48 | } 49 | .service-logo { 50 | height: 68px; 51 | margin: 66px auto 42px auto; 52 | } 53 | .loader { 54 | position: relative; 55 | width: 48px; 56 | height: 48px; 57 | } 58 | .loader:before, 59 | .loader:after { 60 | content:""; 61 | display: block; 62 | border: 16px solid transparent; 63 | border-top-color: #43a8ff; 64 | position: absolute; 65 | left: 0; 66 | top: 0; 67 | animation: weld-rotate 2s infinite ease-in; 68 | } 69 | .loader:before { 70 | border-color: transparent transparent transparent #FF3D00; 71 | animation-delay: 0.5s; 72 | } 73 | @keyframes weld-rotate { 74 | 0% , 25% {transform: rotate(0deg)} 75 | 50% , 75% {transform: rotate(180deg)} 76 | 100% {transform: rotate(360deg)} 77 | } 78 | 79 | .footer { 80 | font-size: 12px; 81 | } 82 | -------------------------------------------------------------------------------- /assets/opendocs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/containerpi/rsdocs-actions/4636cf5be7de4ca23eabaf3f3ec2130d36593e4b/assets/opendocs.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Rust OpenDocs 8 | 9 | 13 | 17 | 22 | 23 | 24 |
25 |
26 | 31 |
32 |
33 |
34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
#Book NameFrokBuild KitBuild statusCreate At
47 |
48 | 49 | 50 |
51 |
52 | 53 |
54 |
55 | 70 |
71 |
72 | 73 | 94 | 95 | -------------------------------------------------------------------------------- /notify.py: -------------------------------------------------------------------------------- 1 | import time 2 | import hmac 3 | import hashlib 4 | import base64 5 | import urllib 6 | import requests 7 | import os 8 | 9 | 10 | def dingtalk_send(token, secret, json_data=""): 11 | url = "https://oapi.dingtalk.com/robot/send" 12 | ts = int(round(time.time() * 1000)) 13 | str = '{}\n{}'.format(ts, secret) 14 | hmc = hmac.new(secret.encode('utf-8'), str.encode('utf-8'), digestmod=hashlib.sha256).digest() 15 | sign = urllib.parse.quote_plus(base64.b64encode(hmc)) 16 | endpoint = '{}?access_token={}×tamp={}&sign={}'.format(url, token, ts, sign) 17 | headers = {'Content-Type': 'application/json'} 18 | resp = requests.post(url=endpoint, headers=headers, json=json_data) 19 | print(resp.text) 20 | 21 | 22 | if __name__ == '__main__': 23 | token = os.getenv('DINGTALK_ACCESS_TOKEN') 24 | secret = os.getenv('DINGTALK_SECRET') 25 | job_status = os.getenv('JOB_STATE') 26 | github_ref = os.getenv('GITHUB_REF') 27 | github_run_id = os.getenv('GITHUB_RUN_ID') 28 | runner_os = os.getenv('RUNNER_OS') 29 | github_repository = os.getenv('GITHUB_REPOSITORY') 30 | github_workflow = os.getenv('GITHUB_WORKFLOW') 31 | if job_status == 'success': 32 | color = "#1ce43f" 33 | elif job_status == 'cancelled': 34 | color = "#c1c1c1" 35 | else: 36 | color = "#ff4a83" 37 | message = { 38 | "msgtype": "markdown", 39 | "markdown": { 40 | "title": github_workflow, 41 | "text": "### " + github_workflow + " #" + github_run_id + "\n\n> status: **" + str(job_status).upper() + "** \n\n> head ref: **" + github_ref + "** \n\n> runner os: **" + runner_os + "** \n\n> actions url: [" + github_repository + "](https://github.com/" + github_repository + "/actions)\n\n" 42 | } 43 | } 44 | dingtalk_send(token, secret, json_data=message) 45 | --------------------------------------------------------------------------------