Skip to content

Commit

Permalink
Merge pull request #971 from hacspec/document-release-process
Browse files Browse the repository at this point in the history
doc: release procedure
  • Loading branch information
W95Psp authored Dec 2, 2024
2 parents 1c5e17c + d4698af commit 102ae9f
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 9 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,7 @@ hax-lib-macros-types = { path = "hax-lib/macros/types", version = "=0.1.0-alpha.
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"]

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

## OCaml

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

We have no particular release procedure for the engine: we don't plan
on publishing it to opam.

## 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 +19,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 +30,31 @@ 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`

Note: for now, we are not publishing to Opam. Instead, let's just advertise the following for installation:
```bash
opam pin hax-engine https://github.com/hacspec/hax.git#the-release-tag
opam install hax-engine
```
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"]

[[package.metadata.release.pre-release-replacements]]
file = "../../engine/dune-project"
search = "version [a-z0-9\\.-]+"
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
3 changes: 3 additions & 0 deletions engine/names/extract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ extract_names_mode = []

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

[package.metadata.release]
release = false
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
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
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

0 comments on commit 102ae9f

Please sign in to comment.