Skip to content

Commit

Permalink
Fully cut over to tokio (#211)
Browse files Browse the repository at this point in the history
Cut over to notify@0.5.0-pre.11. Much more simple interface, and works
quite nicely with the async ecosystem.

Cut over to axum for web server. Much better!

The updated server stack is now more intelligently handling 404s. This
is a common issue where users may end up making a request for some
non-html static asset, but they get their path slightly wrong and are
served the index.html instead of a 404.

This typically results in users struggling to find the problem, and
often times users have opened issues in GH. This updated algorithm will
now evaluate 404s more closely and only respond with the index.html when
the `accept` header allows for text/html or */*.

Added an example demonstrating all proxy functionality.

closes #198
closes #202
closes #209
  • Loading branch information
thedodd committed Aug 5, 2021
1 parent 6713aaf commit d4b7a49
Show file tree
Hide file tree
Showing 38 changed files with 1,583 additions and 1,677 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/ci.yaml
Expand Up @@ -86,9 +86,6 @@ jobs:
uses: actions/checkout@v2

- name: Setup | Cache Cargo
# WHY? Because we are getting: error[E0463]: can't find crate for `structopt_derive` which `structopt` depends on
# only on macos when using the cache.
if: matrix.os != 'macos-latest'
uses: actions/cache@v2
with:
path: |
Expand All @@ -102,10 +99,10 @@ jobs:
- name: Setup | Cache Examples
uses: actions/cache@v2
with:
path: examples/yew/target
key: wasm32-example-yew-debug-${{ hashFiles('examples/yew/Cargo.lock') }}
path: examples/proxy/target
key: wasm32-example-proxy-debug-${{ hashFiles('examples/proxy/Cargo.lock') }}
restore-keys: |
wasm32-example-yew-debug-
wasm32-example-proxy-debug-
- name: Setup | Cache Examples
uses: actions/cache@v2
Expand All @@ -123,6 +120,14 @@ jobs:
restore-keys: |
wasm32-example-vanilla-debug-
- name: Setup | Cache Examples
uses: actions/cache@v2
with:
path: examples/yew/target
key: wasm32-example-yew-debug-${{ hashFiles('examples/yew/Cargo.lock') }}
restore-keys: |
wasm32-example-yew-debug-
- name: Setup | Rust
uses: actions-rs/toolchain@v1
with:
Expand All @@ -139,8 +144,10 @@ jobs:

# Build examples via our newly built debug artifact.
- name: Build | Examples
run: ${{ matrix.binPath }} --config=examples/yew/Trunk.toml build
run: ${{ matrix.binPath }} --config=examples/proxy/Trunk.toml build
- name: Build | Examples
run: ${{ matrix.binPath }} --config=examples/seed/Trunk.toml build
- name: Build | Examples
run: ${{ matrix.binPath }} --config=examples/vanilla/Trunk.toml build
- name: Build | Examples
run: ${{ matrix.binPath }} --config=examples/yew/Trunk.toml build
14 changes: 12 additions & 2 deletions CHANGELOG.md
Expand Up @@ -5,8 +5,18 @@ This changelog follows the patterns described here: https://keepachangelog.com/e
Subheadings to categorize changes are `added, changed, deprecated, removed, fixed, security`.

## Unreleased
### added
- Closed [#168](https://github.com/thedodd/trunk/issues/158): RSS feed for blog

## 0.13.0
- Trunk has been fully cut over to Tokio@1.x.
- As part of the Tokio cut over, the Trunk network stack is now fully based on Axum.
- All download utilities have been made fully async. This will likely help us in the future as we continue to leverage this functionality more and more.
- Added a new CLI option `trunk clean -t/--tools` which will optionally clean/remove any cached tools used by Trunk, such as `wasm-bindgen` & `wasm-opt`. This may be useful if there are ever issues with old tools which need to be removed.
- Fixed [#198](https://github.com/thedodd/trunk/issues/198) which was a long-standing issue with the static file server. In essence, Trunk will now check the `accept` header of any `GET` request matching the static file server, and if the requested asset does not exist and the `accept` header allows either `*/*` or `text/html`, then return the `index.html`.
- This is expected functionality for SPAs which are using client side routing.
- This reduces the friction which has often been observed with Trunk where a user is expecting a 404 to be served when requesting a static image, CSS, or some other asset. With this update, 404s will now be returned as expected, and the `index.html` should only be returned for applicable cases.
- Added a new `proxy` example which demonstrates all functionality of the Trunk proxy system.
- Fixed [#209](https://github.com/thedodd/trunk/issues/209) where the default Rust App pipeline was causing wasm-opt to be used even for debug builds when the Rust App HTML link was being omitted.
- Closed [#168](https://github.com/thedodd/trunk/issues/158): RSS feed for blog.

## 0.12.1
### fixed
Expand Down

0 comments on commit d4b7a49

Please sign in to comment.