1*4e851715SGnoCiYeH // #![no_std] 2*4e851715SGnoCiYeH // #![no_main] 321fc724cSGnoCiYeH 4*4e851715SGnoCiYeH //extern crate drstd; 5*4e851715SGnoCiYeH extern crate hashbrown; 621fc724cSGnoCiYeH 7*4e851715SGnoCiYeH //use drstd as std; 8*4e851715SGnoCiYeH use std::print; 9*4e851715SGnoCiYeH use std::println; 10*4e851715SGnoCiYeH use std::rc::Rc; 11*4e851715SGnoCiYeH use unit::service::ServiceUnit; 12*4e851715SGnoCiYeH 1321fc724cSGnoCiYeH mod contants; 14*4e851715SGnoCiYeH mod error; 15*4e851715SGnoCiYeH mod parse; 16*4e851715SGnoCiYeH mod task; 1721fc724cSGnoCiYeH mod unit; 1821fc724cSGnoCiYeH 19*4e851715SGnoCiYeH use crate::unit::service; 2021fc724cSGnoCiYeH 21*4e851715SGnoCiYeH use self::unit::Unit; 22*4e851715SGnoCiYeH 23*4e851715SGnoCiYeH pub struct FileDescriptor(usize); 24*4e851715SGnoCiYeH 25*4e851715SGnoCiYeH //#[no_mangle] 26*4e851715SGnoCiYeH fn main() { 27*4e851715SGnoCiYeH let service = 28*4e851715SGnoCiYeH ServiceUnit::from_path("/home/heyicong/DragonReach/parse_test/test.service").unwrap(); 29*4e851715SGnoCiYeH let service = service.as_ref(); 30*4e851715SGnoCiYeH let cmds = &service.service_part.exec_start; 31*4e851715SGnoCiYeH for cmd in cmds{ 32*4e851715SGnoCiYeH println!("{},{}",cmd.path,cmd.cmd); 33*4e851715SGnoCiYeH } 3421fc724cSGnoCiYeH } 35