V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
爱意满满的作品展示区。
perfectlaugh
V2EX  ›  分享创造

写的一个 Rust 小程序 - Chinaroutes

  •  
  •   perfectlaugh · 2017-06-03 14:46:17 +08:00 · 2797 views
    This topic created in 2849 days ago, the information mentioned may be changed or developed.

    这是给 Linux-only 的小程序

    类似 project: https://github.com/fivesheep/chnroutes

    跟这个 project 的唯二不同点就是这程序是用 Rust 和 C 写的

    以及效率较快(0.32 秒完成中国所有 route 载入)

    user@Dev:~/chinaroutes$ sudo time ./target/release/chinaroutes -f ./delegated-apnic-latest.txt -t 100 --target
     10.10.0.4 -c CN 
    [sudo] password for user: 
    7868 found
    0.13user 0.12system 0:00.32elapsed 80%CPU (0avgtext+0avgdata 13244maxresident)k
    320inputs+0outputs (2major+591minor)pagefaults 0swaps
    

    望轻喷

    https://github.com/PerfectLaugh/chinaroutes

    3 replies    2017-06-04 01:28:30 +08:00
    itfanr
        1
    itfanr  
       2017-06-03 15:18:43 +08:00 via Android
    rust 大牛
    perfectlaugh
        2
    perfectlaugh  
    OP
       2017-06-03 17:18:21 +08:00
    @itfanr 只是简单的代码而已。。。
    wayslog
        3
    wayslog  
       2017-06-04 01:28:30 +08:00 via Android
    前排膜拜 Rust 大牛
    About   ·   Help   ·   Blog   ·   API   ·   FAQ   ·   Tools   ·   2579 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 04:00 · PVG 12:00 · LAX 21:00 · JFK 00:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.