rigetti / rigetti/libquil-sys

Commit generated bindings to repo

Open
#48 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1
Forks
0
Avg merge
18m
Merged PRs (30d)
1

Description

We would like to make the Python UX as easy as possible. One issue we will have is with pyQuil: we want uses to be able to use pyQuil with or without libquil available. If libquil is installed on their system and they want to use it -- awesome. But if libquil is not available on their system, they should still be able to pip install pyquil without issue.

The problem arises in this situation:

  • user runs pip install pyquil
  • pyquil depends on qcs-sdk-python
  • qcs-sdk-python will need to be compiled with libquil support (as there is no way to configure this with the Python package system)
  • qcs-sdk-python will look for libquil.h in order to generate its bindings

If the user has not installed libquil, the final step will fail.

One way I see around this is to remove the need to generate the bindings at compile time, by having them stored in the libquil-sys repo. We have done this in other projects: in build.rs support a feature flag which turns on the binding generator if they need to be regenerated. Otherwise, the bindings are loading from the repo (with include_file!()).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in build.rs and inspect how libquil.h is currently used to generate bindings. Then review the libquil-sys repository for the existing include_file!() pattern and determine how a feature flag should select generated versus committed bindings. Done means pyquil can install without libquil while bindings can still be regenerated when needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.