Skip to content

Rust bindings for qclib #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bindings/rust/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
300 changes: 300 additions & 0 deletions bindings/rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions bindings/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[workspace.package]
edition = "2021"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the year of the code?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's the Rust edition (think C standard revisions like C89, C11 and so on) used for this crate.

license-file = "LICENSE"

[package]
name = "qclib"
version = "2.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the significance of "version"? Should this reflect the actual package's version?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the version of the rust crate (library). I had it aligned with the version of the C library, but this will get awkward if we have changes in the crate and release a new version while the C library has not changed. I commented here before changing it. I'm open to suggestions since I'm not sure what the best handling is.

edition.workspace = true
license-file.workspace = true
description = "Rust bindings for qclib (Query Capacity Library)"

[dependencies]
serde_json = { version = "1.0", optional = true }

[features]
all = ["json"]
json = ["dep:serde_json"]

[dependencies.sys]
package = "qclib-sys"
path = "qclib-sys"
version = "2"

[dev-dependencies]
clap = { version = "4.5", features = ["derive"] }
1 change: 1 addition & 0 deletions bindings/rust/LICENSE
Loading