annotate mercurial/helptext/rust.txt @ 52277:bf86e0b561d3 stable

rust: update install instruction As discussed last Friday after publishing the rc wheel, we need to update the rust readme and highlight that change in the release announcement if we want people using Rust to keep being able to use pip.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 20 Nov 2024 06:32:35 +0100
parents b88e9c707c95
children c8e9b37ef3c0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
48532
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
1 Mercurial can be augmented with Rust extensions for speeding up certain
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
2 operations.
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
3
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
4 Compatibility
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
5 =============
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
6
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
7 Though the Rust extensions are only tested by the project under Linux, users of
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
8 MacOS, FreeBSD and other UNIX-likes have been using the Rust extensions. Your
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
9 mileage may vary, but by all means do give us feedback or signal your interest
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
10 for better support.
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
11
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
12 No Rust extensions are available for Windows at this time.
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
13
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
14 Features
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
15 ========
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
16
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
17 The following operations are sped up when using Rust:
48582
2b271cab2d1c helptext: add missing newline to Rust helptext
Raphaël Gomès <rgomes@octobus.net>
parents: 48532
diff changeset
18
48532
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
19 - discovery of differences between repositories (pull/push)
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
20 - nodemap (see :hg:`help config.format.use-persistent-nodemap`)
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
21 - all commands using the dirstate (status, commit, diff, add, update, etc.)
48674
f7086f6173f8 dirstate-v2: rename the configuration to enable the format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48582
diff changeset
22 - dirstate-v2 (see :hg:`help config.format.use-dirstate-v2`)
48532
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
23 - iteration over ancestors in a graph
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
24
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
25 More features are in the works, and improvements on the above listed are still
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
26 in progress. For more experimental work see the "rhg" section.
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
27
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
28 Checking for Rust
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
29 =================
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
30
49159
363b687bb794 docs: use proper rst markup for preformatted blocks
Mads Kiilerich <mads@kiilerich.com>
parents: 48674
diff changeset
31 You may already have the Rust extensions depending on how you install
363b687bb794 docs: use proper rst markup for preformatted blocks
Mads Kiilerich <mads@kiilerich.com>
parents: 48674
diff changeset
32 Mercurial::
48532
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
33
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
34 $ hg debuginstall | grep -i rust
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
35 checking Rust extensions (installed)
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
36 checking module policy (rust+c-allow)
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
37
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
38 If those lines don't even exist, you're using an old version of `hg` which does
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
39 not have any Rust extensions yet.
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
40
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
41 Installing
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
42 ==========
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
43
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
44 You will need `cargo` to be in your `$PATH`. See the "MSRV" section for which
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
45 version to use.
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
46
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
47 Using pip
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
48 ---------
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
49
49159
363b687bb794 docs: use proper rst markup for preformatted blocks
Mads Kiilerich <mads@kiilerich.com>
parents: 48674
diff changeset
50 Users of `pip` can install the Rust extensions with the following command::
48532
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
51
52277
bf86e0b561d3 rust: update install instruction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50423
diff changeset
52 $ pip install mercurial \
bf86e0b561d3 rust: update install instruction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50423
diff changeset
53 --global-option \
bf86e0b561d3 rust: update install instruction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50423
diff changeset
54 --rust \
bf86e0b561d3 rust: update install instruction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50423
diff changeset
55 --no-use-pep517 \
bf86e0b561d3 rust: update install instruction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50423
diff changeset
56 --no-binary mercurial
48532
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
57
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
58 `--no-use-pep517` is here to tell `pip` to preserve backwards compatibility with
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
59 the legacy `setup.py` system. Mercurial has not yet migrated its complex setup
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
60 to the new system, so we still need this to add compiled extensions.
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
61
52277
bf86e0b561d3 rust: update install instruction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50423
diff changeset
62 `--no-binary` is there to tell pip to not use the pre-compiled wheels that are
bf86e0b561d3 rust: update install instruction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50423
diff changeset
63 missing rust support. This might take a couple of minutes because you're
bf86e0b561d3 rust: update install instruction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50423
diff changeset
64 compiling everything.
48532
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
65
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
66 See the "Checking for Rust" section to see if the install succeeded.
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
67
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
68 From your distribution
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
69 ----------------------
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
70
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
71 Some distributions are shipping Mercurial with Rust extensions enabled and
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
72 pre-compiled (meaning you won't have to install `cargo`), or allow you to
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
73 specify an install flag. Check with your specific distribution for how to do
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
74 that, or ask their team to add support for hg+Rust!
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
75
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
76 From source
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
77 -----------
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
78
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
79 Please refer to the `rust/README.rst` file in the Mercurial repository for
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
80 instructions on how to install from source.
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
81
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
82 MSRV
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
83 ====
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
84
50423
b88e9c707c95 rust: configure MSRV in Clippy
Georges Racinet <georges.racinet@octobus.net>
parents: 49629
diff changeset
85 The minimum supported Rust version is defined in `rust/clippy.toml`.
b88e9c707c95 rust: configure MSRV in Clippy
Georges Racinet <georges.racinet@octobus.net>
parents: 49629
diff changeset
86 The project's policy is to keep it at or below the version from Debian testing,
b88e9c707c95 rust: configure MSRV in Clippy
Georges Racinet <georges.racinet@octobus.net>
parents: 49629
diff changeset
87 to make the distributions' job easier.
48532
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
88
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
89 rhg
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
90 ===
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
91
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
92 There exists an experimental pure-Rust version of Mercurial called `rhg` with a
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
93 fallback mechanism for unsupported invocations. It allows for much faster
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
94 execution of certain commands while adding no discernable overhead for the rest.
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
95
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
96 The only way of trying it out is by building it from source. Please refer to
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
97 `rust/README.rst` in the Mercurial repository.
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
98
49564
b1c20e41098f rhg: add `config.rhg` helptext
Raphaël Gomès <rgomes@octobus.net>
parents: 49159
diff changeset
99 See `hg help config.rhg` for configuration options.
b1c20e41098f rhg: add `config.rhg` helptext
Raphaël Gomès <rgomes@octobus.net>
parents: 49159
diff changeset
100
48532
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
101 Contributing
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
102 ============
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
103
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
104 If you would like to help the Rust endeavor, please refer to `rust/README.rst`
7ccd31fda132 docs: add documentation about Rust
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
105 in the Mercurial repository.