Skip to content

Commit

Permalink
fixup! Post review improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-fs committed Oct 18, 2023
1 parent 300bf2b commit 3aecab7
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,13 @@ cachi2 fetch-deps --source bat '{"type": "cargo"}'

### Generate environment variables (cargo)

At the moment no env var is generated for cargo, but let's do this step for compatibility
with other integrations.

```shell
cachi2 generate-env ./cachi2-output -o ./cachi2.env --for-output-dir /tmp/cachi2-output
```

### Inject project files (cargo)

```shell
Expand Down Expand Up @@ -551,6 +558,7 @@ CMD bat
```shell
podman build . \
--volume "$(realpath ./cachi2-output)":/tmp/cachi2-output:Z \
--volume "$(realpath ./cachi2.env)":/tmp/cachi2.env:Z \
--network none \
--tag bat
```
Expand All @@ -568,11 +576,15 @@ cachi2 fetch-deps --source dummy '[{"type": "pip"}, {"type": "cargo", "lock_file

### Generate environment variables (pip + cargo)

```shell
cachi2 generate-env ./cachi2-output -o ./cachi2.env --for-output-dir /tmp/cachi2-output
```

### Inject project files (pip + cargo)

```shell
$ cachi2 inject-files $(realpath cachi2-output) --for-output-dir /tmp/cachi2-output
2023-10-18 14:51:01,936 INFO Creating /tmp/playground/pure-rust/bat/.cargo/config.toml
2023-10-18 14:51:01,936 INFO Creating /tmp/playground/python-cargo/dummy/.cargo/config.toml
```

### Build the base image (pip + cargo)
Expand All @@ -588,8 +600,10 @@ RUN dnf -y install \
python38-devel \
gcc \
libffi-devel \
openssl-devel && \
cargo rust rust-std-static -y &&\
openssl-devel \
cargo \
rust \
rust-std-static &&\
dnf clean all
```

Expand All @@ -613,6 +627,7 @@ RUN source /tmp/cachi2.env && \
```shell
podman build . \
--volume "$(realpath ./cachi2-output)":/tmp/cachi2-output:Z \
--volume "$(realpath ./cachi2.env)":/tmp/cachi2.env:Z \
--network none \
--tag dummy
```

0 comments on commit 3aecab7

Please sign in to comment.