Code Monkey home page Code Monkey logo

climbing's Introduction

Climbing

License: MIT

Learning rust language is tough for me, so record practice here.

Structure

 climbing/
 ┣ docs
 ┃ ┗ strings.md
 ┃ ┗ foo.md
 ┃ ┗ ...
 ┃
 ┣ src
 ┃ ┗ modules
 ┃   ┗ strings.rs
 ┃   ┗ foo.rs
 ┃   ┗ ...
 ┃
 ┃ ┗ modules.rs
 ┃ ┗ main.rs
main.rs
mod modules;

use modules::strings::qstring;

fn main() {
   let quote = qstring("Learning rust language is tough for me, so record practice here");

   println!("{}", quote);
}
...
modules.rs
pub mod strings;

...
modules/strings.rs
/// Create String from &str directly

pub fn qstring(str: &str) -> String {
    String::from(str)
}

...

Usage

  • Install rust in your local follow this guide (Note: this repository uses the rust package manager Cargo)
  • Clone this repository to your local
  • Reference and use modules in main.rs
  • Cd the root dir
  • Run cargo run command

Docs

For example, docs/foo.md is the note of the code src/modules/foo.rs of the content Foo in Rust lang.

Contents & Docs & Modules

Contents Docs Modules
String strings.md strings.rs
Variables and Mutability variables_mutability.md variables_mutability.rs

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.