@holochain/hc-spin-rust-utils is a node add-on used by
At the time of writing it contains two main pieces:
- A utility function
unpackAndSaveWebhappthat takes a path to a .webhapp file, unpacks the .webhapp file into UI assets and .happ file and stores them at respective paths specified in the function arguments. - A
ZomeCallSignerobject that connects to a running instance of lair keystore and exposes a methodsignZomeCallto have lair sign zome calls for a specified public key.
Once a new version of Holochain is released, support for it can be added by following these steps:
- Update the crates in
Cargo.tomlas necessary and make any required changes in case of compilation errors. Do NOT change the package version in package.json. This will be done automatically when creating a new release. - Test the package locally by
- Building it:
npm run build - Linking it globally with yarn:
yarn link - Inside a local
hc-spinrepository, use the linked local package:yarn link @holochain/hc-spin-rust-utilsand test that hc-spin works and zome calls succeed (you may want to unlink it again after testing withyarn unlink @holochain/hc-spin-rust-utils).
- Building it:
- If testing succeeds, commit the changes and make a PR to
mainormain-xxwherexxis the Holochain version branch, for examplemain-06contains new Holochainv0.6.xversions. This will trigger a CI test run that builds the package for all platforms but does not publish it.
To release a new version of @holochain/hc-spin-rust-utils, you may proceed as follows:
- Trigger the Prepare Release action with the desired new version number on the corresponding branch (
mainfor the Holochainmainbranch andmain-xxfor older versions). - This will bump the versions, generate a changelog, and open a PR for these changes.
- Review and manually edit the PR on the working branch where required.
- Merge the PR with a rebase-merge. This will trigger the Publish Release workflow which will build the packages and publish them to NPM via Trusted Publishers and to GitHub as a release with artifacts.