Giter Site home page Giter Site logo

Comments (9)

dtolnay avatar dtolnay commented on June 18, 2024 1

Thanks -- Personally I don't use lexical-core so I don't have any stake in a release. I fixed this a long time ago on my end in serde-rs/json@6e00729. Serde uses a fork because I wasn't confident in the maintenance of this crate.

from rust-lexical.

myrrlyn avatar myrrlyn commented on June 18, 2024

Is this the correct resolution?

from rust-lexical.

dtolnay avatar dtolnay commented on June 18, 2024

No. The target arch of the build script should have no bearing. Only the target arch which the library is being built for is relevant.

from rust-lexical.

dtolnay avatar dtolnay commented on June 18, 2024

In other words absence of CARGO_CFG_TARGET_ARCH needs to be either a build error (preferred), or should guess a consistent limb width regardless of what the host architecture happens to be.

from rust-lexical.

myrrlyn avatar myrrlyn commented on June 18, 2024

I was about to ask what the resolution should be in the Err case. I'll fail the build.

from rust-lexical.

myrrlyn avatar myrrlyn commented on June 18, 2024

Once you're satisfied that this is correct, I'll publish an update, probably in May.

I don't know the versioning history of lexical-core or what its current dependents are. Do you know of a need for me to backport to 0.6, or will an 0.7 patch release suffice?

from rust-lexical.

Alexhuszagh avatar Alexhuszagh commented on June 18, 2024

@dtolnay I'm glad it was of use to you, sorry, for mental health reasons I haven't exactly been the best maintainer so I'm very glad an adaptation has suited your needs. Thank you for reporting this.

Are there any cases where CARGO_CFG_TARGET_ARCH will not be defined? If so, it's pretty easy to default to 32-bit limbs if the environment variable is not set. We use an optimization when 64-bit integer operations are faster on the CPU, but if that's unknown, it would be better to default to 32-bit limbs than error during build.

from rust-lexical.

Alexhuszagh avatar Alexhuszagh commented on June 18, 2024

I think I've satisfactorily fixed this issue. I've removed the target_arch of the build script from build.rs, and defaulted to 32-bit limbs if CARGO_CFG_TARGET_ARCH is not set, since that should be reasonably performant on most architectures.

from rust-lexical.

Alexhuszagh avatar Alexhuszagh commented on June 18, 2024

Closed as of v0.4.8, v0.5.1, v0.6.8, and v0.7.6.

from rust-lexical.

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.