# Chip 8 emulator writen in rust steps:
1. import the chip_8_cpu_emulator. ``` bash chip_8_cpu_emulator = "0.0.1" (or) chip_8_cpu_emulator = "*" ``` 2. then use in your project, by adding ``` rust use chip_8_cpu_emulator::cpu::CPU ``` 3. configure the cpu and run. ``` rust let mut cpu = CPU { registers: [0; 16], memory: [0; 0x1000], pc: 0, sp: 0, stack: [0; 16], i_reg: 0, }; /* initializing the registers */ cpu.registers[0] = 5; cpu.registers[1] = 10; cpu.registers[2] = 10; cpu.registers[3] = 10; /* store the program in memory */ cpu.memory[0] = 0x81; cpu.memory[1] = 0x18; // left shift reg_x cpu.memory[2] = 0x80; cpu.memory[3] = 0x08; // left shift reg_x cpu.memory[4] = 0x00; cpu.memory[5] = 0x00; // end of the program ``` 4. Finally run the cpu with method. ``` rust cpu.run(); ```