Skip to content

Extended cargo installation instructions - #4168

Merged
laurmaedje merged 4 commits into
typst:mainfrom
JHenneberg:cargo-install-tag
May 25, 2024
Merged

laurmaedje merged 4 commits into
typst:mainfrom
JHenneberg:cargo-install-tag

Conversation

@JHenneberg

Copy link
Copy Markdown
Contributor

extended cargo installation instructions in README.md by mentioning how to install a specific tag

Comment thread README.md Resolved
@JHenneberg
JHenneberg force-pushed the cargo-install-tag branch from a288075 to 2eca229 Compare May 21, 2024 06:11
@JHenneberg

JHenneberg commented May 21, 2024 •

Copy link
Copy Markdown
Contributor Author

makes sense.
@laurmaedje you want the version completly stripped or is this fine with you in an example, which actually do not really need to be uptodate, although it might trigger some people to just copy and paste this command because they expect it to be the latest version?

- If you have a [Rust][rust] toolchain install the latest development version. Note that this will be a "nightly" version that may be broken or not yet properly documented with:

  `cargo install --git https://github.com/typst/typst --locked typst-cli`

  A specific version can be installed by providing the option `--tag`.

@Coekjan

Coekjan commented May 21, 2024 •

Copy link
Copy Markdown
Contributor

Or we can run a script to query the latest tag (but it's too long to input conveniently):

URL=https://github.com/typst/typst
TAG="$(git -c 'versionsort.suffix=-' ls-remote --refs --tags --sort=version:refname ${URL}.git | \
  grep -Eo 'v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+' | \
  tail -n 1)"
cargo install --git "$URL" --locked typst-cli --tag "$TAG"

@Coekjan

Coekjan commented May 21, 2024

Copy link
Copy Markdown
Contributor

Oh, why not just install from crate.io please. I just found typst-cli has already been published to crate.io, so installation from the registry shall be of the latest tag!

@laurmaedje

Copy link
Copy Markdown
Member

Yeah, these instruction precede the crates.io release ... but some people might still want the latest dev version.

@JHenneberg
JHenneberg marked this pull request as draft May 21, 2024 17:14
Comment thread README.md Resolved
@JHenneberg
JHenneberg force-pushed the cargo-install-tag branch from 8b03b87 to 75c9364 Compare May 22, 2024 11:37
@JHenneberg
JHenneberg marked this pull request as ready for review May 22, 2024 11:38
Comment thread README.md Outdated
cargo install --git https://github.com/typst/typst --locked typst-cli
```

Note that this will be a "nightly" version that may be broken or not yet properly documented

@bluebear94 bluebear94 May 22, 2024 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Note that this will be a "nightly" version that may be broken or not yet properly documented
Note that this is a "nightly" version that may be broken or not yet properly documented.

@laurmaedje

Copy link
Copy Markdown
Member

I feel like now the Rust section is a bit long with paragraphs and block-level raw text. How about this?

...

- If you have a [Rust][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`

- Nix users can
  - use the `typst` package with `nix-shell -p typst`
  - build and run a development version with
    `nix run github:typst/typst -- --version`.

...

@laurmaedje laurmaedje changed the title extended cargo installation instructions Extended cargo installation instructions May 22, 2024
@JHenneberg

Copy link
Copy Markdown
Contributor Author

I feel like now the Rust section is a bit long with paragraphs and block-level raw text. How about this?

...

- If you have a [Rust][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`

- Nix users can
  - use the `typst` package with `nix-shell -p typst`
  - build and run a development version with
    `nix run github:typst/typst -- --version`.

...

The textual changes I totally agree on. I just prefer to be able to use the copy feature of block code. I am lazy :P

@JHenneberg
JHenneberg force-pushed the cargo-install-tag branch from 75c9364 to 5a1ce5d Compare May 23, 2024 05:00
@JHenneberg
JHenneberg force-pushed the cargo-install-tag branch from 5a1ce5d to dcb6d0b Compare May 24, 2024 08:15
@JHenneberg
JHenneberg requested a review from laurmaedje May 24, 2024 08:16
@laurmaedje
laurmaedje added this pull request to the merge queue May 25, 2024
@laurmaedje

Copy link
Copy Markdown
Member

Thanks!

Merged via the queue into typst:main with commit 794a215 May 25, 2024
@JHenneberg
JHenneberg deleted the cargo-install-tag branch May 25, 2024 17:38
Enter-tainer pushed a commit to Enter-tainer/typst that referenced this pull request May 26, 2024
PgBiel added a commit to tulio240/typst that referenced this pull request May 30, 2024
Refactor frame metadata into tags (typst#4212)


Require `Send` and `Sync` for worlds (typst#4219)


Optimize counters and state (typst#4223)


Add `windows` method to array (typst#4136)

Improve `CITATION.cff` file (typst#4201)


Fix equation resizing when adding the equation number (typst#4179)


`layout` documentation improvements (typst#4196)

Allow somewhat arbitrary characters as `mat`, `vec` and `cases` `delim` (typst#4211)


Do layout short-circuit in flow instead of realization (typst#4231)


Split `BitSet` into two types and make it a bit nicer (typst#4249)


Set default value of `raw.theme` to `auto`, and allow setting `raw.theme` to `auto` (typst#4186)


Extended cargo installation instructions (typst#4168)

Hint for language-region pair on `text.lang` (typst#4183)


Improve macro docs (+ Native*Data docs) (typst#4240)


Rephrase the sentence on variable scope in Scripting documentation (typst#4250)


Refactor `Capable::vtable` to return `Option<NonNull<()>>` (typst#4252)


Nicer test helper CSS (typst#4269)


Trim weak spacing at line start/end in paragraph layout (typst#4087)


Add ability to choose between minified and pretty-printed JSON (typst#4161)


Refactor PDF export (typst#4154)

Reorder syntax kinds (typst#4287)


Fix figure centering (typst#4276)

Fix `Default` impls for AST nodes (typst#4288)


Bump libc to v0.2.155 (typst#4268)


Bump time dependency (typst#4294)
Dikluwe pushed a commit to Dikluwe/typst-crystalline that referenced this pull request Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants