Category:Rust
From Rosetta Code
Rust is an implementation of Rust.
Other implementations of Rust.
Rust
This programming language may be used to instruct a computer to perform a task.
Listed below are all of the tasks on Rosetta Code which have been solved using Rust.
This programming language may be used to instruct a computer to perform a task.
Official website |
---|
Execution method: | Compiled (machine code) |
---|---|
Garbage collected: | Allowed |
Type safety: | Safe |
Type strength: | Strong |
Type compatibility: | Structural |
Type expression: | Implicit |
Type checking: | Static |
Lang tag(s): | rust |
See Also: |
|
Your Help Needed
If you know Rust, please write code for some of the tasks not implemented in Rust.
If you know Rust, please write code for some of the tasks not implemented in Rust.
Rust is a general purpose, multi-paradigm, systems programming language sponsored by Mozilla. Its goal is to provide a fast, practical, concurrent language with zero-cost abstractions and strong memory safety. It employs a unique model of ownership to eliminate data races.
Solutions to RosettaCode tasks are mirrored on GitHub at Hoverbear/rust-rosetta. If you implement a solution here, please open a pull request!
Features[edit]
From the official website:
- zero-cost abstractions
- move semantics
- guaranteed memory safety
- threads without data races
- trait-based generics
- pattern matching
- type inference
- minimal runtime
- efficient C bindings
Subcategories
This category has the following 2 subcategories, out of 2 total.
Pages in category "Rust"
The following 730 pages are in this category, out of 730 total.
A
- A+B
- Abbreviations, automatic
- Abbreviations, easy
- Abbreviations, simple
- ABC problem
- Abelian sandpile model
- Abelian sandpile model/Identity
- Abstract type
- Abundant odd numbers
- Abundant, deficient and perfect number classifications
- Accumulator factory
- Ackermann function
- Active Directory/Connect
- Active object
- Address of a variable
- AKS test for primes
- Align columns
- Aliquot sequence classifications
- Almost prime
- Alternade words
- Amb
- Amicable pairs
- Anagrams
- Anagrams/Deranged anagrams
- Angle difference between two bearings
- Angles (geometric), normalization and conversion
- Animate a pendulum
- Animation
- Anonymous recursion
- Anti-primes
- Append a record to the end of a text file
- Apply a callback to an array
- Apply a digital filter (direct form II transposed)
- Approximate equality
- Arbitrary-precision integers (included)
- Archimedean spiral
- Arena storage pool
- Arithmetic evaluation
- Arithmetic-geometric mean
- Arithmetic-geometric mean/Calculate Pi
- Arithmetic/Complex
- Arithmetic/Integer
- Arithmetic/Rational
- Array concatenation
- Array length
- Arrays
- ASCII art diagram converter
- Assertions
- Associative array/Creation
- Associative array/Iteration
- Associative array/Merging
- Atomic updates
- Attractive numbers
- Average loop length
- Averages/Arithmetic mean
- Averages/Mean angle
- Averages/Median
- Averages/Mode
- Averages/Pythagorean means
- Averages/Root mean square
- Averages/Simple moving average
- AVL tree
B
- Babbage problem
- Balanced brackets
- Balanced ternary
- Banker's algorithm
- Barnsley fern
- Base64 decode data
- Bell numbers
- Benford's law
- Bernoulli numbers
- Best shuffle
- Bin given limits
- Binary digits
- Binary search
- Binary strings
- Bioinformatics/base count
- Bitcoin/address validation
- Bitmap
- Bitmap/Bresenham's line algorithm
- Bitmap/Flood fill
- Bitmap/Write a PPM file
- Bitwise IO
- Bitwise operations
- Boolean values
- Box the compass
- Brace expansion
- Brazilian numbers
- Brownian tree
- Bulls and cows
C
- Caesar cipher
- Calculating the value of e
- Calendar
- Calkin-Wilf sequence
- Call a foreign-language function
- Call a function
- Call a function in a shared library
- Call an object method
- Canonicalize CIDR
- Carmichael 3 strong pseudoprimes
- Cartesian product of two or more lists
- Case-sensitivity of identifiers
- Casting out nines
- Catalan numbers
- Catalan numbers/Pascal's triangle
- Catamorphism
- Chaocipher
- Chaos game
- Character codes
- Check input device is a terminal
- Check output device is a terminal
- Check that file exists
- Chinese remainder theorem
- Chinese zodiac
- Cholesky decomposition
- Church numerals
- Circles of given radius through two points
- Circular primes
- Classes
- Closures/Value capture
- Collections
- Color wheel
- Colour bars/Display
- Combinations
- Comma quibbling
- Command-line arguments
- Comments
- Compare a list of strings
- Compile-time calculation
- Compound data type
- Concurrent computing
- Conditional structures
- Conjugate transpose
- Constrained genericity
- Constrained random points on a circle
- Continued fraction
- Continued fraction/Arithmetic/Construct from rational number
- Convert decimal number to rational
- Convert seconds to compound duration
- Convex hull
- Conway's Game of Life
- Copy a string
- Copy stdin to stdout
- Count in factors
- Count in octal
- Count occurrences of a substring
- Count the coins
- Cramer's rule
- CRC-32
- Create a file
- Create a file on magnetic tape
- Create a two-dimensional array at runtime
- Create an HTML table
- Create an object at a given address
- CSV data manipulation
- CSV to HTML translation
- Cuban primes
- Cumulative standard deviation
- Currency
- Currying
- CUSIP
- Cut a rectangle
D
- Damm algorithm
- Date format
- Day of the week
- Days between dates
- Deal cards for FreeCell
- Deepcopy
- Define a primitive data type
- Delegates
- Delete a file
- Department numbers
- Detect division by zero
- Determinant and permanent
- Determine if a string has all the same characters
- Determine if a string has all unique characters
- Determine if a string is collapsible
- Determine if a string is numeric
- Determine if a string is squeezable
- Determine if only one instance is running
- Dice game probabilities
- Digital root
- Dijkstra's algorithm
- Dining philosophers
- Discordian date
- DNS query
- Documentation
- Dot product
- Doubly-linked list/Element definition
- Doubly-linked list/Element insertion
- Dragon curve
- Draw a clock
- Draw a pixel
- Draw a sphere
- Dutch national flag problem
E
- Echo server
- Egyptian division
- Element-wise operations
- Elementary cellular automaton
- Elementary cellular automaton/Random Number Generator
- Emirp primes
- Empty directory
- Empty program
- Empty string
- Enforced immutability
- Entropy
- Entropy/Narcissist
- Enumerations
- Environment variables
- Ethiopian multiplication
- Euler method
- Euler's identity
- Euler's sum of powers conjecture
- Evaluate binomial coefficients
- Even or odd
- Events
- Evolutionary algorithm
- Exceptions
- Exceptions/Catch an exception thrown in a nested call
- Execute a Markov algorithm
- Execute a system command
- Execute Brain****
- Execute HQ9+
- Exponentiation operator
- Exponentiation order
- Extend your language
- Extensible prime generator
- Extra primes
- Extract file extension
- Extreme floating point values
F
- Factorial
- Factors of a Mersenne number
- Factors of an integer
- Fairshare between two and more
- Farey sequence
- Fast Fourier transform
- FASTA format
- Fermat numbers
- Fibonacci n-step number sequences
- Fibonacci sequence
- Fibonacci word
- Fibonacci word/fractal
- File extension is in extensions list
- File input/output
- File modification time
- File size
- File size distribution
- Filter
- Find common directory path
- Find duplicate files
- Find limit of recursion
- Find the intersection of a line with a plane
- Find the intersection of two lines
- Find the last Sunday of each month
- Find the missing permutation
- First-class functions
- First-class functions/Use numbers analogously
- Five weekends
- Fixed length records
- FizzBuzz
- Flatten a list
- Floyd's triangle
- Floyd-Warshall algorithm
- Forest fire
- Fork
- Formatted numeric output
- Four bit adder
- Four is magic
- Four is the number of letters in the ...
- Fractal tree
- FTP
- Function composition
- Function definition
- Fusc sequence
G
- Gaussian elimination
- General FizzBuzz
- Generate Chess960 starting position
- Generate lower case ASCII alphabet
- Generate random chess position
- Generator/Exponential
- Generic swap
- Get system command output
- Gray code
- Greatest common divisor
- Greatest element of a list
- Greatest subsequential sum
- Guess the number
- Guess the number/With feedback
- Guess the number/With feedback (player)
H
- Hailstone sequence
- Hamming numbers
- Happy numbers
- Harshad or Niven series
- Hash from two arrays
- Hash join
- Haversine formula
- Hello world/Graphical
- Hello world/Line printer
- Hello world/Newbie
- Hello world/Newline omission
- Hello world/Standard error
- Hello world/Text
- Hello world/Web server
- Here document
- Higher-order functions
- Hilbert curve
- History variables
- Hofstadter Q sequence
- Horner's rule for polynomial evaluation
- Host introspection
- Hostname
- HTTP
- Huffman coding
- Hunt the Wumpus
I
- I before E except after C
- IBAN
- Identity matrix
- Idiomatically determine all the lowercase and uppercase letters
- Include a file
- Increasing gaps between consecutive Niven numbers
- Increment a numerical string
- Infinity
- Inheritance/Multiple
- Inheritance/Single
- Input loop
- Integer comparison
- Integer overflow
- Integer roots
- Integer sequence
- Interactive help
- Interactive programming
- Inverted index
- ISBN13 check digit
- Iterated digits squaring
J
K
L
- Langton's ant
- Largest int from concatenated ints
- Last Friday of each month
- Last letter-first letter
- Launch rocket with countdown and acceleration in stdout
- Leap year
- Least common multiple
- Left factorials
- Leonardo numbers
- Letter frequency
- Levenshtein distance
- Levenshtein distance/Alignment
- Linear congruential generator
- List comprehensions
- Literals/Floating point
- Literals/Integer
- Logical operations
- Long primes
- Long year
- Longest common prefix
- Longest common subsequence
- Longest common substring
- Longest increasing subsequence
- Longest string challenge
- Look-and-say sequence
- Loop over multiple arrays simultaneously
- Loops/Break
- Loops/Continue
- Loops/Do-while
- Loops/Downward for
- Loops/For
- Loops/For with a specified step
- Loops/Foreach
- Loops/Infinite
- Loops/N plus one half
- Loops/Nested
- Loops/While
- LU decomposition
- Lucas-Lehmer test
- Luhn test of credit card numbers
- Lychrel numbers
- LZW compression
M
- MAC Vendor Lookup
- Machine code
- Mad Libs
- Magic 8-ball
- Magic squares of doubly even order
- Magic squares of odd order
- Magic squares of singly even order
- Magnanimous numbers
- Main step of GOST 28147-89
- Make directory path
- Man or boy test
- Mandelbrot set
- Map range
- Markov chain text generator
- Mastermind
- Matrix chain multiplication
- Matrix multiplication
- Matrix transposition
- Matrix-exponentiation operator
- Maximum triangle path sum
- Mayan numerals
- Maze generation
- Maze solving
- McNuggets problem
- MD4
- MD5
- MD5/Implementation
- Memory allocation
- Menu
- Metaprogramming
- Middle three digits
- Miller–Rabin primality test
- Mind boggling card trick
- Minesweeper game
- Modular exponentiation
- Modular inverse
- Modulinos
- Monte Carlo methods
- Monty Hall problem
- Morse code
- Mouse position
- Move-to-front algorithm
- Multiple distinct objects
- Multiplication tables
- Munchausen numbers
- Munching squares
- Mutex
- Mutual recursion
N
- N'th
- N-queens problem
- N-smooth numbers
- Naming conventions
- Narcissist
- Negative base numbers
- Nested function
- Next highest int from digits
- Nim game
- Nimber arithmetic
- Non-decimal radices/Convert
- Non-decimal radices/Input
- Non-decimal radices/Output
- Nonoblock
- Nth root
- Null object
- Number names
- Number reversal game
- Numerical integration
O
P
- Padovan sequence
- Palindrome dates
- Palindrome detection
- Palindromic gapful numbers
- Pangram checker
- Parallel brute force
- Parametric polymorphism
- Parse an IP Address
- Parse command-line arguments
- Parsing/RPN calculator algorithm
- Parsing/Shunting-yard algorithm
- Partition an integer x into n primes
- Partition function P
- Pascal's triangle
- Pattern matching
- Peano curve
- Percentage difference between images
- Perfect numbers
- Perfect shuffle
- Perlin noise
- Permutations
- Phrase reversals
- Pi
- Pick random element
- Pig the dice game
- Playing cards
- Population count
- Power set
- Price fraction
- Primality by trial division
- Prime conspiracy
- Prime decomposition
- Prime words
- Primorial numbers
- Priority queue
- Probabilistic choice
- Program name
- Program termination
- Proper divisors
- Pythagorean quadruples
- Pythagorean triples
R
- Ramer-Douglas-Peucker line simplification
- Random number generator (device)
- Random number generator (included)
- Random numbers
- Range consolidation
- Range expansion
- Range extraction
- Ray-casting algorithm
- RCRPG
- Read a configuration file
- Read a file character by character/UTF8
- Read a file line by line
- Read a specific line from a file
- Read entire file
- Real constants and functions
- Reduced row echelon form
- Regular expressions
- Remove duplicate elements
- Remove lines from a file
- Remove vowels from a string
- Rename a file
- Rep-string
- Repeat
- Repeat a string
- Return multiple values
- Reverse a string
- Reverse words in a string
- Rock-paper-scissors
- Roman numerals/Decode
- Roman numerals/Encode
- Roots of unity
- Rosetta Code/Count examples
- Rot-13
- RPG attributes generator
- Run-length encoding
- Runge-Kutta method
S
- Safe mode
- Search a list
- Search a list of records
- Self-describing numbers
- Self-hosting compiler
- Semiprime
- Semordnilap
- Sequence of non-squares
- Set
- Sexy primes
- SHA-1
- SHA-256
- SHA-256 Merkle tree
- Shell one-liner
- Short-circuit evaluation
- Show ASCII table
- Show the epoch
- Sierpinski arrowhead curve
- Sierpinski carpet
- Sierpinski curve
- Sierpinski pentagon
- Sierpinski square curve
- Sierpinski triangle/Graphical
- Sieve of Eratosthenes
- Simple windowed application
- Simulate input/Keyboard
- Simulate input/Mouse
- Singly-linked list/Element definition
- Singly-linked list/Element insertion
- Singly-linked list/Traversal
- Sleep
- Smarandache prime-digital sequence
- Smith numbers
- Sockets
- Sort a list of object identifiers
- Sort an array of composite structures
- Sort an integer array
- Sort disjoint sublist
- Sort numbers lexicographically
- Sort stability
- Sort three variables
- Sort using a custom comparator
- Sorting algorithms/Bogosort
- Sorting algorithms/Bubble sort
- Sorting Algorithms/Circle Sort
- Sorting algorithms/Cocktail sort
- Sorting algorithms/Cocktail sort with shifting bounds
- Sorting algorithms/Comb sort
- Sorting algorithms/Counting sort
- Sorting algorithms/Gnome sort
- Sorting algorithms/Heapsort
- Sorting algorithms/Insertion sort
- Sorting algorithms/Merge sort
- Sorting algorithms/Pancake sort
- Sorting algorithms/Quicksort
- Sorting algorithms/Selection sort
- Sorting algorithms/Sleep sort
- Sorting algorithms/Stooge sort
- Sparkline in unicode
- Spelling of ordinal numbers
- Spinning rod animation/Text
- Spiral matrix
- Split a character string based on change of character
- Square but not cube
- Square-free integers
- Stack
- Statistics/Basic
- String append
- String case
- String comparison
- String concatenation
- String interpolation (included)
- String length
- String matching
- String prepend
- Strip a set of characters from a string
- Strip comments from a string
- Strip whitespace from a string/Top and tail
- Substring
- Substring/Top and tail
- Sudoku
- Sum and product of an array
- Sum data type
- Sum digits of an integer
- Sum multiples of 3 and 5
- Sum of a series
- Sum of squares
- Super-d numbers
- Sutherland-Hodgman polygon clipping
- Symmetric difference
- Synchronous concurrency
- System time
T
- Take notes on the command line
- Tarjan
- Taxicab numbers
- Teacup rim text
- Temperature conversion
- Terminal control/Clear the screen
- Terminal control/Coloured text
- Terminal control/Ringing the terminal bell
- Ternary logic
- Test a function
- Text between
- Text processing/Max licenses in use
- Textonyms
- The Twelve Days of Christmas
- Thue-Morse
- Time a function
- Tokenize a string
- Tokenize a string with escaping
- Top rank per group
- Topological sort
- Totient function
- Towers of Hanoi
- Trabb Pardo–Knuth algorithm
- Tree traversal
- Trigonometric functions
- Truncatable primes
- Truncate a file
- Truth table
- Twin primes
- Two sum
- Type detection
U
V
W
Categories:
- Implementations
- Rust Implementations
- Rust related
- Execution method/Compiled/Machine code
- Garbage collection/Allowed
- Typing/Safe
- Typing/Strong
- Typing/Compatibility/Structural
- Typing/Expression/Implicit
- Typing/Checking/Static
- Programming Languages
- Programming paradigm/Functional
- Programming paradigm/Imperative
- Programming paradigm/Object-oriented
- Programming paradigm/Generic