Skip to main content

Questions tagged [rust]

Rust is a systems programming language focused on three goals: safety, speed, and concurrency. It maintains these goals without needing a garbage collector, making it a useful language for a number of use cases other languages aren't good at: embedding in other languages, programs with specific space and time requirements, and writing low-level code, like device drivers and operating systems.

1vote
1answer
82views

Creating functions that send and receive atomic messages in Rust paradigm

I'm converting a library from C to Rust, and I want to see if this is the optimal way to implement network communication. This ...
Jonathon Anderson's user avatar
1vote
3answers
198views

fibonacci sequence generator

I have a piece of code that attempts to reduce the work and span in making a Fibonacci sequence. My approach is to parallelize the code as much as possible, along with doing matrix multiplication and ...
Droid's user avatar
5votes
1answer
103views

File system regex searcher

This is my first Rust project (I'm primarily a C guy). I want to know if my code is properly idiomatic (Rusty?). Also, are there any inefficiencies? The code defines an iterator (...
Daniel Walker's user avatar
4votes
3answers
105views

Number guessing game in Rust

I am learning Rust and would like a review to make sure I am following best Rust practices before continuing. The user enters a number between 1 and 100 up to 6 times to guess the randomly-generated ...
Hosch250's user avatar
2votes
0answers
82views

Monte-Carlo pricing engine for a structured product

I'm implementing a Monte-Carlo pricing engine to price a structured product in Rust, using the usual Black-Scholes assumptions. This pricing engine is used in a (basic) gRPC server which receives all ...
Exercise To The Reader's user avatar
4votes
1answer
130views

Generating Time-based One Time Passcode

Following Wikipedia: Time-based one-time password and Wikipedia: HMAC-based one-time password, is this Rust implementation of the TOTP/HOTP algorithm correct? As far as I can see, this matches the ...
Michael's user avatar
1vote
1answer
58views

Needleman-Wunsch algorithm with affine gap cost

Needleman-Wunsch is a bioinformatics algorithm used to align 2 sequences. The algorithm outputs the score of the alignment and a Vec containing all operations to reconstruct the alignment. I do not ...
RomainL.'s user avatar
0votes
0answers
31views

GraphQL client for Github Projects API

As a fun hobby project I made my own time logger in Rust called Rusty Time Logger. You can track how many time you spent on a ticket or feature, until now it missed the feature to automatically update ...
O'Niel's user avatar
6votes
2answers
387views

Rust implementation of Euler problems

I'm starting to learn rust and figured my first simple project would be to solve some of the Euler problems. I'd appreciate if anyone could tell me where I might be ...
zephyr's user avatar
3votes
1answer
94views

File list and monitor

I recently was given a take home assignment for a job interview. The task was specified like so: ...
genghiskhan's user avatar
4votes
1answer
163views

Simple Sieve of Eratosthenes

I've implemented this version of the Sieve of Eratosthenes in Rust, with inputs. I'm mostly pleased with it, but want to know if the input logic can be simplified, and if the sieve itself can be ...
Vessel's user avatar
5votes
1answer
109views

Generating random bytes

I implemented a simple function that generated random bytes Vec<u8> with given n size. Then I wondered how can I optimize ...
marknikky's user avatar
5votes
1answer
95views

LeetCode Rust solution for the Sliding Puzzle problem #773

Here is the solution to the LeetCode Sliding Puzzle Problem #773. The problem is to find the shortest solution for a 3 x 2 sliding puzzle. I would appreciate any ideas to improve this code. But it's ...
Eugene Krokhalev's user avatar
7votes
1answer
86views

LeetCode Rust solution for the Flip Columns problem #1072

Here is the solution to LeetCode Problem #1072. The problem is to find the maximum number of rows in a matrix where all the values can be made equal after some columns are flipped. It's assumed that ...
Eugene Krokhalev's user avatar
2votes
0answers
95views

MIDI router in Rust

I am working on a small MIDI router application for the Jack audio connection kit in Rust. The goal of the application is to route MIDI signals from an instrument to one or multiple applications in ...
Green 绿色's user avatar

153050per page
close