Skip to content
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

doc: release procedure #971

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,7 @@ hax-lib-macros = { path = "hax-lib-macros", version = "=0.1.0-alpha.1" }
hax-lib = { path = "hax-lib", version = "=0.1.0-alpha.1" }
hax-engine-names = { path = "engine/names", version = "=0.1.0-alpha.1" }
hax-types = { path = "hax-types", version = "=0.1.0-alpha.1" }

[workspace.metadata.release]
owners = ["github:hacspec:crates"]

28 changes: 19 additions & 9 deletions PUBLISHING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Crates publishing
# Publishing

## OCaml

There is only the package `hax-engine`, that includes a binary and a
number of libraries.
Copy link
Member

Choose a reason for hiding this comment

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

How does publishing work here? Also, did you want to publish this to opam? I don't see it there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I pushed a note, where I explain what we discussed (pinning git basically)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If the note looks good to you, let's resolve this discussion and merge the PR

Copy link
Member

Choose a reason for hiding this comment

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

lgtm
Please add a note how to update the README if needed, or how the release tag get's on there. Since we don't push it anywhere else, that's essentially the release then and we should describe here how to do that.
Then you can resolve this and merge.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

makes sense, started something in branch document-stable-install


## Rust

This repository is divided into several crates, some to be published,
some not. All crates should start with the `hax-` prefix, but
Expand All @@ -9,7 +16,7 @@ and `examples`):

- `hax-test-harness` **(doesn't need to be published)**

## cargo-hax
### cargo-hax

1. `hax-frontend-exporter-options` (`frontend/exporter/options `)
2. `hax-adt-into` (`frontend/exporter/adt-into`)
Expand All @@ -20,23 +27,26 @@ and `examples`):
- `hax-export-json-schemas`
- `hax-pretty-print-diagnostics`

- `hax-phase-debug-webapp`
- `hax-driver`

### hax-lib

## hax-lib
We publish the following crates that are helper libraries to be used
for hax code:

1. `hax-lib-macros-types`
2. `hax-lib-macros`
3. `hax-lib`

---

- `hax-lint`

## Supporting crates for the engine
### Supporting crates for the engine
The crate listed below are used only by the OCaml build of the
engine. Those should not be published on `crate.io`.

1. `cargo-hax-engine-names`
2. `cargo-hax-engine-names-extract`

## Procedure
1. Bump the version number with `cargo release LEVEL --no-publish --execute` (`cargo release --help` for more details on `LEVEL`). This will bump the version of every Rust crate, but also the version in `engine/dune-project`. This will also regenerate `engine/hax-engine.opam`. Note this will *not* publish the crate.
2. PR the change
3. when the PR is merged in main, checkout `main` and run `cargo release --execute`

3 changes: 3 additions & 0 deletions cli/subcommands/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ hax-lib-macros-types = {workspace = true, features = ["schemars"]}
version_check = "0.9"
toml = "0.8"

[package.metadata.release]
pre-release-hook = ["dune", "build", "--root", "../../engine", "hax-engine.opam"]
W95Psp marked this conversation as resolved.
Show resolved Hide resolved

[[package.metadata.release.pre-release-replacements]]
file = "../../engine/dune-project"
search = "version [a-z0-9\\.-]+"
Expand Down
1 change: 1 addition & 0 deletions engine/hax-engine.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "0.1.0-alpha.1"
synopsis: "The engine of hax, a Rust verification tool"
description:
"Hax is divided in two: a frontend (written in Rust) and an engine (written in OCaml). This is the engine."
Expand Down
3 changes: 3 additions & 0 deletions engine/names/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ description = "Dummy crate containing all the Rust names the hax engine should b
[dependencies]
hax-lib-protocol = {path = "../../hax-lib-protocol"}
hax-lib = {path = "../../hax-lib"}

[package.metadata.release]
release = false
W95Psp marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 3 additions & 0 deletions engine/names/extract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ extract_names_mode = []

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(feature, values("rustc"))'] }

[package.metadata.release]
release = false
W95Psp marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 3 additions & 0 deletions hax-lib-protocol-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ syn = { version = "2.0", features = [
"extra-traits",
"parsing",
] }

[package.metadata.release]
release = false
W95Psp marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 3 additions & 0 deletions hax-lib-protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ readme.workspace = true

[dependencies]
libcrux = "0.0.2-pre.2"

[package.metadata.release]
release = false
W95Psp marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 3 additions & 0 deletions test-harness/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ insta = {version = "1.29.0", features = ["filters", "toml"]}
serde = { version = "1.0", features = ["derive"] }
regex = "1"
hax-types.workspace = true

[package.metadata.release]
release = false
W95Psp marked this conversation as resolved.
Show resolved Hide resolved
Loading