fix(examples): fix compilation errors in examples #3787
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



Hi Greg,
The examples
hacknewsandhacknews_axum, who can be used within bothcsrandssrmode, raise error duringtrunk servewith latestcargo:My output of
cargo --version:While the error also occurs with
1.81.0-nightly(a2b58c3da 2024-07-16).Though it's raised by
trunk, people believe it's a cargo problem: trunk-rs/trunk#740.It seems cargo used to produce duplicate artifacts but the checking rules may be changed at some time: rust-lang/cargo#6313 (comment)
To fix it, I explicitly defined the binary artifact name and specified the name in
index.html. I'm not sure if it's the best way though 😅Also, the
simple_loggerwas removed from the examplecounter_isomorphic, which indeed was not needed before, but somehow cause another compilation error: