near / cargo-near

Cargo extension for building Rust smart contracts on NEAR
Apache License 2.0
34 stars 17 forks source link

chore: add `package.cargo-near.debug = true` to release profile #195

Closed dj8yfo closed 3 months ago

dj8yfo commented 3 months ago

it was noticed that default suggestions to enable backtrace only produce confusion, as backtrace info without source code is more confusing than helpful:

current (in main) RUST_BACKTRACE=1 cargo near build backtrace_current_release_build_1 current (in main) RUST_BACKTRACE=full cargo near build current_full


from this pr RUST_BACKTRACE=1 cargo near build 1_after_change from this pr RUST_BACKTRACE=full cargo near build after_full

this beefs up the binary size twice, doing a plain debug = true for release profile results in 250 MB binary

# installed with
# cargo install --locked --path cargo-near
❯ du -sk $(which cargo-near)
28984   /home/jerrick/.cargo/bin/cargo-near
# installed with (`package.cargo-near.debug = true`)
# cargo install --locked --path cargo-near
❯ du -sk $(which cargo-near)
51236   /home/jerrick/.cargo/bin/cargo-near

alternative to this is #196

dj8yfo commented 3 months ago

@race-of-sloths include

race-of-sloths commented 3 months ago

@dj8yfo Thank you for your contribution! Your pull request is now a part of the Race of Sloths! Are you going to win race-of-sloths this month? If so, you should speed up! Run, Sloth, run!

[

<source media="(prefers-color-scheme: light)" srcset="https://badge.race-of-sloths.com/dj8yfo?type=bot&theme=light">
<img alt="Shows profile picture for the author of the PR" src="https://badge.race-of-sloths.com/dj8yfo?type=bot&theme=white">

](https://race-of-sloths.com/profile/dj8yfo)

Current status: stale This pull request was removed from the race, but you can include it again with `@race-of-sloths include` command
What is the Race of Sloths

Race of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors: - Tag @race-of-sloths inside your pull requests - Wait for the maintainer to review and score your pull request - Check out your position in the [Leaderboard](https://race-of-sloths.com/leaderboard) - Keep weekly and monthly streaks to reach higher positions - Boast your contributions with a dynamic picture of your [Profile](https://race-of-sloths.com/profile/dj8yfo) For maintainers: - Score pull requests that participate in the Race of Sloths - Engage contributors with fair scoring and fast responses so they keep their streaks - Promote the Race to the point where the Race starts promoting you - Grow the community of your contributors Feel free to check [our website](https://race-of-sloths.com) for additional details!

Bot commands - For contributors - **Include a PR:** `@race-of-sloths include` to enter the Race with your PR - For maintainers: - **Invite contributor** `@race-of-sloths invite` to invite the contributor to participate in a race or include it, if it's already a runner. - **Assign points:** `@race-of-sloths score [1/2/3/5/8/13]` to award points based on your assessment. - **Reject this PR:** `@race-of-sloths exclude` to send this PR back to the drawing board. - **Exclude repo:** `@race-of-sloths pause` to stop bot activity in this repo until `@race-of-sloths unpause` command is called
frol commented 3 months ago

See https://github.com/near/cargo-near/pull/196#pullrequestreview-2222327837