Comments (1)
First of a short general remark, while we can push for making it possible to build crossplatform test this way they will never be runnable. For us the way forward is to build tests and use an external test harness, in the concrete case we are using the embedded-test crate for such adventures.
A current workaround to don't have rust-analyzer go insane on trying to build that tests the normal way is:
Explicitly tell it inside your Cargo.toml
by defining a section - depending on if you are building a lib, bin or a test - with the harness=false
field.
That will tell the system to not use the inbuilt rust test harness.
For your example project you would add a section like this
[[bin]]
name = "your project name"
harness = false
That said this answer is only trying to answer to the underlying issue of building test against espidf as a crossplatform target and
not going into the detail of defining the right or wrong things inside rust libc
from rust.
Related Issues (20)
- The `slice::chunks_exact` iterator does not optimize when the initial slice is non-empty
- Invalid cast error when trying to cast a closure to a function pointer should mention captured variables
- Bad codegen for `non-copy-derived` struct with all `Copy` derived fields HOT 9
- `choose_multiple_weighted` returns unexpect probability of result HOT 1
- Compiler crash when trying to compile a project with a lot of dependencies HOT 1
- `Result::unwrap()` on an `Err` value: ReferencesError(ErrorGuaranteed(())) HOT 1
- rustc fails to prove `Send`ness for an `async` block where a `!Send` value is dropped before an `.await` point HOT 2
- Async Borrowing Issue HOT 1
- compiler/rustc_borrowck/src/borrow_set.rs:250:17: found two uses for 2-phase borrow temporary HOT 1
- Tracking Issue for `unsigned_is_multiple_of`
- Runtime error using f64::sin in `wasm32` HOT 12
- Confusing error around 2024 impl trait lifetime capture HOT 2
- rustc 1.79.0 commit hash 129f3b996 not found in repo HOT 1
- ICE: delegation: index out of bounds
- `rustdoc`: "Methods from `Deref`" section references functions from completely unrelated types. HOT 3
- `asm` macro does not understand that enabling the target feature `avx2` implies `avx`
- Decide on bounds syntax for async closures (RFC 3668) HOT 2
- Non-fatal error while running a specific `cargo check` command HOT 3
- Add diagnostic hint when or-ing values which may be missing an equality comparison
- `.eh_frame` is emitted for `-C panic=abort` on (at least) `i686-pc-windows-gnu` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.