V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
perfectlaugh
V2EX  ›  分享创造

写的一个 Rust 小程序 - Chinaroutes

  •  
  •   perfectlaugh · 2017-06-03 14:46:17 +08:00 · 2542 次点击
    这是一个创建于 2516 天前的主题,其中的信息可能已经有所发展或是发生改变。

    这是给 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 条回复    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 大牛
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1299 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 23:35 · PVG 07:35 · LAX 16:35 · JFK 19:35
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.