How do I use local files without including their absolute paths in build.rs? I have, for example let proto_file_glob_paths: Paths = glob("../proto/**/*.proto").
I'm trying to use. strongly typed wrapper for a "keys" in my program, so that I don't mistake arbitrary strings for a Key. I have: #[derive(Debug, Clone, Partia
I would like to poll a raw file descriptor for data and process it as it gets written to. This needs to be done on a separate thread so that my main thread is
I'm writing a cli tool for automate the archlinux installation, that is based on toml config files... Currently i have this problem... Once the base system is i
I am trying to install terrain from terra-money. For that, the instructions said to follow the commands. I have run these instructions on ubuntu 20.04 1. Set 's
I have installed both nightly and stable rust toolchains and make some -Z ... compile flags for nightly, but the stable rust can't recognize it and stops compil
It's easy to use nom to parse a string until a character is found. How to use nom to gobble a string until a delimiter or the end? deals with this. How do I do
I want to create a Wrapper around an existing type/struct. According to the Newtype pattern, as per Rust Book ch 19, "implementing Deref trait on the Wrapper to
I am trying to use the standard casper demo project as generated by command "cargo casper my-project" but with some std::io. I want to read a value from the con
I am following the diesel guide: LINK When i try this: cargo install diesel_cli --no-default-features --features postgres i receive this error: error: failed t
piet is a drawing library with generic backends (cairo, for example). I want to have a trait Renderable that can render to any piet backend (=context). pub trai
I am developing an API with Rust, using Rocket as main framework. To create the Swagger docs I use Okapi, which allows me to create the docs automatically. use
I am trying to #[derive(Deserialize, Serialize)] some structs that involve other custom structs, so I can transform them in and out of JSON, for example: #[deri
I try to call my function just like the example code: use std::arch::asm; extern "C" fn foo(arg: i32) -> i32 { println!("arg = {}", arg); arg * 2 }
The following code compiles fine: struct StructA<F>(F); impl<F, T> StructA<F> where F: Fn() -> T {} Although T doesn't show up in StructA'
use anchor_lang::prelude::*; declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"); #[program] pub mod myepicproject { use super::*; pub fn start_st
I have a dll that i want to call from Progress code but I can't complete. I have tried with Visual Studio 2022, Windows C++ Dll and Rust Dll. Windows C++, Visua
I've created a server using Actix Web which has authentication support. Now I want to add an OpenAPI Specification using paperclip. Normally you only have to ad
I am learning how to write a http server using tcpstream with rust. I use this function to read stream buffer. fn handle_connection(mut stream: TcpStream) {
I have downloaded the GTK4 demo from Github and placed it in a directory. I have opened it in VC and attempt to run the demo according to the Read.ME. I get t