Skip to content

Commit

Permalink
fix: remove wildcard (*) dependency constraint for crate publishing (
Browse files Browse the repository at this point in the history
…#105)

Also sanitizes the READMEs a bit.

The last attempt to publish a crate using release PR #98
[failed](https://github.com/CQCL/hugr-llvm/actions/runs/10886782954/job/30207610938)
with:
```
error: failed to publish to registry at https://crates.io/
    
    Caused by:
      the remote server responded with an error (status 400 Bad Request): wildcard (`*`) dependency constraints are not allowed on crates.io. Crate with this problem: `serde` See https://doc.rust-lang.org/cargo/faq.html#can-libraries-use--as-a-version-for-their-dependencies for more information
```
  • Loading branch information
qartik authored Sep 17, 2024
1 parent 1fdc898 commit 21dbefe
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ rstest = "0.19.0"
portgraph = "0.12.1"
pathsearch = "0.2.0"
serde_json = "1.0.117"
serde = "*"
typetag = "*"
serde = "1"
typetag = "0.2"

[profile.dev.package]
insta.opt-level = 3
Expand Down
10 changes: 4 additions & 6 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,17 @@ shell by setting up [direnv](https://devenv.sh/automatic-shell-activation/).

To set up the environment manually you will need:

- Rust `>=1.75`: https://www.rust-lang.org/tools/install
- llvm `== 14.0`: we use the rust bindings
[llvm-sys](https://crates.io/crates/llvm-sys) to [llvm](https://llvm.org/),
- Poetry `>=1.8`: https://python-poetry.org/
- Rust `>=1.75`: <https://www.rust-lang.org/tools/install>
- llvm `== 14.0`: we use the rust bindings
[llvm-sys](https://crates.io/crates/llvm-sys) to [llvm](https://llvm.org/),
- Poetry `>=1.8`: <https://python-poetry.org/>

Once you have these installed, verify that your setup is working

```bash
cargo test
```


## 💅 Coding Style

We use `rustfmt` to enforce a consistent coding style. The CI will fail if the code is not formatted correctly.
Expand All @@ -52,7 +51,6 @@ cargo format

We also use various linters to catch common mistakes and enforce best practices. To run these, see [our CI config](./.github/workflows/ci-rs.yml). TODO Provide a better way, contributions welcome.


## 📈 Code Coverage

We run coverage checks on the CI. Once you submit a PR, you can review the
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
[![codecov](https://codecov.io/github/CQCL/hugr-llvm/graph/badge.svg?token=TN3DSNHF43)](https://codecov.io/github/CQCL/hugr-llvm)
[![msrv][]](https://github.com/CQCL/hugr-llvm)


A general, extensible, rust crate for lowering `HUGR`s into `LLVM` IR. Built on [hugr][], [inkwell][], and [llvm][].

## Usage

You'll need to point your `Cargo.toml` to use a single LLVM version feature flag corresponding to your LLVM version, by calling

```bash
cargo add hugr-llvm --features llvm14-0
```
Expand All @@ -18,7 +18,7 @@ At present only `llvm14-0` is supported but we expect to introduce supported ver

See the [llvm-sys][] crate for details on how to use your preferred llvm installation.

For an example lowering [guppy][] programs to LLVM see [tests/guppy.rs](./tests/guppy.rs)
For an example lowering [guppy][] programs to LLVM see [tests/guppy.rs](./tests/guppy.rs)

## Recent Changes

Expand All @@ -31,8 +31,7 @@ See [DEVELOPMENT](DEVELOPMENT.md) for instructions on setting up the development

## License

This project is licensed under Apache License, Version 2.0 ([LICENCE](LICENCE) or http://www.apache.org/licenses/LICENSE-2.0).

This project is licensed under Apache License, Version 2.0 ([LICENCE](LICENCE) or <http://www.apache.org/licenses/LICENSE-2.0>).

[build_status]: https://github.com/CQCL/hugr-llvm/actions/workflows/ci-rs.yml/badge.svg?branch=main
[msrv]: https://img.shields.io/badge/rust-1.75.0%2B-blue.svg
Expand Down

0 comments on commit 21dbefe

Please sign in to comment.