Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Replace reqwest with ureq
Browse files Browse the repository at this point in the history
ureq has less dependencies, builds faster and builds statically out of
the box; we no longer need the reqwest feature nor require curl in
static builds.

The only drawback is that we now have to deal with proxies manually.
  • Loading branch information
swsnr committed Oct 26, 2020
1 parent 5d46f73 commit 6fbb20a
Show file tree
Hide file tree
Showing 9 changed files with 365 additions and 626 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Expand Up @@ -14,7 +14,6 @@ jobs:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
flags: --no-default-features
- os: macOS-latest
target: x86_64-apple-darwin
- os: windows-latest
Expand All @@ -37,7 +36,7 @@ jobs:
shell: bash
id: build
run: |
OUTDIR="$(cargo build --locked --target '${{ matrix.target }}' ${{ matrix.flags }} --release --message-format=json-render-diagnostics |
OUTDIR="$(cargo build --locked --target '${{ matrix.target }}' --release --message-format=json-render-diagnostics |
jq -r 'select(.out_dir) | select(.package_id | startswith("mdcat ")) | .out_dir')"
echo "::set-output name=outdir::$OUTDIR"
- name: Strip binary
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/test.yml
Expand Up @@ -66,7 +66,6 @@ jobs:
os: ubuntu-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
flags: --no-default-features
- target: x86_64-apple-darwin
os: macOS-latest
- target: x86_64-pc-windows-msvc
Expand Down Expand Up @@ -98,22 +97,22 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --all-targets --locked --target ${{ matrix.target }} ${{ matrix.flags }}
args: --all-targets --locked --target ${{ matrix.target }}
# Lint
- name: Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --locked --target ${{ matrix.target }} ${{ matrix.flags }}
args: --all-targets --locked --target ${{ matrix.target }}
name: clippy-${{ matrix.rust}}-${{ matrix.target }}
# Test
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --locked --target ${{ matrix.target }} ${{ matrix.flags }}
args: --locked --target ${{ matrix.target }}
- name: Format sample
uses: actions-rs/cargo@v1
with:
command: run
args: --target ${{ matrix.target }} ${{ matrix.flags }} -- sample/common-mark.md
args: --target ${{ matrix.target }} -- sample/common-mark.md
10 changes: 10 additions & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,16 @@ To publish a new release run `scripts/release` from the project directory.

## [Unreleased]

### Changed
- Replace `reqwest` with `ureq` to fetch images via HTTP/HTTPS (see [GH-169]);
the latter has considerably less dependencies and builds faster.
It also builds statically out of the box, hence the static musl builds no longer require `curl` to fetch images.

### Removed
- The `reqwest` cargo feature, see above and [GH-169].

[GH-169]: https://github.com/lunaryorn/mdcat/pull/169

## [0.22.1] – 2020-10-17

### Fixed
Expand Down

0 comments on commit 6fbb20a

Please sign in to comment.