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