Skip to content

Commit

Permalink
doc: release procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
W95Psp committed Oct 7, 2024
1 parent 8f7776b commit 6a21846
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 9 deletions.
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.

## 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"]

[[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
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
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 6a21846

Please sign in to comment.