mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 01:39:21 +03:00
4629e800fa
Summary: This crate compiles in a binary entry-point for Mercurial. The way the binary works at first: - dynamically link to the Python's shared library (Linux, Windows) or Python Framework (OSX) - find the location of `hgexe.py` (this is what's currently known as `hg` and what serves as a shebang entrypoint on OSX and Linux today) - call `Py_Main` with `hgexe.py` and the rest of the supplied arguments A couple of decisions that someone might find controversial: - all strings are expected to be correctly conversible to/from Rust String - in particular, this means that we're limiting the command line arguments (and therefore the repo file names) to the valid Unicode strings. This is not much of a limitation on Windows, but it is on Linux. - `build.rs` takes linker path hints from the environment, to be supplied by the `setup.py` later - `hgexe.py` is expected to live either alongside the resulting binary or in the `libexec` dir, that is a sister to one of the binary's parents. Reviewed By: quark-zju Differential Revision: D9218066 fbshipit-source-id: ff6e01d06f118cd6bc1a20fbab6b5d17fe51b531 |
||
---|---|---|
.. | ||
hgmain | ||
scm_daemon |