about
11/29/2022
RustLibraryDemos Repo
RustLibraryDemos code

RustLibraryDemos  Repository

Demos for convert, collections, io, fs, net, error, thread, process

Quick Status Code functions correctly no known defects Demonstration code yes Documentation yes Test cases None planned Static library none planned Build requires Rust installed Planned design changes Add more examples

Contents:

Small explorations of Rust libraries code used in RustStory_Libraries:
  1. std::collections: collections_echo
    Construct collection, pass to generic echo function, iterate over contents, and return again.
  2. std::iterator: iterator_echo
    Construct collection, iterate with several different adapters.
  3. std::io: io_echo
    Read from std::io::stdin and echo back to std::io::stdout.
  4. std::fs: fs_echo
    Create file, write message to it, open file, and read message.
  5. std::net: net_echo
    Create simple messages and send over TcpStream.
  6. std::thread: thread_shared
    Two child threads mutate shared String.
  7. std::sync: sync_demo
    Prototype for blocking queue using shared queue with locks and condition variable.
  8. std::sync: blocking_queue_demo
    Builds upon the prototype, above, to make a solid BlockingQueue abstraction.
  9. std::mpsc: mpsc_demo
    Demonstrate a very simple blocking queue using the mpsc channel. Almost all the functionality is provided by mpsc.
  10. std::process: process_demos
    Spawning child process on either Windows or Linux
  11. std::time: time_demo
    Simple demo using now and elapsed to measure time taken to sleep, calculate, and print to console.

Build:

This Rust code was built with Cargo from Visual Studio Code terminal and tested on Windows 10.

Status:

More demos coming soon.
  Next Prev Pages Sections About Keys