Mercurial with Rust

ทดลอง build Mercurial ที่มี Rust Extension

Mercurial มีแผนจะใช้ Rust มาแทนที่งานหลักๆ ที่เขียนด้วย Python อยู่แล้ว (Oxidation Plan) วิธีการ build ก็แค่ export HGWITHRUSTEXT=cpython ก่อนแล้วค่อย install (โดยต้องมี rust compiler อยู่ในเครื่องอยู่ก่อน)

[[email protected] ~]$ export HGWITHRUSTEXT=cpython
[[email protected] ~]$ source ~/Env/mercurial/bin/activate
(mercurial) [[email protected] ~]$ pip install --compile --upgrade mercurial
...

โดยจะพบไฟล์ rustext.cpython-38-x86_64-linux-gnu.so เพิ่มมาใน site-packages/mercuial จะเร็วขึ้นมากไหมต้องลองใช้ไปเรื่อยๆ ก่อน