summaryrefslogtreecommitdiff
path: root/topics/octopus/recent-rust.gmi
blob: 7ce89687b6af24239e02b6bc8f4833c33d01d1c2 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Use a recent Rust on Octopus


For impg we currently need a rust that is more recent than what we have in Debian
or Guix. No panic, because Rust has few requirements.

Install latest rust using the script

```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

Set path

```
. ~/.cargo/env
```

Update rust

```
rustup default stable
```

Next update Rust

```
octopus01:~/tmp/impg$ . ~/.cargo/env
octopus01:~/tmp/impg$ rustup default stable
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2025-05-15, rust version 1.87.0 (17067e9ac 2025-05-09)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
(...)
```

and build the package

```
octopus01:~/tmp/impg$ cargo build
```

Since we are not in guix we get the local dependencies:

```
octopus01:~/tmp/impg$ ldd target/debug/impg
  linux-vdso.so.1 (0x00007ffdb266a000)
  libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fe404001000)
  librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fe403ff7000)
  libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe403fd6000)
  libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe403fd1000)
  libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe403e11000)
  /lib64/ld-linux-x86-64.so.2 (0x00007fe404682000)
```

Login on another octopus - say 02 you can run impg from this directory:

```
octopus02:~$ ~/tmp/impg/target/debug/impg
Command-line tool for querying overlaps in PAF files

Usage: impg <COMMAND>

Commands:
  index      Create an IMPG index
  partition  Partition the alignment
  query      Query overlaps in the alignment
  stats      Print alignment statistics

Options:
  -h, --help     Print help
  -V, --version  Print version
```