1
1
# zinit-annex-rust<a name =" zinit-annex-rust " ></a >
2
2
3
- A Zsh-Zinit annex that installs rust and cargo packages locally inside the
4
- plugin or snippet directories. The crate can then have a so called * shim*
5
- created (name borrowed from ` rbenv ` ) – a script that's located in the standard
6
- ` $PATH ` entry "` $ZPFX/bin ` " of following contents (example):
3
+ A Zsh-Zinit annex that installs rust and cargo packages locally inside the plugin or snippet directories. The crate can
4
+ then have a so called * shim* created (name borrowed from ` rbenv ` ) – a script that's located in the standard ` $PATH `
5
+ entry "` $ZPFX/bin ` " of following contents (example):
7
6
8
7
``` zsh
9
8
#! /usr/bin/env zsh
@@ -21,8 +20,7 @@ lsd "$@"
21
20
22
21
As it can be seen shim ultimately provides the binary to the command line.
23
22
24
- ![ example zinit-annex-rust
25
- use] ( https://raw.githubusercontent.com/zdharma-continuum/zinit-annex-rust/master/images/z-a-rust.png )
23
+ ![ example zinit-annex-rust use] ( https://raw.githubusercontent.com/zdharma-continuum/zinit-annex-rust/master/images/z-a-rust.png )
26
24
27
25
<!-- mdformat-toc start --slug=github --maxlevel=6 --minlevel=2 -->
28
26
@@ -52,9 +50,8 @@ This installs the annex and makes the `rustup` and `cargo''` ices available.
52
50
53
51
## Usage<a name =" usage " ></a >
54
52
55
- The Zinit annex provides two new ices: ` rustup ` and ` cargo'' ` . The first one
56
- installs rust inside the plugin's folder using the official ` rustup ` installer.
57
- The second one has the following syntax:
53
+ The Zinit annex provides two new ices: ` rustup ` and ` cargo'' ` . The first one installs rust inside the plugin's folder
54
+ using the official ` rustup ` installer. The second one has the following syntax:
58
55
59
56
` cargo"[name-of-the-binary-or-path <-] [[!][c|N|E|O]:]{crate-name} [-> {shim-script-name}]' `
60
57
@@ -67,9 +64,8 @@ The second one has the following syntax:
67
64
| ` O ` | redirect standard output to ` /dev/null ` |
68
65
| ` c ` | change the current directory to the plugin's or snippet's directory before executing the command |
69
66
70
- As the examples showed, the name of the binary to run and the shim name are
71
- by default equal to the name of the crate. Specifying ` {binary-name} <- … `
72
- and/or ` … -> {shim-name} ` allows to override them.
67
+ As the examples showed, the name of the binary to run and the shim name are by default equal to the name of the crate.
68
+ Specifying ` {binary-name} <- … ` and/or ` … -> {shim-name} ` allows to override them.
73
69
74
70
## Examples<a name =" examples " ></a >
75
71
@@ -138,9 +134,8 @@ zi for \
138
134
zdharma-continuum/null
139
135
```
140
136
141
- When using a global installation of rust in turbo mode, cargos need to omit the
142
- rustup ice, and wait on ` $CARGO_HOME ` and ` $RUSTUP_HOME ` environment variables to be
143
- available
137
+ When using a global installation of rust in turbo mode, cargos need to omit the rustup ice, and wait on ` $CARGO_HOME `
138
+ and ` $RUSTUP_HOME ` environment variables to be available
144
139
145
140
``` zsh
146
141
zi for \
0 commit comments