Coder Social home page Coder Social logo

pierrick-marie / rust-lang-discovery Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 2.74 MB

Discover Rust lang

Home Page: https://github.com/pierrick-marie/rust-lang-discovery

License: BSD 3-Clause "New" or "Revised" License

Rust 100.00%
rust rust-lang rust-library ftp-client ftp-server music-player tetris-game

rust-lang-discovery's Introduction

Rust Programming by Example

Tester et expérimenter les exemples du livre « Rust Programming by Example »

Rust Programming by Example

License: BSD 3-Clause

https://raw.githubusercontent.com/pierrick-marie/rust-lang-discovery/master/LICENSE

Get source code

	git clone https://github.com/pierrick-marie/rust-lang-discovery.git

Exemple 1 : Hello World

https://github.com/pierrick-marie/rust-lang-discovery/tree/master/hello-world

Découvrir les bases du langage

  • enum
  • tuple
  • struct
  • trait
  • macro
  • generic

Exemple 2 : Tetris

https://github.com/pierrick-marie/rust-lang-discovery/tree/master/tetris

Développer un tetris avec la bibliothèque SDL2

  • jouer une partie
  • enregistrer les scores dans un fichier texte

Tetris screenshot

2.1. Prérequis

Installer les paquets suivants (Gnu\Linux) :

  • libsdl2-dev
  • libsdl2-gfx-dev
  • libsdl2-image-dev
  • libsdl2-ttf-dev

2.2. Contrôles

BAS : descendre la pièce

HAUT : tourner la pièce d'un quart de tour

GAUCHE : déplacer la pièce d'une case vers la gauche

DROITE : déplacer la pièce d'une case vers la droite

ESPACE : déplacer la pièce en bas de la grille

ECHAP : quitte le jeu

Comment jouer ?

Une nouvelle partie commence dès le lancement du jeux.

La partie s'arrête quand il n'est plus possible d'ajouter une nouvelle pièce dans la grille. Une partie se termine donc quand le joueur est mis en échec.

Le score du joueur est affiché à droite de la grille. L'historique des scrores du joueur sont enregistré par ordre décroissant de points dans le fichier assets/score.txt au format suivant : date heure minute : points = XX lines = YY

Exemple 3 : Music play

https://github.com/pierrick-marie/rust-lang-discovery/tree/master/music-player

Développer un lecteur de music pour desktop

3.1. Prérequis

Installer les paquest suivants (Gnu\Linux) :

  • libgtk-3-dev
  • libmad0-dev
  • libpulse-dev
  • libgstreamer1.0-dev
  • libgstreamer-plugins-base1.0-dev
  • gstreamer1.0-plugins-base
  • gstreamer1.0-plugins-good
  • gstreamer1.0-plugins-bad
  • gstreamer1.0-plugins-ugly
  • gstreamer1.0-libav
  • libgstrtspserver-1.0-dev
  • libges-1.0-dev
  • libgstreamer-plugins-bad1.0-dev

Présentation

Le lecteur utilise dans sa version finale la bibliothèque Gstreamer pour lire les fichiers audio. Pour la partie graphique, le lecteur utilise la bibliothèque Relm (https://github.com/antoyo/relm) basée sur GTK.

Lecteur de music en rust

Command line Server & client FTP

Documentation

http://abcdrfc.free.fr/rfc-vf/pdf/rfc959.pdf

Client

https://github.com/pierrick-marie/rust-lang-discovery/tree/master/ftp/client

Server

https://github.com/pierrick-marie/rust-lang-discovery/tree/master/ftp/server

Contributing

Do not hesitate to improve to this program. Feel free to send PR or contact me to send comments. You are welcome to fork this project also ;)

Badges

License made-Rust

rust-lang-discovery's People

Contributors

pierrick-marie avatar

Stargazers

manwax avatar  avatar

Watchers

 avatar

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.