Git Product home page Git Product logo

Comments (7)

jamwaffles avatar jamwaffles commented on June 10, 2024 1

Hey @theo-lightworks if you'd like to test the most recent master commit, it should hopefully fix your no_std issue. It's also now tested in CI so hopefully no regressions either!

from ethercrab.

jamwaffles avatar jamwaffles commented on June 10, 2024

Hey, thanks for opening the issue. Can you describe what the problem is a bit more please? I'm not sure I understand. Are you saying that ethercrab should only enable smoltcp/phy-raw_socket when using its std feature, or something else?

from ethercrab.

theo-lightworks avatar theo-lightworks commented on June 10, 2024

Hi, I was interested in testing ethercrab in a no_std environment, but one of the issues with that is that it is not possible to compile ethercrab for no_std as the phy-raw_socket feature of smoltcp is set as a required dependency of ethercrab.

from ethercrab.

jamwaffles avatar jamwaffles commented on June 10, 2024

Ah I think I see now, thanks! I've opened a fix in #58 which should fix this issue.

from ethercrab.

theo-lightworks avatar theo-lightworks commented on June 10, 2024

Hi @jamwaffles It does fix the build, but I have some issues related to async. I tried it with edge-executor, not sure if I am just doing something incorrectly though.

error: future cannot be sent between threads safely
   --> src/lib.rs:30:13
    |
30  |       e.spawn(async {
    |  _____________^
31  | |         setup().await;
32  | |     });
    | |_____^ future created by async block is not `Send`
    |
    = help: within `ethercrab::slave_group::configurator::SlaveGroupRef<'_>`, the trait `Sync` is not implemented for `UnsafeCell<ethercrab::slave_group::configurator::GroupInnerRef<'_>>`
note: future is not `Send` as this value is used across an await
   --> /home/theo/source/ethercrab/src/client.rs:263:73
    |
263 |             offset = unsafe { group.configure_from_eeprom(offset, self).await? };
    |                               -----                                     ^^^^^   - `group` is later dropped here
    |                               |                                         |
    |                               |                                         await occurs here, with `group` maybe used later
    |                               has type `&ethercrab::slave_group::configurator::SlaveGroupRef<'_>` which is not `Send`
note: required by a bound in `Executor::<'a, C, M, S>::spawn`

from ethercrab.

jamwaffles avatar jamwaffles commented on June 10, 2024

Glad to hear it fixes the build at least :). Do you have a full code example or a repository I could look at somewhere? It's difficult to see what the error might be without more context.

from ethercrab.

flaminggoat avatar flaminggoat commented on June 10, 2024

I made an example here, I've tried to use libraries that would work on no_std. It works with one executor but not the other https://github.com/flaminggoat/ethercat_no_std

from ethercrab.

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.