Giter VIP home page Giter VIP logo

Comments (3)

denismerigoux avatar denismerigoux commented on June 13, 2024

Hi Franziskus, I'm afraid this one is going to be difficult to do.
i) if we split into two crates, we'll run into the Rust limitation that you can't implement a trait or make an impl block for a type that is not defined in your crate
ii) we can't retrieve the #[not_hacspec] attribute in external crates metadata, the attributes are compltely erased

The solution for enforcing this is to generate additional .json files containing a whitelist of functions in Hacspec, but this is a heavy machinery to implement and I didn't have the time to do it yet.

from hacspec.

franziskuskiefer avatar franziskuskiefer commented on June 13, 2024

Yeah, I just ran into this and figured that this is pretty bad user experience. I don't know if there's a low effort way to fix this. But we should have it on the list to fix.
Another idea would be to build the dependencies as part of cargo hacspec and compile out all functions with #[not_hacspec]. Then this would fail in the Rust build system already.

from hacspec.

denismerigoux avatar denismerigoux commented on June 13, 2024

Another idea would be to build the dependencies as part of cargo hacspec and compile out all functions with #[not_hacspec]. Then this would fail in the Rust build system already.

Hum it would not work with cargo hacspec but cargo build. You could feature-out the non-hacspec parts of hacspec lib. But then you could not include the testing code that needs the non-hacspec parts in the same crate.

from hacspec.

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.