Giter Club home page Giter Club logo

Comments (7)

Thomasdezeeuw avatar Thomasdezeeuw commented on September 24, 2024 1

@jasta could you help here, seeing as you wrote the ESP-IDF implementation?

from mio.

javoerro avatar javoerro commented on September 24, 2024 1

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.

javoerro avatar javoerro commented on September 24, 2024

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.

lorenzo-pirchio avatar lorenzo-pirchio commented on September 24, 2024

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.

Thomasdezeeuw avatar Thomasdezeeuw commented on September 24, 2024

@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.

lorenzo-pirchio avatar lorenzo-pirchio commented on September 24, 2024

@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.

Thomasdezeeuw avatar Thomasdezeeuw commented on September 24, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.