Comments (7)
@jasta could you help here, seeing as you wrote the ESP-IDF implementation?
from mio.
after several checks i found issues in the configuration of CMakeLists.txt in my project because i was using esp-idf version < 5.x causing a compilation without rustflags.
mio_unsupported_force_poll_poll works perfectly for mio in espidf target, sorry for the inconvenience!
from mio.
I would like to add more information, i am using esp-idf-template for generating the project. thus, cargo is invoked by cmake to build the component.
the Cargo.toml is:
[package]
name = "rust-esp-async-nats"
version = "0.1.0"
authors = ["javoerro"]
edition = "2021"
resolver = "2"
rust-version = "1.71"
[lib]
crate-type = ["staticlib"]
[profile.release]
opt-level = "s"
[profile.dev]
debug = true # Symbols are nice and they don't increase the size on Flash
opt-level = "z"
[features]
default = ["std", "embassy", "esp-idf-svc/native"]
pio = ["esp-idf-svc/pio"]
std = ["alloc", "esp-idf-svc/std"]
alloc = ["esp-idf-svc/alloc"]
nightly = ["esp-idf-svc/nightly"]
experimental = ["esp-idf-svc/experimental"]
embassy = ["esp-idf-svc/embassy-sync", "esp-idf-svc/critical-section", "esp-idf-svc/embassy-time-driver"]
[dependencies]
log = { version = "0.4", default-features = false }
esp-idf-svc = { version = "0.47.1", default-features = false }
tokio = { version = "1.35.1", features = ["rt"] }
futures = "0.3.30"
async-nats = "0.33.0"
bytes = "1.5.0"
anyhow = "1"
[build-dependencies]
embuild = { version = "0.31.4", features = ["elf"] }
from mio.
Hello,
I have the same problem as @javoerro writing a project in rust for esp32 while compiling xmpp.
Can anyone help me to fix that? Which parts in CMakeLists.txt do I have to change?
Thanks
from mio.
@lorenzo-pirchio after #1789 no extra flags will be needed, but until that makes it to a release you'll need to set RUSTFLAGS='--cfg mio_unsupported_force_poll_poll'
.
from mio.
@Thomasdezeeuw Should I add this line in my Espressif folder or my project folder?
Since I changed the Cargo target directory to another folder, because I had problems with Windows, which folder should I consider?
I found different CMakeList.txt in the project.
Could you tell me which one precisely should I add the line you wrote to?
I'm sorry for asking so many questions, but I just started working on both rust and esp32.
Thanks
from mio.
@lorenzo-pirchio I don't develop for ESP myself, so I can't tell you exactly where to add it.
from mio.
Related Issues (20)
- why is it possible to create a mio TcpStream from std TcpStream but going the other way around is unsafe? HOT 13
- peek blocks after read on windows HOT 7
- Poll changing interest of server socket on Windows HOT 1
- Cannot continue listen! HOT 2
- Walker failure on Linux HOT 6
- Crash at GetQueuedCompletionStatusEx in dll HOT 4
- Is the implementation of the timer incomplete? HOT 1
- TCP listener via wasm HOT 1
- Compiling mio in AIX fails HOT 5
- sendmmsg / recvmmg support HOT 1
- Reading into BytesMut always returns 0 bytes read HOT 3
- README mentions a v1 that doesn't exist HOT 5
- Switch to libc for Hermit HOT 1
- Use std::os::fd on Hermit
- mio does not build for aarch64-apple-visionos HOT 8
- Conditional reregistering interests in `IoSourceState` with `mio_unsupported_force_poll_poll` poll(2) based on IO operation result HOT 5
- Why Wine 6.11+ support was dropped? HOT 3
- Porting tokio to mio 1.0 HOT 1
- Windows named pipes hits unreachable code during read operation HOT 5
- how to manage blocking writes? 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 mio.