Skip to content

Generate a no_std binary for test crate#60

Closed
hannobraun wants to merge 1 commit into
dtolnay:masterfrom
braun-embedded:no-std-main
Closed

Generate a no_std binary for test crate#60
hannobraun wants to merge 1 commit into
dtolnay:masterfrom
braun-embedded:no-std-main

Conversation

@hannobraun

Copy link
Copy Markdown
Contributor

When using trybuild with a target that doesn't support the standard
library, the previous main.rs would not compile. This new one is less
demanding, and works in such a scenario.

When using trybuild with a target that doesn't support the standard
library, the previous `main.rs` would not compile. This new one is less
demanding, and works in such a scenario.
@hannobraun

Copy link
Copy Markdown
Contributor Author

Travis fails with an error that I didn't catch locally. I'm currently investigating.

@hannobraun

Copy link
Copy Markdown
Contributor Author

I don't think this approach can work. It just happened to work when I tested it in my project, I'm guessing because everything there is set up for cross-compilation to a microcontroller target. It won't work when running cargo test in a regular project.

The compiler error could be fixed by setting panic = "abort" in Cargo.toml, but I don't think that's the right thing to do.

I'm closing this pull request and will open an issue to propose another solution to fix my problem.

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.

1 participant