From f4cd8d15c9f1e927670a8f23fb5833c9e221258b Mon Sep 17 00:00:00 2001 From: realaravinth Date: Wed, 11 May 2022 03:34:04 +0530 Subject: [PATCH] init --- .github/workflows/linux.yml | 79 +++++++++++++++++++++++ .gitignore | 5 ++ CHANGES.md | 121 ++++++++++++++++++++++++++++++++++++ LICENSE-APACHE | 1 + LICENSE-MIT | 1 + README.md | 14 +++++ 6 files changed, 221 insertions(+) create mode 100644 .github/workflows/linux.yml create mode 100644 .gitignore create mode 100644 CHANGES.md create mode 120000 LICENSE-APACHE create mode 120000 LICENSE-MIT create mode 100644 README.md diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000..1377262 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,79 @@ +name: CI (Linux) + +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + - master + + +jobs: + build_and_test: + strategy: + fail-fast: false + matrix: + version: + - stable + - nightly + + name: ${{ matrix.version }} - x86_64-unknown-linux-gnu + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: ⚡ Cache + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Install ${{ matrix.version }} + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.version }}-x86_64-unknown-linux-gnu + profile: minimal + override: true + + - name: check build + uses: actions-rs/cargo@v1 + with: + command: check + args: --all --bins --examples --tests + + - name: tests + uses: actions-rs/cargo@v1 + timeout-minutes: 40 + with: + command: test + args: --all --all-features --no-fail-fast + + - name: Generate coverage file + if: matrix.version == 'stable' && (github.ref == 'refs/heads/master' || github.event_name == 'pull_request') + uses: actions-rs/tarpaulin@v0.1 + with: + args: '-t 1200' + + - name: Upload to Codecov + if: matrix.version == 'stable' && (github.ref == 'refs/heads/master' || github.event_name == 'pull_request') + uses: codecov/codecov-action@v2 + with: + file: cobertura.xml + + - name: generate documentation + if: matrix.version == 'stable' && (github.repository == 'realaravinth/actix-web-codegen-const-routes') + uses: actions-rs/cargo@v1 + with: + command: doc + args: --no-deps --workspace --all-features + + - name: Deploy to GitHub Pages + if: matrix.version == 'stable' && (github.repository == 'realaravinth/actix-web-codegen-const-routes') + uses: JamesIves/github-pages-deploy-action@3.7.1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: target/doc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea3b594 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/target +tarpaulin-report.html +.env +cobertura.xml +coverage diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..8ee787c --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,121 @@ +# Changes + +## Unreleased - 2021-xx-xx + + +## 4.0.0 - 2022-02-24 +- Version aligned with `actix-web` and will remain in sync going forward. +- No significant changes since `0.5.0`. + + +## 0.5.0 - 2022-02-24 +- No significant changes since `0.5.0-rc.2`. + + +## 0.5.0-rc.2 - 2022-02-01 +- No significant changes since `0.5.0-rc.1`. + + +## 0.5.0-rc.1 - 2022-01-04 +- Minimum supported Rust version (MSRV) is now 1.54. + + +## 0.5.0-beta.6 - 2021-12-11 +- No significant changes since `0.5.0-beta.5`. + + +## 0.5.0-beta.5 - 2021-10-20 +- Improve error recovery potential when macro input is invalid. [#2410] +- Add `#[actix_web::test]` macro for setting up tests with a runtime. [#2409] +- Minimum supported Rust version (MSRV) is now 1.52. + +[#2410]: https://github.com/actix/actix-web/pull/2410 +[#2409]: https://github.com/actix/actix-web/pull/2409 + + +## 0.5.0-beta.4 - 2021-09-09 +- In routing macros, paths are now validated at compile time. [#2350] +- Minimum supported Rust version (MSRV) is now 1.51. + +[#2350]: https://github.com/actix/actix-web/pull/2350 + + +## 0.5.0-beta.3 - 2021-06-17 +- No notable changes. + + +## 0.5.0-beta.2 - 2021-03-09 +- Preserve doc comments when using route macros. [#2022] +- Add `name` attribute to `route` macro. [#1934] + +[#2022]: https://github.com/actix/actix-web/pull/2022 +[#1934]: https://github.com/actix/actix-web/pull/1934 + + +## 0.5.0-beta.1 - 2021-02-10 +- Use new call signature for `System::new`. + + +## 0.4.0 - 2020-09-20 +- Added compile success and failure testing. [#1677] +- Add `route` macro for supporting multiple HTTP methods guards. [#1674] + +[#1677]: https://github.com/actix/actix-web/pull/1677 +[#1674]: https://github.com/actix/actix-web/pull/1674 + + +## 0.3.0 - 2020-09-11 +- No significant changes from `0.3.0-beta.1`. + + +## 0.3.0-beta.1 - 2020-07-14 +- Add main entry-point macro that uses re-exported runtime. [#1559] + +[#1559]: https://github.com/actix/actix-web/pull/1559 + + +## 0.2.2 - 2020-05-23 +- Add resource middleware on actix-web-codegen [#1467] + +[#1467]: https://github.com/actix/actix-web/pull/1467 + + +## 0.2.1 - 2020-02-25 +- Add `#[allow(missing_docs)]` attribute to generated structs [#1368] +- Allow the handler function to be named as `config` [#1290] + +[#1368]: https://github.com/actix/actix-web/issues/1368 +[#1290]: https://github.com/actix/actix-web/issues/1290 + + +## 0.2.0 - 2019-12-13 +- Generate code for actix-web 2.0 + + +## 0.1.3 - 2019-10-14 +- Bump up `syn` & `quote` to 1.0 +- Provide better error message + + +## 0.1.2 - 2019-06-04 +- Add macros for head, options, trace, connect and patch http methods + + +## 0.1.1 - 2019-06-01 +- Add syn "extra-traits" feature + + +## 0.1.0 - 2019-05-18 +- Release + + +## 0.1.0-beta.1 - 2019-04-20 +- Gen code for actix-web 1.0.0-beta.1 + + +## 0.1.0-alpha.6 - 2019-04-14 +- Gen code for actix-web 1.0.0-alpha.6 + + +## 0.1.0-alpha.1 - 2019-03-28 +- Initial impl diff --git a/LICENSE-APACHE b/LICENSE-APACHE new file mode 120000 index 0000000..965b606 --- /dev/null +++ b/LICENSE-APACHE @@ -0,0 +1 @@ +../LICENSE-APACHE \ No newline at end of file diff --git a/LICENSE-MIT b/LICENSE-MIT new file mode 120000 index 0000000..76219eb --- /dev/null +++ b/LICENSE-MIT @@ -0,0 +1 @@ +../LICENSE-MIT \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..81c0f41 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# actix-web-codegen + +> Routing and runtime macros for Actix Web with support for const routes. Fork of [actix-web-codegen](https://crates.io/crates/actix-web-codegen) + +## Documentation & Resources + +- [API Documentation](https://docs.rs/actix-web-codegen) TODO: replace with fork's documentation link +- Minimum Supported Rust Version (MSRV): 1.54 + +## Compile Testing + +Uses the [`trybuild`] crate. All compile fail tests should include a stderr file generated by `trybuild`. See the [workflow section](https://github.com/dtolnay/trybuild#workflow) of the trybuild docs for info on how to do this. + +[`trybuild`]: https://github.com/dtolnay/trybuild