Skip to content

fix "debug_assertions" in Cargo.toml #13

@dimitrilw

Description

@dimitrilw

This issue is a carry-over from Issue #9 . Pasting relevant information below:

Cargo.toml file contains a debug_assertions section, which results in warnings:
image

The URL ref'd in the warning is:
https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies

That page explains how making a cfg(debug_assertions) doesn't work as anticipated.

In addition, this issue in the rust-webpack-template repo explains that this needs to be removed from the walk-through because it is misleading. And it was removed. The current walk-through contains this updated guidance:
https://rustwasm.github.io/wasm-pack/book/tutorials/npm-browser-packages/template-deep-dive/cargo-toml.html#3-features-and-wee_alloc-console_error_panic_hook-dependencies

However, I am not 100% confident about implementing the solution. When I followed the new guidance, it did appear to work, but I lack the familiarity with the build-n-deploy chain, so my confidence is lacking. Therefore, I submitted PR #12 to close out Issue #9 and added this issue to track the remaining task. I intend to loop back to this issue after gaining more confidence with this repo, Rust, and the build process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions