* Add rust toolchain file * Determine rust version by checking the top level toolchain file. Remove overrides. * Remove explicit overrides and target installation from workflows. * Remove from macOS build docs any language about installing specific rust toolchains or setting overrides. We're relying on the toolchain file and rustup to quietly install and use the toolchain(s) specified by the toolchain file. * Always re-install wasm-bindgen if the currently installed version is out-of-date * e submodule invokes the 'rustup-set-version' target, but it is not needed now that we have the toolchain file. Leave this target in for now so that we don't break the build. We can clean it up later. * Remove target that install wasm toolchain. It is no longer necessary. * Fix awk expression that extracts rust version from the toolchain file. * Fix comment and remove explicit rust toolchain install from lint workflow * We still need to ensure that rustfmt and clippy are installed on machine that runs rust lint.
3.0 KiB
MacOS Environment Setup
To set up your MacOS environment, follow these steps using Homebrew as the main
package manager. Aim to install versions specified in
build.assets/versions.mk; for others, use the
latest Homebrew version.
The instructions below are provided on a best-effort basis. PRs with corrections and updates are welcome!
-
Install Homebrew
-
Install Go
brew install go -
Install Rust
Install rustup with Homebrew:
brew install rustup rustup-init # Accept defaults -
Install Node.js
-
Find the required Node version in
build.assets/versions.mk(NODE_VERSION). -
Install Node.js (Homebrew only supports MAJOR version):
# Replace <version> with the MAJOR value of NODE_VERSION from build.assets/versions.mk (e.g., 22) brew install node@<version> -
Install to PATH and apply the changes to your shell:
# Replace <version> with the MAJOR value of NODE_VERSION from build.assets/versions.mk (e.g., 22) echo 'export PATH="/opt/homebrew/opt/node@<version>/bin:$PATH"' >> ~/.zshrc source ~/.zshrc -
Verify the installed version:
node --version
-
-
Install
libfido2:brew install libfido2 -
Install
pkg-config:brew install pkg-config -
Install
helmand thehelm-unittestplugin:brew install helm helm plugin install https://github.com/quintush/helm-unittest --version 0.2.11 -
Install
bats:-
Find the required
bats-coreversion frombuild.assets/Dockerfile(search forbats-core). -
Set the version variable and install
bats-core:# Replace <version> with the required bats-core version (e.g., 1.12.0) BATS_VERSION=1.12.0 curl -L https://github.com/bats-core/bats-core/archive/v${BATS_VERSION}.tar.gz -o ~/Downloads/bats.tar.gz cd ~/Downloads tar xzvf bats.tar.gz sudo mkdir -p /usr/local/libexec sudo chown $USER /usr/local/libexec cd bats-core-${BATS_VERSION} sudo ./install.sh /usr/local cd ../ rm -rf bats-core-${BATS_VERSION} bats.tar.gz -
Verify
batsinstallation:bats --version
-
-
Increase the maximum number of open files:
ulimit -n 2560 # 10x default -
Test the environment by building development artifacts and running tests:
make all test
Congrats! Your MacOS environment is now ready for development 🎉
If you encounter any issues, please refer to the official documentation or open an issue in the repository for assistance.