I want to create an interface for a (numeric) algorithm for which I want to provide an implementation with ndarray and similar libraries (let's say pytorch bind
I would like to use raw byte argument with clap For example --raw $(echo -n -e 'B\x10CC\x01\xff') will give me the following bytes array [66, 16, 67, 67, 1, 239
I have a small application that if I do a println!("Hello World"); compiles and runs properly. If I change the source to ... let app = Application::bui
I am creating a dapp where multiple users can deposit SOL into an event account, and depending on whoever wins the event, they can redeem SOL back to their wall
I have a C code snippet which uses pipe() and fork() to communicate between parent and child process. I want to replicate it in Rust. For the POSIX APIs used in
I'm writing a text editor in Rust using egui. I am trying to implement syntax highlighting, so I followed the example in the demo. It works there, so I thought
Consider the following code: use std::net::IpAddr; pub struct Server { host: IpAddr } impl Server { fn new(host: IpAddr) -> Self { Self {ho
I want to use RSA-PSS algorithm to sign and verify data by using rust openssl crate. But I ran into some problems. Here is my code: use openssl::sign::{Sign
Trying to replace all the \n character after the word 'key2:' pattern with comma. Input String: key1:value1\nkey2:value2\nvalue22\nvalue222 Expected: key1:valu
Given the macro matching example, this shows how macros can match an argument. I've made very minor changes here to use numbers: macro_rules! foo { (0 =&g
I'm receiving RecordBatches serialized as bytes and I'm trying to de-serialize into RecordBatches. Using StreamReader::try_new() and passing in the byte data an
Background Imagine the situation: static library libR.a is written rust and it depends on libCXX0.a. Binary X depends on both libR.a and libCXX0.a and it is wri
I try to build my own init with rust language. this is my example code : use std::process::Command; fn main() { loop { println!("Welcome to custom
I need decompress and unpack big .tar.gz files (e.g. ~5Gb) in download process without save an archive file on disk. I use reqwest crate for downloading files,
I'm making an emulated os that uses a browser to render and a abstraction of file system to allow apps to access their folders only. However, since it's an laye
I have created a rust tcp server framework. (https://github.com/HasinZaman/SingleThreadServer) The framework works fine without any issue on my local machine; a
Today when I using cargo cargo 1.59.0 (49d8809dc 2022-02-10) compile the rust rustc 1.59.0 (9d1b2106e 2022-02-23) project, shows error: error[E0412]: cannot fin
I am trying to CPI the Token Program to send spl-tokens to a wallet. For this the derive accounts in the context struct has three accounts without any attribute
I'm trying to create an Iterator interface using the csv crate such that I can return a HashMap of col-name: value and am running into a lifetime error I cannot
In Rust you can inspect environment variables at compile time like so: let sha: Option<&'static str> = option_env!("CI_COMMIT_SHA"); println!("CI_COMM