nkaz001 / hftbacktest

A high-frequency trading and market-making backtesting and trading bot in Python and Rust, which accounts for limit orders, queue positions, and latencies, utilizing full tick data for trades and order books, with real-world crypto market-making examples for Binance Futures
MIT License
2.02k stars 397 forks source link

Add log in npy reader #107

Closed ian-wazowski closed 3 months ago

ian-wazowski commented 3 months ago
nkaz001 commented 3 months ago

Regarding len, I'm unsure if it needs to be dereferenced. What error occurs? https://doc.rust-lang.org/std/primitive.pointer.html#impl-*mut+%5BT%5D

bohblue2 commented 3 months ago

Regarding len, I'm unsure if it needs to be dereferenced. What error occurs? https://doc.rust-lang.org/std/primitive.pointer.html#impl-*mut+%5BT%5D

Rust analyzer detected error. (I will add more logs this problem may be 3 hours later. I am doing something else.)

is that can occurred due to cargo version ? This error always happened on my laptops 20 commits ago

bohblue2 commented 3 months ago
error[E0658]: use of unstable library feature 'slice_ptr_len'
   --> hftbacktest/src/utils/aligned.rs:103:22
    |
103 |             len: ptr.len(),
    |                      ^^^
    |
    = note: see issue #71146 <https://github.com/rust-lang/rust/issues/71146> for more information
error[E0658]: use of unstable library feature 'slice_ptr_len'
   --> hftbacktest/src/backtest/data/mod.rs:143:18
    |
143 |         self.ptr.len()
    |                  ^^^
    |
    = note: see issue #71146 <https://github.com/rust-lang/rust/issues/71146> for more information

I'm sure my cargo settings are wrong, but it would be nice to have some information about the unstable library feature in the README.md.

bohblue2 commented 3 months ago

rustup update solve these problem, sorry for interrupt.

For reference, ian-wazowski is my account.

nkaz001 commented 3 months ago

The minimum required Rust version has been added to Cargo.toml. [06afa17fcfc2d7b16d54d62ed6abf42930e5605a]