Code Monkey home page Code Monkey logo

Comments (7)

taiki-e avatar taiki-e commented on June 1, 2024 1

While the MSRV of crossbeam is lower than 1.60.0, it should be possible to use the hard coded list as fallback when the rustc version is too old for stable cfg(target_has_atomic).

This is an approach I have previously explicitly stated I accept and would accept a PR that implements this.
#937 (comment)

from crossbeam.

bjorn3 avatar bjorn3 commented on June 1, 2024

cc rust-lang/rust#117170 (comment)

from crossbeam.

bjorn3 avatar bjorn3 commented on June 1, 2024

Do you know how to handle cfg(not(crossbeam_no_atomic_cas))? Use cfg(target_has_atomic="ptr")?

from crossbeam.

taiki-e avatar taiki-e commented on June 1, 2024

Use cfg(target_has_atomic="ptr")?

Yes.

  • not(crossbeam_no_atomic_cas) corresponds to target_has_atomic = "ptr".
  • not(crossbeam_no_atomic_64) (almost) corresponds to target_has_atomic = "64". (To be precise, it is closer to unstable target_has_atomic_load_store = "64", but currently, the only time the two would actually have different meanings is when using a custom no-std target.)
  • not(crossbeam_no_atomic) (almost) corresponds to unstable target_has_atomic_load_store = "ptr". There is no stable alternative to this, so I think this may require continuing to use our own cfg. This cfg only affects some no-std targets.

from crossbeam.

bjorn3 avatar bjorn3 commented on June 1, 2024

Is adding autocfg as build dependency to the crates that don't have it yet fine?

from crossbeam.

taiki-e avatar taiki-e commented on June 1, 2024

Yeah, it's fine.

That said, given that #1015 will increase MSRV to 1.59, it would also actually be fine to increase MSRV to 1.60 or 1.61 and remove the need for build scripts. (I had forgotten about that PR when I first commented in this issue.)

from crossbeam.

bjorn3 avatar bjorn3 commented on June 1, 2024

I think I will wait for that PR.

from crossbeam.

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.