Improved documentation for rust crate release process - #423
Open
joeslice wants to merge 4 commits into
Open
Conversation
Included is an untested draft version of release steps that might be useful when shipping a new release of the rust artifacts to crates.io. This should be validated and corrected with Adolfo's help before carrying on.
aochagavia
reviewed
Aug 26, 2026
|
|
||
| - `jni_simplified.h` — bindgen generates the bindings from this header; the build fails | ||
| without it | ||
| - `graal_isolate.h` and `graal_isolate_dynamic.h` |
Collaborator
There was a problem hiding this comment.
I'm not 100% sure these are needed, but there's no harm in shipping them
Simplifying and improving the instructions while testing them.
The prior example was no longer accurate since requiring `options` instead of a boolean. This new example demonstrates some indentation options and also a bit more about the json->kson pipeline.
holodorum
added a commit
to holodorum/kson
that referenced
this pull request
Aug 31, 2026
`store-native-artifacts` stored `kson-lib/build/bin/nativeKson/releaseShared`
and `releaseStatic`. Nothing writes those paths: kson-lib declares only `jvm()`
and `js()` targets, so there is no Kotlin/Native build to produce them, and all
three `build-*` jobs have been storing nothing. Meanwhile the native library
that does exist -- in `kson-lib/build/kotlin/compileGraalVmNativeImage` -- and
the CLI binary that `check` already builds on all three platforms were both
thrown away with the build directory.
Add `./gradlew packageReleaseArtifacts`, which stages this platform's share of
a release into `build/release-artifacts`:
kson-lib-shared-<arch>-<os>.tar.gz the native-image output directory, verbatim
kson-cli-<arch>-<os>.tar.gz the CLI binary
SHA256SUMS checksums for both
The `<arch>-<os>` tokens are not ours to pick. `lib-rust/kson-sys/build.rs`
downloads `kson-lib-shared-{arch}-{os}.tar.gz` from the `kson-lib-X.Y.Z` release
on kson-org/kson-binaries and unpacks it straight into its `OUT_DIR`, so the
kson-lib archive carries that directory's contents at the archive root --
unpacking it leaves exactly what `build_kson_from_source` copies there -- and
the tokens live in `BinaryArtifactPaths` beside a note naming whose contract
they are. The CLI archive follows the same convention so there is one to learn
rather than two.
CI packages inside `gradle-core-tasks`, before `verifyCleanCheckout` so every
build proves packaging leaves the checkout clean, and all six jobs now store
through one `store-release-artifacts` command into `release-artifacts/<platform>`.
Branch filters and caching are untouched.
Also fixes `:tooling:cli:buildNativeImage` declaring `kson` as its output on
Windows, where native-image writes `kson.exe`: packaging needs the real name,
and the task could never be up to date there.
`docs/release_process.md` gains a table of which job produces what and where to
download it, and fills in the collection half of the lib-rust and tooling/cli
sections. Publishing the CLI stays a todo: no distribution channel has been
chosen for it.
The lib-rust process this builds on (kson-org#423) opened with a workaround for exactly
the gap closed here: download three Python wheels and unzip `jni_simplified.h`
and the platform library out of each. Its Step 1 becomes three downloads of
archives CI now builds ready-made, and the facts around it are corrected with
it -- the libraries come from the `build-*` jobs rather than
`test-python-sdist-*`, they land in `release-artifacts/<platform>`, and an
archive holds the native-image output directory verbatim (four files on macOS)
rather than the two a wheel could supply. That document's publish ordering,
`KSON_LIB_VERSION` check, crates.io steps and their warnings are kept as they
are.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Included are the improvements to the release documentation for the rust library as tested in the 0.3.0 release. Additionally, a bonus change to improve the rust readme.