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