Show More
@@ -0,0 +1,94 b'' | |||||
|
1 | Mercurial can be augmented with Rust extensions for speeding up certain | |||
|
2 | operations. | |||
|
3 | ||||
|
4 | Compatibility | |||
|
5 | ============= | |||
|
6 | ||||
|
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 | |||
|
9 | mileage may vary, but by all means do give us feedback or signal your interest | |||
|
10 | for better support. | |||
|
11 | ||||
|
12 | No Rust extensions are available for Windows at this time. | |||
|
13 | ||||
|
14 | Features | |||
|
15 | ======== | |||
|
16 | ||||
|
17 | The following operations are sped up when using Rust: | |||
|
18 | - discovery of differences between repositories (pull/push) | |||
|
19 | - nodemap (see :hg:`help config.format.use-persistent-nodemap`) | |||
|
20 | - all commands using the dirstate (status, commit, diff, add, update, etc.) | |||
|
21 | - dirstate-v2 (see :hg:`help config.format.exp-rc-dirstate-v2`) | |||
|
22 | - iteration over ancestors in a graph | |||
|
23 | ||||
|
24 | 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 | ||||
|
27 | Checking for Rust | |||
|
28 | ================= | |||
|
29 | ||||
|
30 | You may already have the Rust extensions depending on how you install Mercurial. | |||
|
31 | ||||
|
32 | $ hg debuginstall | grep -i rust | |||
|
33 | checking Rust extensions (installed) | |||
|
34 | checking module policy (rust+c-allow) | |||
|
35 | ||||
|
36 | 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 | ||||
|
39 | Installing | |||
|
40 | ========== | |||
|
41 | ||||
|
42 | You will need `cargo` to be in your `$PATH`. See the "MSRV" section for which | |||
|
43 | version to use. | |||
|
44 | ||||
|
45 | Using pip | |||
|
46 | --------- | |||
|
47 | ||||
|
48 | Users of `pip` can install the Rust extensions with the following command: | |||
|
49 | ||||
|
50 | $ pip install mercurial --global-option --rust --no-use-pep517 | |||
|
51 | ||||
|
52 | `--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 | to the new system, so we still need this to add compiled extensions. | |||
|
55 | ||||
|
56 | This might take a couple of minutes because you're compiling everything. | |||
|
57 | ||||
|
58 | See the "Checking for Rust" section to see if the install succeeded. | |||
|
59 | ||||
|
60 | From your distribution | |||
|
61 | ---------------------- | |||
|
62 | ||||
|
63 | 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 | 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 | ||||
|
68 | From source | |||
|
69 | ----------- | |||
|
70 | ||||
|
71 | Please refer to the `rust/README.rst` file in the Mercurial repository for | |||
|
72 | instructions on how to install from source. | |||
|
73 | ||||
|
74 | MSRV | |||
|
75 | ==== | |||
|
76 | ||||
|
77 | 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 | ||||
|
80 | rhg | |||
|
81 | === | |||
|
82 | ||||
|
83 | 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 | execution of certain commands while adding no discernable overhead for the rest. | |||
|
86 | ||||
|
87 | 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 | ||||
|
90 | Contributing | |||
|
91 | ============ | |||
|
92 | ||||
|
93 | If you would like to help the Rust endeavor, please refer to `rust/README.rst` | |||
|
94 | in the Mercurial repository. |
@@ -484,6 +484,15 b' helptable = sorted(' | |||||
484 | TOPIC_CATEGORY_IDS, |
|
484 | TOPIC_CATEGORY_IDS, | |
485 | ), |
|
485 | ), | |
486 | ( |
|
486 | ( | |
|
487 | [ | |||
|
488 | b'rust', | |||
|
489 | b'rustext', | |||
|
490 | ], | |||
|
491 | _(b'Rust in Mercurial'), | |||
|
492 | loaddoc(b'rust'), | |||
|
493 | TOPIC_CATEGORY_CONFIG, | |||
|
494 | ), | |||
|
495 | ( | |||
487 | [b'filesets', b'fileset'], |
|
496 | [b'filesets', b'fileset'], | |
488 | _(b"Specifying File Sets"), |
|
497 | _(b"Specifying File Sets"), | |
489 | loaddoc(b'filesets'), |
|
498 | loaddoc(b'filesets'), |
@@ -414,6 +414,7 b' Testing -h/--help:' | |||||
414 | hgweb Configuring hgweb |
|
414 | hgweb Configuring hgweb | |
415 | merge-tools Merge Tools |
|
415 | merge-tools Merge Tools | |
416 | pager Pager Support |
|
416 | pager Pager Support | |
|
417 | rust Rust in Mercurial | |||
417 |
|
418 | |||
418 | Concepts: |
|
419 | Concepts: | |
419 |
|
420 | |||
@@ -548,6 +549,7 b' Testing -h/--help:' | |||||
548 | hgweb Configuring hgweb |
|
549 | hgweb Configuring hgweb | |
549 | merge-tools Merge Tools |
|
550 | merge-tools Merge Tools | |
550 | pager Pager Support |
|
551 | pager Pager Support | |
|
552 | rust Rust in Mercurial | |||
551 |
|
553 | |||
552 | Concepts: |
|
554 | Concepts: | |
553 |
|
555 |
@@ -113,6 +113,7 b' Test hiding some commands (which also ha' | |||||
113 | hgweb Configuring hgweb |
|
113 | hgweb Configuring hgweb | |
114 | merge-tools Merge Tools |
|
114 | merge-tools Merge Tools | |
115 | pager Pager Support |
|
115 | pager Pager Support | |
|
116 | rust Rust in Mercurial | |||
116 |
|
117 | |||
117 | Concepts: |
|
118 | Concepts: | |
118 |
|
119 | |||
@@ -251,6 +252,7 b' Test hiding some topics.' | |||||
251 | hgweb Configuring hgweb |
|
252 | hgweb Configuring hgweb | |
252 | merge-tools Merge Tools |
|
253 | merge-tools Merge Tools | |
253 | pager Pager Support |
|
254 | pager Pager Support | |
|
255 | rust Rust in Mercurial | |||
254 |
|
256 | |||
255 | Concepts: |
|
257 | Concepts: | |
256 |
|
258 |
@@ -165,6 +165,7 b' the extension is unknown.' | |||||
165 | hgweb Configuring hgweb |
|
165 | hgweb Configuring hgweb | |
166 | merge-tools Merge Tools |
|
166 | merge-tools Merge Tools | |
167 | pager Pager Support |
|
167 | pager Pager Support | |
|
168 | rust Rust in Mercurial | |||
168 |
|
169 | |||
169 | Concepts: |
|
170 | Concepts: | |
170 |
|
171 | |||
@@ -295,6 +296,7 b' the extension is unknown.' | |||||
295 | hgweb Configuring hgweb |
|
296 | hgweb Configuring hgweb | |
296 | merge-tools Merge Tools |
|
297 | merge-tools Merge Tools | |
297 | pager Pager Support |
|
298 | pager Pager Support | |
|
299 | rust Rust in Mercurial | |||
298 |
|
300 | |||
299 | Concepts: |
|
301 | Concepts: | |
300 |
|
302 | |||
@@ -1583,6 +1585,8 b' Separate sections from subsections' | |||||
1583 |
|
1585 | |||
1584 | "usefncache" |
|
1586 | "usefncache" | |
1585 |
|
1587 | |||
|
1588 | "exp-rc-dirstate-v2" | |||
|
1589 | ||||
1586 | "use-persistent-nodemap" |
|
1590 | "use-persistent-nodemap" | |
1587 |
|
1591 | |||
1588 | "use-share-safe" |
|
1592 | "use-share-safe" | |
@@ -2413,6 +2417,13 b' Dish up an empty repo; serve it cold.' | |||||
2413 | Specifying Revisions |
|
2417 | Specifying Revisions | |
2414 | </td></tr> |
|
2418 | </td></tr> | |
2415 | <tr><td> |
|
2419 | <tr><td> | |
|
2420 | <a href="/help/rust"> | |||
|
2421 | rust | |||
|
2422 | </a> | |||
|
2423 | </td><td> | |||
|
2424 | Rust in Mercurial | |||
|
2425 | </td></tr> | |||
|
2426 | <tr><td> | |||
2416 | <a href="/help/scripting"> |
|
2427 | <a href="/help/scripting"> | |
2417 | scripting |
|
2428 | scripting | |
2418 | </a> |
|
2429 | </a> |
@@ -2324,6 +2324,10 b' help/ shows help topics' | |||||
2324 | "topic": "revisions" |
|
2324 | "topic": "revisions" | |
2325 | }, |
|
2325 | }, | |
2326 | { |
|
2326 | { | |
|
2327 | "summary": "Rust in Mercurial", | |||
|
2328 | "topic": "rust" | |||
|
2329 | }, | |||
|
2330 | { | |||
2327 | "summary": "Using Mercurial from scripts and automation", |
|
2331 | "summary": "Using Mercurial from scripts and automation", | |
2328 | "topic": "scripting" |
|
2332 | "topic": "scripting" | |
2329 | }, |
|
2333 | }, |
General Comments 0
You need to be logged in to leave comments.
Login now