Git Product home page Git Product logo

Comments (11)

crumblingstatue avatar crumblingstatue commented on July 3, 2024 1

I believe this issue can be closed now, unless we want to keep it open for tracking the winapi-rs pull request.

from druid.

IslandUsurper avatar IslandUsurper commented on July 3, 2024

@vi, does it work for other examples? I have the same issue when I tried to use druid in my own project.

from druid.

IslandUsurper avatar IslandUsurper commented on July 3, 2024

Of course it doesn't. druid_win_shell doesn't compile, so nothing that relies on it can compile.

from druid.

vi avatar vi commented on July 3, 2024

@IslandUsurper , Does it work if you patch druid, adding that as i32?

from druid.

IslandUsurper avatar IslandUsurper commented on July 3, 2024

I'm sure it does, but I don't think that's the right solution. Instead, it looks like winapi needs to fix how it defines SetWindowLongPtrW (and friends) on x86 arch. Right now it aliases it to SetWindowLongW (etc), but that function takes a LONG instead of a LONG_PTR, which is what's going to be passed to it. And Rust doesn't consider isize and i32 to be the same type, even when they are the same size.

from druid.

IslandUsurper avatar IslandUsurper commented on July 3, 2024

I'm going to check this theory, and if it works, I'll file a PR against winapi and link it here.

from druid.

IslandUsurper avatar IslandUsurper commented on July 3, 2024

retep998/winapi-rs#735 is now a thing.

from druid.

raphlinus avatar raphlinus commented on July 3, 2024

@IslandUsurper Thanks for looking into this! It's not obvious to me whether this should be solved in winapi or at the next level above, but sounds like we have at the very least a plausible solution.

from druid.

crumblingstatue avatar crumblingstatue commented on July 3, 2024

This is still a problem. I ran into this while trying to cross-compile for i686-pc-windows-gnu.
Changing it to style as _ makes it work.
If I submit a pull request with that change, would it be acceptable?

from druid.

cmyr avatar cmyr commented on July 3, 2024

@crumblingstatue I would accept that PR.

from druid.

cmyr avatar cmyr commented on July 3, 2024

I think our solution is acceptable long-term.

from druid.

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.