docs: def find_rust_extensions(*directories, **kwargs):
      """Attempt to find Rust extensions in given directories.
  
      This function will recurse through the directories in the given
      directories, to find a name whose name is ``libfile``. When such
      a file is found, an extension is created, expecting the cargo
      manifest file (``Cargo.toml``) to be next to that file. The
      extension destination will be deduced from the name of the
      directory where that ``libfile`` is contained.
  
      Arguments:
          directories (list, *optional*): a list of directories to walk
              through recursively to find extensions. If none are given,
              then the current directory will be used instead.
  
      Keyword Arguments:
          libfile (str): the name of the file to look for when searching
              for Rust extensions. Defaults to ``lib.rs``, but might be
              changed to allow defining more *Pythonic* filenames
              (like ``__init__.rs``)!
  
      Note:
          All other keyword arguments will be directly passed to the
          `RustExtension` instance created when an extension is found.
          One may be interested in passing ``bindings`` and ``strip``
          options::
  
              >>> import setuptools_rust as rust
              >>> rust.find_rust_extensions(binding=rust.Binding.PyO3)
  
      Example:
  
          Consider the following project::
  
              lib/
               └ mylib/
                   └ rustext/
                       ├ lib.rs
                       ├  ...
                       └  Cargo.toml
              setup.py
  
          There is only one extension that can be found in the ``lib``
          module::
  
              >>> import setuptools_rust as rust
              >>> for ext in rust.find_rust_extensions("lib"):
              ...     print(ext.name, "=>", ext.path)
              lib.mylib.rustext => lib/mylib/rustext/Cargo.toml
      """
  
      # Get the file used to mark a Rust extension
      libfile = kwargs.get("libfile", "lib.rs")
  
      # Get the directories to explore
      directories = directories or [os.getcwd()]
  
      extensions = []
      for directory in directories:
          for base, dirs, files in os.walk(directory):
              if libfile in files:
                  dotpath = os.path.relpath(base).replace(os.path.sep, ".")
                  tomlpath = os.path.join(base, "Cargo.toml")
                  ext = RustExtension(dotpath, tomlpath, **kwargs)
                  ext.libfile = os.path.join(base, libfile)
                  extensions.append(ext)
  
      return extensions