Code Monkey home page Code Monkey logo

Comments (5)

LeonMatthes avatar LeonMatthes commented on June 7, 2024 1

Thanks for the report, seems like other linux distros are also affected. I fixed it in master and published a new version to crates.io

Hi @ruabmbua

Thank you for the very quick response.

Unfortunately, the new version is missing the enet_sys::size_t type.
That means that switching from 1.0.1 to 1.0.2 is a breaking change!

You could work around this as mentioned by adding:

/// enet's size_t type, now replaced by simply using usize.
///
/// Provided for backwards-compatibility.
#[deprecated]
pub type size_t = usize;

to src/lib.rs.

Could you redact version 1.0.2 and push version 1.0.3 with the type alias added?
That will fix it.

from enet-sys.

spearman avatar spearman commented on June 7, 2024

I believe it's fixed by this bindgen pull request: rust-lang/rust-bindgen#2319

You can try my master fork commit, there is a small change in lib.rs as it seems latest bindgen outputs usize instead of size_t: spearman@cccd979

from enet-sys.

LeonMatthes avatar LeonMatthes commented on June 7, 2024

@spearman Thanks a lot, that does indeed fix it. 🥳

I'm currently working on my fork of https://github.com/futile/enet-rs/ where enet_sys::size_t is actually used a lot.
Could you open a PR for this main repository with your changes, and a type alias to pub type size_t = usize for backwards compatability?
Would love for these changes to end up on crates.io, so I can also version-bump enet-rs.

from enet-sys.

ruabmbua avatar ruabmbua commented on June 7, 2024

Thanks for the report, seems like other linux distros are also affected. I fixed it in master and published a new version to crates.io

from enet-sys.

spearman avatar spearman commented on June 7, 2024

I'm currently working on my fork of https://github.com/futile/enet-rs/ where enet_sys::size_t is actually used a lot.
Could you open a PR for this main repository with your changes, and a type alias to pub type size_t = usize for backwards compatability?
Would love for these changes to end up on crates.io, so I can also version-bump enet-rs.

I haven't used that crate, I have my own wrapper here https://github.com/spearman/enet-rs I think at the time I started working on it enet had not been published to crates.io. I am coming back to it now and I am not sure if I'm going to switch yet.

from enet-sys.

Related Issues (9)

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.