Index: general/prog/rust.xml
===================================================================
--- general/prog/rust.xml	(revision 9335a99c8414ca77deb9471e0be55d7f2935a9a6)
+++ general/prog/rust.xml	(revision 7baeffeaadd6ed9e0bfa2ef470e5eb50d23828b3)
@@ -7,6 +7,6 @@
   <!ENTITY rust-download-http "https://static.rust-lang.org/dist/rustc-&rust-version;-src.tar.xz">
   <!ENTITY rust-download-ftp  " ">
-  <!ENTITY rust-md5sum        "e77ac3a786d013604061b17f99dd9b27">
-  <!ENTITY rust-size          "131 MB">
+  <!ENTITY rust-md5sum        "96b082a8b44707eafa9d696923f40c28">
+  <!ENTITY rust-size          "136 MB">
   <!-- Gentle Reminder: buildsize is how much the user requires for the real
        install, i.e. the source with its DESTDIR *plus* the DESTDIR.  You
@@ -15,6 +15,6 @@
        after the tests. -->
 
-  <!ENTITY rust-buildsize     "10 GB (516 MB installed) including 266 MB of ~/.cargo files for the user building this. Add 6.2 GB including extra 243 MB of ~/.cargo files if running the tests">
-  <!ENTITY rust-time          "21 SBU (including download time; add 10 SBU for tests, both on a 4-core machine)">
+  <!ENTITY rust-buildsize     "9.4 GB (674 MB installed) including 360 MB of ~/.cargo files for the user building this. Add 6.5 GB including extra 312 MB of ~/.cargo files if running the tests">
+  <!ENTITY rust-time          "17 SBU (including download time; add 23 SBU for tests, both on a 4-core machine)">
 ]>
 
@@ -258,12 +258,13 @@
     <para>
       To install into the
-      <filename class="directory">/opt</filename> directory, remove the symlink
+      <filename class="directory">/opt</filename> directory, remove any
+      existing <filename>/opt/rustc</filename> symlink
       and create a new directory (i.e. with a different name if trying a
-      modified build).
+      modified build of the same version).
       As the <systemitem class="username">root</systemitem>
       user:
     </para>
 
-<screen role="root"><userinput>mkdir /opt/rustc-&rust-version;             &amp;&amp;
+<screen role="root"><userinput>mkdir /opt/rustc-&rust-version;         &amp;&amp;
 ln -svfn rustc-&rust-version; /opt/rustc</userinput></screen>
 
@@ -284,6 +285,10 @@
 <screen><userinput>cat &lt;&lt; EOF &gt; config.toml
 <literal># see config.toml.example for more possible options
-# See the 8.4 book for an example using shipped LLVM
-# e.g. if not installing clang, or using a version before 10.0
+# See the 8.4 book for an old example using shipped LLVM
+# e.g. if not installing clang, or using a version before 13.0
+
+# tell x.py to not keep printing an annoying warning
+changelog-seen = 2
+
 [llvm]
 # by default, rust will build for a myriad of architectures
@@ -297,6 +302,9 @@
 docs = false
 
-# install cargo as well as rust
+# install extended tools: cargo, clippy, etc
 extended = true
+
+# Specify which extended tools (those from the default install).
+tools = ["cargo", "clippy", "rustfmt"]
 
 [install]
@@ -308,7 +316,9 @@
 rpath = false
 
-# BLFS does not install the FileCheck executable from llvm,
-# so disable codegen tests
-codegen-tests = false
+# BLFS used to not install the FileCheck executable from llvm,
+# so disabled codegen tests.  The assembly tests rely on FileCheck
+# and cannot easily be disabled, so those will anyway fail if
+# FileCheck has not been installed.
+#codegen-tests = false
 
 [target.x86_64-unknown-linux-gnu]
@@ -341,8 +351,7 @@
        src/tools/cargo/Cargo.toml &amp;&amp; -->
 
-<screen><userinput>export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi" &amp;&amp;
-{ [ ! -e /usr/include/libssh2.h ] ||
+<screen><userinput>{ [ ! -e /usr/include/libssh2.h ] ||
   export LIBSSH2_SYS_USE_PKG_CONFIG=1; } &amp;&amp;
-python3 ./x.py build --exclude src/tools/miri</userinput></screen>
+python3 ./x.py build</userinput></screen>
 
     <note>
@@ -358,19 +367,16 @@
 
     <para>
-      To run the tests issue <command>python3 ./x.py test --verbose
-      --no-fail-fast | tee rustc-testlog</command>: as with the build, that
-      will use all available CPUs.
-    </para>
-
-    <para>
-      At a minimum, 51 tests will fail: all 46 of the tests in
-      the <quote>assembly</quote> suite which are not skipped (various lints
-      cause the warnings in these tests to be treated as errors), and
-      5 other tests, 4 of which involve the
-      <filename>rustdoc-ui/issue-98690.rs</filename> file, and another one,
-      <filename>run-make-fulldeps/long-linker-command-lines</filename>.
-<!--  If <command>gdb</command> is installed,  another failure
-      (debuginfo/function-names.rs) can be expected.
-      # seems ok with 11.2 ken -->
+      To run the tests (again using all available CPUs) issue:
+    </para>
+      <!-- screen with nodump to lay it out on multiple lines -->
+<screen role="nodump">export LD_LIBRARY_PATH=$PWD/build/x86_64-unknown-linux-gnu/stage1/lib/ &amp;&amp;
+  python3 ./x.py test --verbose --no-fail-fast |
+    tee rustc-testlog ;
+unset LD_LIBRARY_PATH</screen>
+
+    <para>
+      If <command>FileCheck</command> from <application>LLVM</application> has
+      not been installed, all 47 tests from the <quote>assembly</quote> suite
+      will fail.
     </para>
 
@@ -397,23 +403,16 @@
     </para>
 
-<!--
- The total number
-      of tests varies depending on which dependencies are present, e.g. more
-      will be run if <command>gdb</command> is available. If you wish, the
-      total number which were considered can be found if you run:
-    </para>
-
-<screen remap="test"><userinput>egrep 'running [[:digit:]]+ test' rustc-testlog | awk '{ sum += $2 } END { print sum }'</userinput></screen>-->
-
-    <para>
-      The number of tests which failed can be found by running:
-    </para>
-
-<screen remap="test"><userinput>grep '^test result:' rustc-testlog | awk  '{ sum += $6 } END { print sum }'</userinput></screen>
-
-    <para>
-      And similarly if you care about how many tests passed use $4, for those
-      which were ignored (i.e. skipped) use $8 (and $10 for 'measured', $12 for
-      'filtered out' but both are probably zero).
+    <para>
+      The number of tests which passed and failed can be found by running:
+    </para>
+
+<!-- split into two lines for narrower screen windows -->
+<screen remap="test"><userinput>grep '^test result:' rustc-testlog |
+ awk '{sum1 += $4; sum2 += $6} END { print sum1 " passed; " sum2 " failed" }'</userinput></screen>
+
+    <para>
+      The other available fields are $8 for those which were ignored
+      (i.e. skipped),  $10 for 'measured' and $12 for 'filtered out' but both
+      those last two are probably zero.
     </para>
 
@@ -422,6 +421,5 @@
     </para>
 
-<screen><userinput>DESTDIR=${PWD}/install python3 ./x.py install &amp;&amp;
-unset LIBSSH2_SYS_USE_PKG_CONFIG</userinput></screen>
+<screen><userinput>DESTDIR=${PWD}/install python3 ./x.py install &amp;&amp;</userinput></screen>
 
     <para>
@@ -436,5 +434,5 @@
 
   <sect2 role="commands">
-    <title>Command Explanations</title>
+    <title>Command Explanations</title>			
 
     <para>
@@ -454,4 +452,15 @@
     <para>
       <command>extended = true</command>: this installs Cargo alongside Rust.
+    </para>
+
+    <para>
+      <command>tools = ["cargo", "clippy", "rustfmt"]</command>: if the tools
+      are not scecified, the absence of <application>Miri</application> now
+      causes the install to fail. But <application>Miri</application> is not
+      built in the stable channel. Some of the other tools are unlikely to
+      be useful unless using (old) code analyzers or editing the standard library.
+      This set match those from the 'default' profile in binary command
+      <command>rustup</command> which are recommended for most users, except that
+      the documentation was disabled at the start of the '[build]' section.
     </para>
 
@@ -489,22 +498,25 @@
     </para>-->
 
-    <para>
+    <!-- https://github.com/alexcrichton/ssh2-rs/issues/173 -->
+    <para>
+      <command>export LIBSSH2_SYS_USE_PKG_CONFIG=1</command>: Allow
+      <command>cargo</command> to link to system libssh2.
+    </para>
+
+<!--<para>
       <command>export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi"</command>:
       This adds a link to libffi to any RUSTFLAGS you may already be passing
       to the build. On some systems, linking fails to include libffi unless
       this is used. The reason why this is needed is not clear.
-    </para>
-
-    <para>
-      <command>--exclude src/tools/miri</command>: For a long time, the miri
-      crate (an interpreter for the Midlevel Intermediate Representation)
-      has failed to build on releases. It is optional, but the failure
-      messages can persuade people that the whole build failed.  However,
-      although it is not built in the main compile, with rustc-1.35.0 it
-      now got compiled during the install, but it was broken in that version.
-      <!-- might be unbroken in 1.36.0, if so remove broken from description
-       of miri below. https://github.com/rust-lang/rust/issues/61830 -->
-      Omitting it should save a little time. Even if this switch is
-      not given, miri is not installed.
+      2023-01-14 : assumed to be no longer needed, but it is some years
+      since one person reported needing this, keep it commented for the moment.
+    </para>-->
+
+    <para>
+      <command>export LD_LIBRARY_PATH=$PWD/build/x86_64-unknown-linux-gnu/stage1/lib/</command>:
+      In builds where rpath is enabled, the stage1 libraries can be used by the
+      tests. But BLFS has disabled rpath: this environment variable allows a lot
+      more tests to run. Without it there are no reported failures in most runs,
+      but some odd messages in the test log implying failures.
     </para>
 
@@ -517,10 +529,4 @@
       <command>--no-fail-fast</command>: this switch ensures that the test suite
       will not stop at the first error.
-    </para>
-
-    <!-- https://github.com/alexcrichton/ssh2-rs/issues/173 -->
-    <para>
-      <command>export LIBSSH2_SYS_USE_PKG_CONFIG=1</command>: Allow
-      <command>cargo</command> to link to system libssh2.
     </para>
 
@@ -608,8 +614,7 @@
       <segtitle>Installed Directories</segtitle>
 
-      <seglistitem>
+      <seglistitem>			
         <seg>
-          cargo-clippy, cargo-fmt, cargo-miri (optional), cargo, clippy-driver,
-          miri (optional), rls, rust-analyzer, rust-demangler, rust-gdb,
+          cargo-clippy, cargo-fmt, cargo, clippy-driver, rust-gdb,
           rust-gdbgui, rust-lldb, rustc, rustdoc, and rustfmt
         </seg>
@@ -657,5 +662,5 @@
       </varlistentry>
 
-      <varlistentry id="cargo-miri">
+<!--  <varlistentry id="cargo-miri">
         <term><command>cargo-miri</command></term>
         <listitem>
@@ -668,5 +673,5 @@
           </indexterm>
         </listitem>
-      </varlistentry>
+      </varlistentry>-->
 
       <varlistentry id="cargo">
@@ -694,5 +699,5 @@
       </varlistentry>
 
-      <varlistentry id="miri">
+<!--  <varlistentry id="miri">
         <term><command>miri</command></term>
         <listitem>
@@ -745,5 +750,5 @@
           </indexterm>
         </listitem>
-      </varlistentry>
+      </varlistentry> -->
 
       <varlistentry id="rust-gdb">
Index: introduction/welcome/changelog.xml
===================================================================
--- introduction/welcome/changelog.xml	(revision 9335a99c8414ca77deb9471e0be55d7f2935a9a6)
+++ introduction/welcome/changelog.xml	(revision 7baeffeaadd6ed9e0bfa2ef470e5eb50d23828b3)
@@ -43,4 +43,10 @@
       <itemizedlist>
         <listitem>
+          <para>[ken] - Update to rustc-1.66.1 (security update). Fixes
+          <ulink url="&blfs-ticket-root;17501">#17501</ulink>. Please
+          read yesterday's entry for 'Install FileCheck' if you have
+          installed recent LLVM without that utility.</para>
+        </listitem>
+        <listitem>
           <para>[timtas] - Update to thunar-4.18.2. Fixes
           <ulink url="&blfs-ticket-root;17498">#17498</ulink>.</para>
Index: packages.ent
===================================================================
--- packages.ent	(revision 9335a99c8414ca77deb9471e0be55d7f2935a9a6)
+++ packages.ent	(revision 7baeffeaadd6ed9e0bfa2ef470e5eb50d23828b3)
@@ -338,5 +338,5 @@
 <!ENTITY ruby-version                 "&ruby-minor-version;.&ruby-patch-version;">
 <!ENTITY ruby-gemdir                  "/usr/lib/ruby/gems/&ruby-minor-version;.0">
-<!ENTITY rust-version                 "1.64.0">
+<!ENTITY rust-version                 "1.66.1">
 <!ENTITY scons-version                "4.4.0">
 <!ENTITY slang-version                "2.3.3">
