sapling/eden/scm/lib/README.md
Saul Gutierrez 7f8e4f2439 hgext: rename ext to hgext
Summary: We since internally we will start to refer to `hg` as `sapling`, the `hgext` directory does not make that much sense now. This diff renames the `hgext` directory to `ext`, as well as all the references to it.

Reviewed By: jordanwebster

Differential Revision: D38914577

fbshipit-source-id: 2d01fc9ead26f309d9021ffe34e0812e0f2a13b7
2022-08-23 15:19:05 -07:00

787 B

lib

Any native code (C/C++/Rust) that Mercurial (either core or extensions) depends on should go here. Python code, or native code that depends on Python code (e.g. #include <Python.h> or use cpython) is disallowed.

As we start to convert more of Mercurial into Rust, and write new paths entrirely in native code, we'll want to limit our dependency on Python, which is why this barrier exists.

See also ext/extlib/README.md, mercurial/cext/README.mb.

How do I choose between lib and extlib (and cext)?

If your code is native and doesn't depend on Python (awesome!), it goes here.

Otherwise, put it in ext/extlib (if it's only used by extensions) or mercurial/cext (if it's used by extensions or core).