-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix "debug_assertions" in Cargo.toml #13
Comments
@avacore1337 , are you able to describe to me in a "explain it like I'm 5" manner what the I ask because I did implement it locally, but I have no idea what changed. 😊 |
If you build the game for release, the debug menu disappears. |
Thank you. I'll try doing dev & release build with how it is right now, then compare with the version following new guidance. I will try to ensure both dev & release demonstrate same handling of debug menu. Thank you for the dumbed-down version -- just what I needed. |
Finally carving out some time to tinker on this. Right now, I understand how to get both the dev (with debug) and prod (no debug) versions up and running with original code. I am about to confirm that when I put the changes back in place, the code still builds & operates as expected. |
Update Cargo.toml & src/lib.rs to reflect new guidance on implementing console_error_panic_hook. Changes were tested by: - npm run start - visual confirmation that dev site still has debug - npm run start:dist - visual confirmation that dist site does NOT have debug Also: - add scripts to package.json - start:dist ...& ref in readme - clean ...& use it in other npm scripts - tidy build.rs & add comments - edit readme: npm run-script -> npm run - minor edit to test, to appease rust-analyzer - fix clippy warning in info.rs
PR #19 closes this issue. |
issue #13, fix "debug_assertions" in Cargo.toml
This issue is a carry-over from Issue #9 . Pasting relevant information below:
Cargo.toml
file contains adebug_assertions
section, which results in warnings: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.
The text was updated successfully, but these errors were encountered: