qir-alliance / pyqir

PyQIR is a set of APIs for generating, parsing, and evaluating Quantum Intermediate Representation (QIR).
https://qir-alliance.github.io/pyqir
MIT License
57 stars 24 forks source link

Migrate to Rust 2021 Edition #123

Closed idavis closed 1 year ago

idavis commented 2 years ago

With the release of Rust 1.56, the 2021 Rust Edition has been available. The there is a migration guide to new edition.

divshacker commented 2 years ago

Hey, I am interested in working on this issue. I have done a try updating the new version of rust but facing some errors.

Please help me out by resolving this error.

Thanks

idavis commented 2 years ago

Hi @divshacker, thank you for your interest.

Please take a look at the development guide on how to build PyQIR. The build script must be run prior to using cargo commands. Then you can use the commands in the development section of the docs.

If you want to use an existing installation of LLVM, you can set the environment variables so that the build doesn't have to compile LLVM.

divshacker commented 2 years ago

I have tried to run build.sh but it is exiting every time and not building the LLVM completely. First, I have tested it in my system, then I used docker and created the environment and ran build.sh but still throws error that cargo can't LLVM automatically. I don't know what happens but still this the problem. I think person who have already a working enviornment can run cargo fix --edition to fix this issue, I have tried to build a working environment but fail every time

idavis commented 2 years ago

@divshacker We need the exact command and error that you are getting. Also, cargo fix --edition will not work without the additional feature flags outlined in the documentation I linked to above.