Rye is a “comprehensive project and package management solution for Python” – let’s check it out!Grab a cup of tea, pull up a chair and put to one side any cognitive bias you have! (Just because it’s built with Rust doesn’t mean you have to install Rust!!!). I won’t regurgitate the excellent documentation from https://rye-up.com/ […]
In Rust, the dereference operator (*) is crucial when working with references to access the underlying values. It is especially relevant in scenarios involving borrowed data, such as when iterating over collections like arrays or vectors. When using iterators, like in a for loop, the iterator provides references to the elements, requiring the dereference operator […]
Introduction: Unlock the power of generics in Rust with this concise code example. Learn how to define and leverage generic types using the Query struct, which takes a flexible type parameter T. The accompanying meh function showcases the versatility of generics by accepting a Query<i32> instance. Discover the elegance and expressiveness of Rust’s generic programming […]
Should this compile, my initial expectation was that it would not….. In Rust, moving a value out of a Box or any other owned container is allowed, but it doesn’t invalidate the original variable (v in this case). The variable v is still in scope, and you can continue using it. However, when you print […]
I have a chat with chatGPT about Musl, static linking, libc.so.6 and dereferencing smart pointers…here is the conversation! is it possible to make a rust program that prints it’s main.rs and shows what variables live on the stack and which live on the heap? In Rust, it’s not straightforward to inspect the stack and heap […]
How to write your own library and import it from GitHub, via Cargo.toml
🟩 Rust, main.rs is typically used for the entry point of standalone executables, containing the main function. lib.rs is for library code, providing reusable functionality. When building a binary, main.rs is used; for libraries, lib.rs holds the central module.
I’ve chosen a project on GitHub to pick apart and study to learn some new code, crates and ideas. The project is : https://github.com/kyoheiu/url-shortener-axum-sled I chose it because I want to learn more about Sled as it’s recommended to be used with BDK (Bitcoin Development Kit) First, let’s have a look at Cargo.toml and see […]
I demo ECDSA public/private keys with digital signatures using Streamlit… The private key gets generated, and stays private. The public key is given to the person who want’s to verify the message. Using the public key plus the signed message they can be sure that the only the owner of the matching private key signed […]