Show More
@@ -1,95 +1,96 b'' | |||||
1 | Mercurial can be augmented with Rust extensions for speeding up certain |
|
1 | Mercurial can be augmented with Rust extensions for speeding up certain | |
2 | operations. |
|
2 | operations. | |
3 |
|
3 | |||
4 | Compatibility |
|
4 | Compatibility | |
5 | ============= |
|
5 | ============= | |
6 |
|
6 | |||
7 | Though the Rust extensions are only tested by the project under Linux, users of |
|
7 | Though the Rust extensions are only tested by the project under Linux, users of | |
8 | MacOS, FreeBSD and other UNIX-likes have been using the Rust extensions. Your |
|
8 | MacOS, FreeBSD and other UNIX-likes have been using the Rust extensions. Your | |
9 | mileage may vary, but by all means do give us feedback or signal your interest |
|
9 | mileage may vary, but by all means do give us feedback or signal your interest | |
10 | for better support. |
|
10 | for better support. | |
11 |
|
11 | |||
12 | No Rust extensions are available for Windows at this time. |
|
12 | No Rust extensions are available for Windows at this time. | |
13 |
|
13 | |||
14 | Features |
|
14 | Features | |
15 | ======== |
|
15 | ======== | |
16 |
|
16 | |||
17 | The following operations are sped up when using Rust: |
|
17 | The following operations are sped up when using Rust: | |
18 |
|
18 | |||
19 | - discovery of differences between repositories (pull/push) |
|
19 | - discovery of differences between repositories (pull/push) | |
20 | - nodemap (see :hg:`help config.format.use-persistent-nodemap`) |
|
20 | - nodemap (see :hg:`help config.format.use-persistent-nodemap`) | |
21 | - all commands using the dirstate (status, commit, diff, add, update, etc.) |
|
21 | - all commands using the dirstate (status, commit, diff, add, update, etc.) | |
22 | - dirstate-v2 (see :hg:`help config.format.use-dirstate-v2`) |
|
22 | - dirstate-v2 (see :hg:`help config.format.use-dirstate-v2`) | |
23 | - iteration over ancestors in a graph |
|
23 | - iteration over ancestors in a graph | |
24 |
|
24 | |||
25 | More features are in the works, and improvements on the above listed are still |
|
25 | More features are in the works, and improvements on the above listed are still | |
26 | in progress. For more experimental work see the "rhg" section. |
|
26 | in progress. For more experimental work see the "rhg" section. | |
27 |
|
27 | |||
28 | Checking for Rust |
|
28 | Checking for Rust | |
29 | ================= |
|
29 | ================= | |
30 |
|
30 | |||
31 |
You may already have the Rust extensions depending on how you install |
|
31 | You may already have the Rust extensions depending on how you install | |
|
32 | Mercurial:: | |||
32 |
|
33 | |||
33 | $ hg debuginstall | grep -i rust |
|
34 | $ hg debuginstall | grep -i rust | |
34 | checking Rust extensions (installed) |
|
35 | checking Rust extensions (installed) | |
35 | checking module policy (rust+c-allow) |
|
36 | checking module policy (rust+c-allow) | |
36 |
|
37 | |||
37 | If those lines don't even exist, you're using an old version of `hg` which does |
|
38 | If those lines don't even exist, you're using an old version of `hg` which does | |
38 | not have any Rust extensions yet. |
|
39 | not have any Rust extensions yet. | |
39 |
|
40 | |||
40 | Installing |
|
41 | Installing | |
41 | ========== |
|
42 | ========== | |
42 |
|
43 | |||
43 | You will need `cargo` to be in your `$PATH`. See the "MSRV" section for which |
|
44 | You will need `cargo` to be in your `$PATH`. See the "MSRV" section for which | |
44 | version to use. |
|
45 | version to use. | |
45 |
|
46 | |||
46 | Using pip |
|
47 | Using pip | |
47 | --------- |
|
48 | --------- | |
48 |
|
49 | |||
49 | Users of `pip` can install the Rust extensions with the following command: |
|
50 | Users of `pip` can install the Rust extensions with the following command:: | |
50 |
|
51 | |||
51 | $ pip install mercurial --global-option --rust --no-use-pep517 |
|
52 | $ pip install mercurial --global-option --rust --no-use-pep517 | |
52 |
|
53 | |||
53 | `--no-use-pep517` is here to tell `pip` to preserve backwards compatibility with |
|
54 | `--no-use-pep517` is here to tell `pip` to preserve backwards compatibility with | |
54 | the legacy `setup.py` system. Mercurial has not yet migrated its complex setup |
|
55 | the legacy `setup.py` system. Mercurial has not yet migrated its complex setup | |
55 | to the new system, so we still need this to add compiled extensions. |
|
56 | to the new system, so we still need this to add compiled extensions. | |
56 |
|
57 | |||
57 | This might take a couple of minutes because you're compiling everything. |
|
58 | This might take a couple of minutes because you're compiling everything. | |
58 |
|
59 | |||
59 | See the "Checking for Rust" section to see if the install succeeded. |
|
60 | See the "Checking for Rust" section to see if the install succeeded. | |
60 |
|
61 | |||
61 | From your distribution |
|
62 | From your distribution | |
62 | ---------------------- |
|
63 | ---------------------- | |
63 |
|
64 | |||
64 | Some distributions are shipping Mercurial with Rust extensions enabled and |
|
65 | Some distributions are shipping Mercurial with Rust extensions enabled and | |
65 | pre-compiled (meaning you won't have to install `cargo`), or allow you to |
|
66 | pre-compiled (meaning you won't have to install `cargo`), or allow you to | |
66 | specify an install flag. Check with your specific distribution for how to do |
|
67 | specify an install flag. Check with your specific distribution for how to do | |
67 | that, or ask their team to add support for hg+Rust! |
|
68 | that, or ask their team to add support for hg+Rust! | |
68 |
|
69 | |||
69 | From source |
|
70 | From source | |
70 | ----------- |
|
71 | ----------- | |
71 |
|
72 | |||
72 | Please refer to the `rust/README.rst` file in the Mercurial repository for |
|
73 | Please refer to the `rust/README.rst` file in the Mercurial repository for | |
73 | instructions on how to install from source. |
|
74 | instructions on how to install from source. | |
74 |
|
75 | |||
75 | MSRV |
|
76 | MSRV | |
76 | ==== |
|
77 | ==== | |
77 |
|
78 | |||
78 | The minimum supported Rust version is currently 1.48.0. The project's policy is |
|
79 | The minimum supported Rust version is currently 1.48.0. The project's policy is | |
79 | to follow the version from Debian stable, to make the distributions' job easier. |
|
80 | to follow the version from Debian stable, to make the distributions' job easier. | |
80 |
|
81 | |||
81 | rhg |
|
82 | rhg | |
82 | === |
|
83 | === | |
83 |
|
84 | |||
84 | There exists an experimental pure-Rust version of Mercurial called `rhg` with a |
|
85 | There exists an experimental pure-Rust version of Mercurial called `rhg` with a | |
85 | fallback mechanism for unsupported invocations. It allows for much faster |
|
86 | fallback mechanism for unsupported invocations. It allows for much faster | |
86 | execution of certain commands while adding no discernable overhead for the rest. |
|
87 | execution of certain commands while adding no discernable overhead for the rest. | |
87 |
|
88 | |||
88 | The only way of trying it out is by building it from source. Please refer to |
|
89 | The only way of trying it out is by building it from source. Please refer to | |
89 | `rust/README.rst` in the Mercurial repository. |
|
90 | `rust/README.rst` in the Mercurial repository. | |
90 |
|
91 | |||
91 | Contributing |
|
92 | Contributing | |
92 | ============ |
|
93 | ============ | |
93 |
|
94 | |||
94 | If you would like to help the Rust endeavor, please refer to `rust/README.rst` |
|
95 | If you would like to help the Rust endeavor, please refer to `rust/README.rst` | |
95 | in the Mercurial repository. |
|
96 | in the Mercurial repository. |
General Comments 0
You need to be logged in to leave comments.
Login now