Mercurial with Rust

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

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

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

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