/RustBasicDemos

Basic demonstrations of the Rust programming language

Primary LanguageRust

RustBasicDemos

https://JimFawcett.github.io/RustBasicDemos - repository documentation

Simple code demos: code structure, types, file_io, ... I am starting to look seriously at Rust, and will be writing lots of demo code to be sure that I understand. Now, these demos are just an unmanicured exploration trail. Once I know more I will trim them to be useful for others trying to climb the same path.

For now, the demos are:

  1. data_lifecycle
  2. data_types includes simple probes for each of the Rust data types.
  3. demo_lib and demo_test - simple demonstration of using sister library and other files in src.
  4. display library provides functions to display the type and value of a variable passed as an argument. Libraries can't write to the console, so library tests are deferred to a separate binary.
  5. display_test uses the local display crate to test writing information to the console.
  6. file_io reads from a file and displays results. will add file writes soon.
  7. function_probes - passing arguments including functions
  8. generic_probes - generic functions and structs
  9. ops_probes - just starting, will explore functions and lambdas.
  10. rust_modules - hello world for modules.
  11. string_probes - many small experiments that need trimming
  12. rust_probes demos for
    • variations on print! formatting
    • std::Debug formatting for Rust types
    • formatting floats showing use of format flags for exp notation, precision, alignment in field, ...
    • copy, move, clone, Drop trait, Clone trait. Includes simple but useful module demo.
  13. vector_probes - a few simple demos.