use crypto_crawler::{crawl_trade, MarketType};
#[tokio::main]
async fn main() {
let (tx, rx) = std::sync::mpsc::channel();
tokio::task::spawn(async move {
for msg in rx {
println!("{}", msg);
}
});
crawl_trade("binance", MarketType::Spot, None, tx).await;
}
Cargo.toml:
[package]
name = "crypto_test"
version = "0.1.0"
edition = "2021"
[dependencies]
tokio = { version = "1", features = ["full"] }
crypto-crawler = "*"
> cargo run
thread 'main' has overflowed its stack
error: process didn't exit successfully: `target\debug\crypto_test.exe` (exit code: 0xc00000fd, STATUS_STACK_OVERFLOW)
It seems between frame 17 and 18 a bunch of state data (500Kb) is allocated on stack instead of heap or something. Don't have much time to investigate, sorry.
rustc 1.60.0 (7737e0b5c 2022-04-04)
Window 11 10.0.22000 Build 22000
main.rs:
Cargo.toml:
Callstack
``` (665c.31a0): Stack overflow - code c00000fd (first chance) First chance exceptions are reported before any exception handling. This exception may be expected and handled. *** WARNING: Unable to verify checksum for crypto_test.exe crypto_test!__chkstk+0x37: 00007ff7`4a62c887 41c60300 mov byte ptr [r11],0 ds:0000008c`6af06000=00 0:000> k # Child-SP RetAddr Call Site 00 0000008c`6af08cd8 00007ff7`4992d3db crypto_test!__chkstk+0x37 [d:\a01\_work\43\s\src\vctools\crt\vcstartup\src\misc\amd64\chkstk.asm @ 109] 01 0000008c`6af08cf0 00007ff7`49918e7d crypto_test!tungstenite::handshake::machine::HandshakeMachineIt seems between frame 17 and 18 a bunch of state data (500Kb) is allocated on stack instead of heap or something. Don't have much time to investigate, sorry.