Skip to content

Developing Juliaup

Lilith Orion Hafner edited this page Jul 3, 2024 · 2 revisions

This document has a collection of tips on how to work on Juliaup itself.

Software setup

  1. Install the rust toolchain https://rustup.rs/
  2. (Optional) Install VS Code and the rust-analyzer extension. There are also debugger extensions that work.
  3. (Optional) Install cargo-release if you want to create releases by running cargo install cargo-release.
  4. (Optional) Install cargo-msix if you want to build MSIX packages locally by running cargo install cargo-msix. You will also need PowerShell to run a script that vendors the current Julia version into the MSIX.

To build juliaup locally

  1. cd to the source and run cargo build.
  2. cd to targets/debug and run ./juliaup and ./julia to use the newly built version.
  3. You can run cargo build --release to build a release build that you can then find in targets/release.

To run during development

  1. cd to the source.
  2. Run cargo run -- ARGS to compile and run juliaup from source. ARGS are the regular juliaup command line arguments. For example cargo run -- status.
  3. Run cargo run --bin julialauncher -- ARGS to run the julialauncher (that in a normal install is symlinked as julia). For example cargo run --bin julialauncher -- +lts.
  4. Run cargo run --bin juliainstaller -- ARGS to run the juliainstaller (the binary that is downloaded and then executed by the install shell script). ARGS here can be left out or specify the Julia channel one wants to use.

To run tests

  1. cd to the source.
  2. Run cargo test.

To update dependencies

  1. cd to the source.
  2. Run cargo update to update all dependencies to the latest compatible version. This works similar to Julia, i.e. it will update the specific versions used and recorded in Cargo.lock (the equivalent to a Julia Manifest.toml), subject to the semver constraints recorded in Cargo.toml (the equivalent to a Julia Project.toml).
  3. To update packages over a semver breaking version jump you need to manually edit the Cargo.toml. The crates extension for VS Code is very convenient for this.