Skip to content

Commit d4b7a49

Browse files
authored
Fully cut over to tokio (#211)
Cut over to [email protected]. 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
1 parent 6713aaf commit d4b7a49

38 files changed

+1583
-1677
lines changed

.github/workflows/ci.yaml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ jobs:
8686
uses: actions/checkout@v2
8787

8888
- name: Setup | Cache Cargo
89-
# WHY? Because we are getting: error[E0463]: can't find crate for `structopt_derive` which `structopt` depends on
90-
# only on macos when using the cache.
91-
if: matrix.os != 'macos-latest'
9289
uses: actions/cache@v2
9390
with:
9491
path: |
@@ -102,10 +99,10 @@ jobs:
10299
- name: Setup | Cache Examples
103100
uses: actions/cache@v2
104101
with:
105-
path: examples/yew/target
106-
key: wasm32-example-yew-debug-${{ hashFiles('examples/yew/Cargo.lock') }}
102+
path: examples/proxy/target
103+
key: wasm32-example-proxy-debug-${{ hashFiles('examples/proxy/Cargo.lock') }}
107104
restore-keys: |
108-
wasm32-example-yew-debug-
105+
wasm32-example-proxy-debug-
109106
110107
- name: Setup | Cache Examples
111108
uses: actions/cache@v2
@@ -123,6 +120,14 @@ jobs:
123120
restore-keys: |
124121
wasm32-example-vanilla-debug-
125122
123+
- name: Setup | Cache Examples
124+
uses: actions/cache@v2
125+
with:
126+
path: examples/yew/target
127+
key: wasm32-example-yew-debug-${{ hashFiles('examples/yew/Cargo.lock') }}
128+
restore-keys: |
129+
wasm32-example-yew-debug-
130+
126131
- name: Setup | Rust
127132
uses: actions-rs/toolchain@v1
128133
with:
@@ -139,8 +144,10 @@ jobs:
139144

140145
# Build examples via our newly built debug artifact.
141146
- name: Build | Examples
142-
run: ${{ matrix.binPath }} --config=examples/yew/Trunk.toml build
147+
run: ${{ matrix.binPath }} --config=examples/proxy/Trunk.toml build
143148
- name: Build | Examples
144149
run: ${{ matrix.binPath }} --config=examples/seed/Trunk.toml build
145150
- name: Build | Examples
146151
run: ${{ matrix.binPath }} --config=examples/vanilla/Trunk.toml build
152+
- name: Build | Examples
153+
run: ${{ matrix.binPath }} --config=examples/yew/Trunk.toml build

CHANGELOG.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,18 @@ This changelog follows the patterns described here: https://keepachangelog.com/e
55
Subheadings to categorize changes are `added, changed, deprecated, removed, fixed, security`.
66

77
## Unreleased
8-
### added
9-
- Closed [#168](https://github.com/thedodd/trunk/issues/158): RSS feed for blog
8+
9+
## 0.13.0
10+
- Trunk has been fully cut over to [email protected].
11+
- As part of the Tokio cut over, the Trunk network stack is now fully based on Axum.
12+
- 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.
13+
- 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.
14+
- 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`.
15+
- This is expected functionality for SPAs which are using client side routing.
16+
- 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.
17+
- Added a new `proxy` example which demonstrates all functionality of the Trunk proxy system.
18+
- 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.
19+
- Closed [#168](https://github.com/thedodd/trunk/issues/158): RSS feed for blog.
1020

1121
## 0.12.1
1222
### fixed

0 commit comments

Comments
 (0)