##// END OF EJS Templates
rust-readme: rst fixes
Georges Racinet -
r51280:5d20fc23 default
parent child Browse files
Show More
@@ -7,17 +7,19 b' Rust is not required to use (or build) M'
7 7 improves performance in some areas.
8 8
9 9 There are currently four independent Rust projects:
10
10 11 - chg. An implementation of chg, in Rust instead of C.
11 12 - hgcli. A project that provides a (mostly) self-contained "hg" binary,
12 13 for ease of deployment and a bit of speed, using PyOxidizer. See
13 hgcli/README.md.
14 ``hgcli/README.md``.
14 15 - hg-core (and hg-cpython): implementation of some
15 16 functionality of mercurial in Rust, e.g. ancestry computations in
16 17 revision graphs, status or pull discovery. The top-level ``Cargo.toml`` file
17 18 defines a workspace containing these crates.
18 19 - rhg: a pure Rust implementation of Mercurial, with a fallback mechanism for
19 unsupported invocations. It reuses the logic `hg-core` but completely forgoes
20 interaction with Python. See `rust/rhg/README.md` for more details.
20 unsupported invocations. It reuses the logic ``hg-core`` but
21 completely forgoes interaction with Python. See
22 ``rust/rhg/README.md`` for more details.
21 23
22 24 Using Rust code
23 25 ===============
@@ -41,10 +43,10 b' Special features'
41 43 ================
42 44
43 45 In the future, compile-time opt-ins may be added
44 to the `features` section in ``hg-cpython/Cargo.toml``.
46 to the ``features`` section in ``hg-cpython/Cargo.toml``.
45 47
46 To use features from the Makefile, use the `HG_RUST_FEATURES` environment
47 variable: for instance `HG_RUST_FEATURES="some-feature other-feature"`
48 To use features from the Makefile, use the ``HG_RUST_FEATURES`` environment
49 variable: for instance ``HG_RUST_FEATURES="some-feature other-feature"``.
48 50
49 51 Profiling
50 52 =========
@@ -57,7 +59,7 b' hgignore).'
57 59 Creating a ``.cargo/config`` file with the following content enables
58 60 debug information in optimized builds. This make profiles more informative
59 61 with source file name and line number for Rust stack frames and
60 (in some cases) stack frames for Rust functions that have been inlined.
62 (in some cases) stack frames for Rust functions that have been inlined::
61 63
62 64 [profile.release]
63 65 debug = true
@@ -69,7 +71,7 b' to some unlucky python code running shor'
69 71 as opposed to tools for native code like ``perf``, which attribute
70 72 time to the python interpreter instead of python functions).
71 73
72 Example usage:
74 Example usage::
73 75
74 76 $ make PURE=--rust local # Don't forget to recompile after a code change
75 77 $ py-spy record --native --output /tmp/profile.svg -- ./hg ...
General Comments 0
You need to be logged in to leave comments. Login now