I am looking for a crate where I can script cryptomining in Rust, does such crate exists?
You will have to be a bit more specific. What cryptocurrency? And for what purpose? Running it as a standalone program on your own system or hiding it as part of a program running on someone else's system. If the latter, please don't. If the former, why not use a non-rust miner if the most common miner for the respective cryptocurrency is not written in rust?
I mean I want to bundle it for my own computers. The problem is with current miners, it comes in its executable form. But I want to integrate it within my Rust compiled code for my own PCs.
I want to specifically code in Rust though that is the thing.
What algorithm do you want to code, then?
SOmething like maybe GUI interface which gives you the options to control the miner or something just something useful for myself as a little hobby.
So do you know what crate could possibly exist or something?
I'm asking about the specific mining algorithm. The underlying calculations, in other words. What should this miner do, exactly? Or, going another way, - what exactly cryptocurrency do you want to mine with it?
Well I want to mine Beam
but I would like to use any efficient mining algorithm.
Bitcoin-like PoW is not very complicated: just increment a nonce, hash your block and check if the hash is valid. (but maybe it's different in Beam)
All cryptocurrencies are different, so if this one does not use a framework but its own specific protocol, the details of the mining algorithm are specific, so I think there won't be any crate for that.
You can still make a binding to the official C++ implementation... however you can't mine with only the PoW module: you need to send/receive blocks from/to the network, update peers list, verify the blocks received... (this would mean either make a binding or API to the existing implementation, or RiiR)