├── .gitignore ├── LICENSE ├── readme.md ├── rust_for_trading.md └── rust_tips.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | .vscode/ 6 | 7 | # C extensions 8 | *.so 9 | 10 | # Distribution / packaging 11 | .Python 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | wheels/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | cover/ 54 | 55 | # Translations 56 | *.mo 57 | *.pot 58 | 59 | # Django stuff: 60 | *.log 61 | local_settings.py 62 | db.sqlite3 63 | db.sqlite3-journal 64 | 65 | # Flask stuff: 66 | instance/ 67 | .webassets-cache 68 | 69 | # Scrapy stuff: 70 | .scrapy 71 | 72 | # Sphinx documentation 73 | docs/_build/ 74 | 75 | # PyBuilder 76 | .pybuilder/ 77 | target/ 78 | 79 | # Jupyter Notebook 80 | .ipynb_checkpoints 81 | 82 | # IPython 83 | profile_default/ 84 | ipython_config.py 85 | 86 | # pyenv 87 | # For a library or package, you might want to ignore these files since the code is 88 | # intended to run in multiple environments; otherwise, check them in: 89 | # .python-version 90 | 91 | # pipenv 92 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 93 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 94 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 95 | # install all needed dependencies. 96 | #Pipfile.lock 97 | 98 | # poetry 99 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 100 | # This is especially recommended for binary packages to ensure reproducibility, and is more 101 | # commonly ignored for libraries. 102 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 103 | #poetry.lock 104 | 105 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 106 | __pypackages__/ 107 | 108 | # Celery stuff 109 | celerybeat-schedule 110 | celerybeat.pid 111 | 112 | # SageMath parsed files 113 | *.sage.py 114 | 115 | # Environments 116 | .env 117 | .venv 118 | env/ 119 | venv/ 120 | ENV/ 121 | env.bak/ 122 | venv.bak/ 123 | 124 | # Spyder project settings 125 | .spyderproject 126 | .spyproject 127 | 128 | # Rope project settings 129 | .ropeproject 130 | 131 | # mkdocs documentation 132 | /site 133 | 134 | # mypy 135 | .mypy_cache/ 136 | .dmypy.json 137 | dmypy.json 138 | 139 | # Pyre type checker 140 | .pyre/ 141 | 142 | # pytype static type analyzer 143 | .pytype/ 144 | 145 | # Cython debug symbols 146 | cython_debug/ 147 | 148 | # PyCharm 149 | # JetBrains specific template is maintainted in a separate JetBrains.gitignore that can 150 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 151 | # and can be added to the global gitignore or merged into this file. For a more nuclear 152 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 153 | #.idea/ 154 | 155 | # General 156 | .DS_Store 157 | .AppleDouble 158 | .LSOverride 159 | 160 | # Icon must end with two \r 161 | Icon 162 | 163 | 164 | # Thumbnails 165 | ._* 166 | 167 | # Files that might appear in the root of a volume 168 | .DocumentRevisions-V100 169 | .fseventsd 170 | .Spotlight-V100 171 | .TemporaryItems 172 | .Trashes 173 | .VolumeIcon.icns 174 | .com.apple.timemachine.donotpresent 175 | 176 | # Directories potentially created on remote AFP share 177 | .AppleDB 178 | .AppleDesktop 179 | Network Trash Folder 180 | Temporary Items 181 | .apdisk 182 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Zhe Wang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Rust学习驿站:Rust学习资料(文档、书籍、视频)、Rust博客 2 | 3 | Rust学习驿站 4 | 5 | - [Rust学习驿站:Rust学习资料(文档、书籍、视频)、Rust博客](#rust学习驿站rust学习资料文档书籍视频rust博客) 6 | - [书籍](#书籍) 7 | - [入门](#入门) 8 | - [进阶](#进阶) 9 | - [应用](#应用) 10 | - [中文资源](#中文资源) 11 | - [博客](#博客) 12 | - [Youtube](#youtube) 13 | - [Rust for Trading](#rust-for-trading) 14 | - [Buy me a coffee?](#buy-me-a-coffee) 15 | 16 | > © 2021 Zhe Wang ( [知乎 - 泛程序员](https://www.zhihu.com/people/wangzhetju) | [wangzhetju@gmail.com](mailto:wangzhetju@gmai.com)) 17 | 18 | ## 书籍 19 | 20 | > 书籍大部分可以在 [Z Library](https://b-ok.cc/) 找到,版权问题,不附带书籍PDF,请购买正版。 21 | 22 | ### 入门 23 | 24 | - [Rust语言圣经](https://course.rs/about-book.html) 25 | - [The Rust Programming Language](https://doc.rust-lang.org/book/title-page.html#the-rust-programming-language) | [中文](https://kaisery.github.io/trpl-zh-cn/title-page.html) 26 | - [Rust by Example](https://doc.rust-lang.org/rust-by-example/index.html#rust-by-example) | [中文](https://github.com/rust-lang-cn/rust-by-example-cn) 27 | - [The Cargo Book](https://doc.rust-lang.org/cargo/) | [中文](https://github.com/rust-lang-cn/cargo-cn) 28 | - [Rustlings](https://github.com/rust-lang/rustlings) - This project contains small exercises to get you used to reading and writing Rust code. 29 | 30 | ### 进阶 31 | 32 | - [Rust In Action](https://github.com/rust-in-action/code) 33 | - [Rust Cookbook](https://rust-lang-nursery.github.io/rust-cookbook/intro.html):主要是一些不同的 code snips 34 | - [The Rust Performance Book](https://nnethercote.github.io/perf-book/title-page.html#the-rust-performance-book): This book contains many techniques that can improve the performance—speed and memory usage—of Rust programs. 35 | - [Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/01_getting_started/01_chapter.html): this book will show you how to use Rust's asynchronous programming tools to get the most out of your hardware. 36 | - [Rust for Rustaceans: Idiomatic Programming for Experienced Developers]() 37 | 38 | ### 应用 39 | 40 | - [Hands-On Data Structures and Algorithms with Rust](https://github.com/PacktPublishing/Hands-On-Data-Structures-and-Algorithms-with-Rust) 41 | - [Rust Design patterns](https://rust-unofficial.github.io/patterns/intro.html#design-patterns) 42 | 43 | ## 中文资源 44 | 45 | - [Rust 官方文档中文教程](https://rustwiki.org/) 46 | - [B栈视频合集](https://space.bilibili.com/414096658/channel/collectiondetail?sid=100561) 47 | - [Rustt翻译计划,这里有国内最优质、最实时的 Rust 技术文章、学习资料和新闻资讯](https://github.com/studyrs/Rustt) 48 | - [Awesome Rust](https://github.com/studyrs/fancy-rust) 49 | 50 | ## 博客 51 | 52 | - [Rust编程](https://zhuanlan.zhihu.com/rust-lang) 53 | - [idiomatic-rust](https://github.com/mre/idiomatic-rust) 54 | - [Exploring Rust ecosystem](https://github.com/rkudryashov/exploring-rust-ecosystem) 55 | - [Quantitative Trading](https://markrbest.github.io/) 56 | 57 | ## Youtube 58 | 59 | - [Jon Gjengset的频道 - Rust for Rustaceans的作者](https://www.youtube.com/c/JonGjengset) 60 | 61 | ## [Rust for Trading](./rust_for_trading.md) 62 | 63 | ## Buy me a coffee? 64 | 65 | It takes time to produce videos, articles, and maintains the repositories. 66 | Feel free to support me :) thanks. 67 | 68 | - [Patreon](https://www.patreon.com/funcoder777) 69 | - ETH: 0xb5fEE7B6776877bB78C2b7594802C6a09f52D9B7 70 | - BTC: bc1qrjrffv7aaf5f4f6dydkt4yaukt4297vedd6w6p 71 | - 支付宝 72 | 73 | 74 | -------------------------------------------------------------------------------- /rust_for_trading.md: -------------------------------------------------------------------------------- 1 | # Rust for Trading 2 | 3 | - [barter-rs](https://gitlab.com/open-source-keir/financial-modelling/trading/barter-rs) | `Rust` | - Open-source Rust framework for building event-driven live-trading & backtesting systems. Algorithmic trade with the peace of mind that comes from knowing your strategies have been backtested with a near-identical trading Engine. 4 | - [FlashFunk](https://github.com/HFQR/FlashFunk) | `Rust` | - High Performance Runtime in Rust 5 | - [QUANTAXIS](https://github.com/QUANTAXIS/QUANTAXIS) | `Python`, `Rust`, `Live Trading` | - QUANTAXIS 支持任务调度 分布式部署的 股票/期货/期权/港股/虚拟货币 数据/回测/模拟/交易/可视化/多账户 纯本地量化解决方案 6 | 7 | ## Tools 8 | 9 | - [ndarray](https://github.com/rust-ndarray/ndarray) | `Rust` | - ndarray: an N-dimensional array with array views, multidimensional slicing, and efficient operations 10 | - [Polars](https://github.com/pola-rs/polars) | `Rust`, `Python` | - Polars is a blazingly fast DataFrames library implemented in Rust using Apache Arrow Columnar Format as memory model. 11 | - [Ta-lib](https://github.com/CLevasseur/ta-lib-rust) | `Rust` | 12 | - [ta-rust](https://github.com/greyblake/ta-rs) | `Rust` | - Technical analysis library for Rust language 13 | - [Tectonicdb](https://github.com/0b01/tectonicdb) | `Rust` | - Tectonicdb is a fast, highly compressed standalone database and streaming protocol for order book ticks. 14 | 15 | ## Order books 16 | 17 | - [Lobster](https://github.com/rubik/lobster) - A fast in-memory limit order book (LOB) 18 | 19 | ## Crypto 20 | 21 | - [Coinbase pro client for Rust](https://github.com/inv2004/coinbase-pro-rs) 22 | - [A trading bot written in Rust based on the orderbook delta volume.Resources](https://github.com/dineshpinto/orderbook-delta-bot) 23 | - [openlimits](https://github.com/nash-io/openlimits) | `Rust` | - A Rust high performance cryptocurrency trading API with support for multiple exchanges and language wrappers. 24 | - [Coinnect](https://github.com/hugues31/coinnect) | `Rust` | - Coinnect is a Rust library aiming to provide a complete access to main crypto currencies exchanges via REST API. 25 | - [bTrader](https://github.com/gabriel-milan/btrader) | `Rust` | - Triangle arbitrage trading bot for Binance 26 | - [crypto-crawler-rs](https://github.com/crypto-crawler/crypto-crawler-rs) | `Rust` | - Crawl orderbook and trade messages from crypto exchanges 27 | - [cryptotrader-core](https://github.com/monomadic/cryptotrader-core) | `Rust` | - Simple to use Crypto Exchange REST API client in rust. 28 | 29 | ## Blogs 30 | 31 | - [Building an Exchange in Rust — Part 1](https://chessbr.medium.com/building-an-exchange-in-rust-part-1-78ab153864d7) 32 | - [Porting a Python Limit Orderbook to Rust](https://sanket.tech/posts/rustbook/) -------------------------------------------------------------------------------- /rust_tips.md: -------------------------------------------------------------------------------- 1 | # Rust Tips 2 | 3 | 这种方式处理异常更好: 4 | 5 | `let mut f = File::Open(&mut fname).expect("这里放入失败的提示信息")` 6 | 7 | 因为,仅仅 `unwrap` 失败会直接 panic。 8 | 9 | trait 用来做动态派发,generic 用来做静态派发。 10 | 11 | ## Topics 12 | 13 | ### trait 的原理和使用 14 | 15 | ### 小且给力的Rust库 16 | 17 | - [evmap](https://github.com/jonhoo/evmap) - A lock-free, eventually consistent, concurrent multi-value map. 18 | - [left-right](https://github.com/jonhoo/left-right) - A lock-free, read-optimized, concurrency primitive. 19 | --------------------------------------------------------------------------------