Okay, we're now ready to start writing down our tetris!
First, let's fulfill our main.rs file in order to check whether everything is working as expected:
extern crate sdl2; use sdl2::pixels::Color; use sdl2::event::Event; use sdl2::keyboard::Keycode; use std::time::Duration;
use std::thread::sleep; pub fn main() { let sdl_context = sdl2::init().expect("SDL initialization
failed"); let video_subsystem = sdl_context.video().expect("Couldn't get
SDL video subsystem"); let window = video_subsystem.window("rust-sdl2 demo: Video", 800,
600) .position_centered() .opengl() .build() .expect("Failed to create window"); let mut canvas = window.into_canvas().build().expect("Failed to
convert window into...