diff --git a/Cargo.toml b/Cargo.toml index f64e16d76..e121143ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] + diff --git a/PUBLISHING.md b/PUBLISHING.md index ae1491466..cfb04a098 100644 --- a/PUBLISHING.md +++ b/PUBLISHING.md @@ -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 @@ -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`) @@ -20,23 +27,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 +``` diff --git a/cli/subcommands/Cargo.toml b/cli/subcommands/Cargo.toml index 91512f584..9ba434912 100644 --- a/cli/subcommands/Cargo.toml +++ b/cli/subcommands/Cargo.toml @@ -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\\.-]+" diff --git a/engine/hax-engine.opam b/engine/hax-engine.opam index f9ae457ad..a1c46c487 100644 --- a/engine/hax-engine.opam +++ b/engine/hax-engine.opam @@ -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." diff --git a/engine/names/Cargo.toml b/engine/names/Cargo.toml index efc92fca6..58ebcb0d2 100644 --- a/engine/names/Cargo.toml +++ b/engine/names/Cargo.toml @@ -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 diff --git a/engine/names/extract/Cargo.toml b/engine/names/extract/Cargo.toml index c6f9dacb6..bb28feacd 100644 --- a/engine/names/extract/Cargo.toml +++ b/engine/names/extract/Cargo.toml @@ -24,3 +24,6 @@ extract_names_mode = [] [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(feature, values("rustc"))'] } + +[package.metadata.release] +release = false diff --git a/hax-lib-protocol-macros/Cargo.toml b/hax-lib-protocol-macros/Cargo.toml index de9561465..739fd467f 100644 --- a/hax-lib-protocol-macros/Cargo.toml +++ b/hax-lib-protocol-macros/Cargo.toml @@ -21,3 +21,6 @@ syn = { version = "2.0", features = [ "extra-traits", "parsing", ] } + +[package.metadata.release] +release = false diff --git a/hax-lib-protocol/Cargo.toml b/hax-lib-protocol/Cargo.toml index 0dee6ef9e..e442033b1 100644 --- a/hax-lib-protocol/Cargo.toml +++ b/hax-lib-protocol/Cargo.toml @@ -10,3 +10,6 @@ readme.workspace = true [dependencies] libcrux = "0.0.2-pre.2" + +[package.metadata.release] +release = false diff --git a/test-harness/Cargo.toml b/test-harness/Cargo.toml index e0dbfe4ca..a11bb3e9d 100644 --- a/test-harness/Cargo.toml +++ b/test-harness/Cargo.toml @@ -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