Skip to content
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 replay command in MacOS #133

Merged
merged 3 commits into from
Jan 14, 2025
Merged

Fix replay command in MacOS #133

merged 3 commits into from
Jan 14, 2025

Conversation

gligneul
Copy link
Contributor

The replay command wasn't working on MacOS because the HostIO symbols were striped from cargo-stylus. To fix this issue, we have to disable stripping in the release profile.

This fixes introduces the following warning:

warning: profiles for the non root package will be ignored

We have to edit the profile in the non-root package because the root package is ignored during cargo install. Otherwise, the solution won't work after the package is published to crates.io. More information about this issue is available here:

The replay command wasn't working on MacOS because the HostIO symbols
were striped from cargo-stylus. To fix this issue, we have to disable
stripping in the release profile.

This fixes introduces the following warning:

    warning: profiles for the non root package will be ignored

We have to edit the profile in the non-root package because the root
package is ignored during cargo install. Otherwise, the solution won't
work after the package is published to crates.io. More information about
this issue is available here:

* rust-lang/cargo#8264
* rust-lang/cargo#11599
@gligneul gligneul requested a review from rauljordan January 10, 2025 17:25
@gligneul
Copy link
Contributor Author

Update: Raul released this branch as 0.5.7-alpha.1. I installed it with cargo install --force [email protected], and the binary was stripped regardless of the release profile.

Add #[used] static variables pointing to the exported functions so the
linked doesn't remove them from the final binary.
@gligneul gligneul requested a review from rauljordan January 14, 2025 14:33
@rauljordan rauljordan merged commit cdbc563 into main Jan 14, 2025
7 checks passed
@rauljordan rauljordan deleted the gligneul/fix/replay branch January 14, 2025 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants