How to install Typst 0.12-rc1 locally?

Hello,
I would like to compile a big document (about 200 pages). The web app crashed when I tried. How can I install the Typst 0.12-rc1 version locally to compile my document in vs-code ?

I tried cargo install --version 0.12.0-rc1 --git https://github.com/typst/typst --locked typst-cli, but error was returned: error: could not find typst-cli in https://github.com/typst/typst with version =0.12.0-rc1

Merci! :slight_smile:
fdekerm

Why not download the binary from the release page and put it in your PATH?

1 Like

Either download the binary from the GitHub Releases as @AllanChain said, or just follow the README instructions which say

  • If you have a Rust toolchain installed, you can install
    • the latest released Typst version with cargo install --locked typst-cli
    • a development version with cargo install --git https://github.com/typst/typst --locked typst-cli

So, you can use cargo install --git https://github.com/typst/typst --locked typst-cli.

1 Like

Perfect, thank you very much!

As a final note on why your command didn’t work, Typst release candidates and patch versions are often on extra branches, not on main. cargo install --git ... assumes you’re installing from main unless specified otherwise.

You can install the release candidate by passing the correct commit to install from by using either --rev ..., --branch ... or --tag ...:

cargo install --tag v0.12.0-rc1 --git https://github.com/typst/typst --locked typst-cli

As you can see, this also doesn’t require the --version ... option, since the newest version on this tag is the one you’re looking for.

You can also install from crates.io by the way:

cargo install --locked typst-cli@0.12.0-rc1

In related news, there is now also a tinymist pre-release based on 0.12.0-rc1: Release v0.11.33 · Myriad-Dreamin/tinymist · GitHub

I don’t know if I understood correctly, this works for me.
Just type in the terminal typst update "0.12.0-rc1" and optional use --force parameter if it’snt work