Code Monkey home page Code Monkey logo

Comments (8)

jacobrosenthal avatar jacobrosenthal commented on May 28, 2024 1

Thanks for the quick reply. Ill be watching and give a test when I see it come through

from rppal.

golemparts avatar golemparts commented on May 28, 2024

Thanks for the question! Currently RPPAL only implements the "proven" embedded-hal traits. For the GPIO module that would be digital::OutputPin and PwmPin for OutputPin and IoPin.

The remaining GPIO related traits are all unproven traits, unless I missed one by mistake. Initially I was hesitant to implement those, since they don't follow semver rules and could introduce breaking changes even in patch releases. However, since many of them make sense to add support for, I've decided to put them behind an additional opt-in feature flag as part of the 0.11.2 release that's currently in development. I'll be starting on those after I'm finished with the UART module, likely in the next week or so.

from rppal.

golemparts avatar golemparts commented on May 28, 2024

@jacobrosenthal I've implemented all unproven embedded-hal traits for Pin, InputPin, OutputPin and IoPin where applicable, on the master branch. Feel free to give them a try by enabling the hal-unproven feature flag.

I still need to go through the other peripherals, as well as add generic delay/rng implementations, but this should help you with your project.

from rppal.

jacobrosenthal avatar jacobrosenthal commented on May 28, 2024

The input pin is working for my uses
https://github.com/jacobrosenthal/rust-bitbang-wiegand

from rppal.

jacobrosenthal avatar jacobrosenthal commented on May 28, 2024

ws-rs was giving me trouble with libc, it wants 0.2.40
https://github.com/housleyjk/ws-rs/blob/master/Cargo.toml#L32

Though I had to drop back the libc version so I could use ws-rs
jacobrosenthal@31c2a6a

How is this thing generally handled in the Rust ecosystem?

from rppal.

golemparts avatar golemparts commented on May 28, 2024

Glad to hear the unproven traits are helpful.

Regarding the libc version, assuming the libc crate follows semver rules, 0.2.50 doesn't contain any breaking changes compared to 0.2.40. The "0.2.40" libc version dependency for ws-rs is equivalent to "^0.2.40", which also matches 0.2.50, so there shouldn't be a need to downgrade rppal's libc dependency. Cargo should be using 0.2.50 for both. What kind of issues/errors did you run into?

from rppal.

jacobrosenthal avatar jacobrosenthal commented on May 28, 2024
error: failed to select a version for `libc`.
    ... required by package `rppal v0.11.1 (https://github.com/golemparts/rppal.git#f25e302a)`
    ... which is depended on by `bitbang-wiegand v0.1.0 (https://github.com/jacobrosenthal/rust-bitbang-wiegand.git#0ee1fb23)`
    ... which is depended on by `littlebird-backend v0.1.0 (/Users/jacobrosenthal/Downloads/access-control-software/backend)`
versions that meet the requirements `^0.2.50` are: 0.2.50

all possible versions conflict with previously selected packages.

  previously selected package `libc v0.2.43`
    ... which is depended on by `rppal v0.11.1`
    ... which is depended on by `littlebird-backend v0.1.0 (/Users/jacobrosenthal/Downloads/access-control-software/backend)`

from rppal.

golemparts avatar golemparts commented on May 28, 2024

I'm not sure what would cause that issue in this situation, unless either littlebird-backend or one of its other dependencies has a strict libc requirement not to go passed 0.2.43. ws-rs requires ^0.2.40, so it should build fine with rppal's ^0.2.50 requirement.

Perhaps the Cargo.lock for your project was created before you added rppal as a dependency, and it's still pointing to a libc 0.2.43 requirement. Running cargo update should fix that.

I haven't run into this kind of version conflict before myself, but based on what you've shared, and if the issue isn't caused by an out of date Cargo.lock, I would look for the source of the conflict in another crate that also depends on libc besides rppal and ws-rs. I suspect you haven't run into issues with ws-rs before, because its ^0.2.40 requirement is compatible with the 0.2.43 requirement of this suspected other crate. You might be able to find the cause by searching your Cargo.lock file for libc dependencies. cargo tree might make it easier to visualize all the dependencies.

I just built a basic test project that depends on both the current rppal version on GitHub, and the latest ws-rs with all features enabled so libc is included. Cargo selected libc 0.2.50, and I didn't encounter any errors while building the project.

from rppal.

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.