Skip to content

werdl/rustnix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rustnix

another useless toy Unix clone

Screenshot of rustnix

GitHub Actions Workflow Status GitHub last commit GitHub top language

Features

  • Interrupts
  • Memory allocation
  • ATA disk driver
  • Basic inode-based filesystem
  • Clock module
  • Basic async/await support
  • Syscalls
  • Processes
  • ELF Binaries
  • Basic Userspace
  • Basic IPC

Short-term todo

  • fully implement /proc hierarchy

Thanks

Code

Libraries used

  • acpi
  • aml
  • bit_field
  • bootloader
  • chrono
  • hashbrown
  • lazy_static
  • linked_list_allocator
  • log
  • pc-keyboard
  • pic8259
  • spin
  • typenum
  • uart_16550
  • volatile (several versions behind)
  • x86_64

Syscalls

Number Name Arg1 Arg2 Arg3 Arg4 Return
1 read fd buf (ptr) buf_len nread
2 write fd buf (ptr) buf_len nwritten
3 open path (ptr) path_len mode (bitfield) fd
4 close fd 0 or -1 (err)
5 flush fd 0 or -1 (err)
7 sleep nanoseconds 0
8 wait (uses TSC) nanoseconds 0
9 getpid
10 exec path_addr path_len args_ptr args_len
13 stop kind (0=shutdown, 1=reboot)
18 alloc size align ptr
19 free ptr size align
21 geterrno errno
22 poll fd event (1=read, 2=write) ready
23 boottime boot_time (nanos)
24 gettime time (seconds)

Releases

No releases published

Packages

No packages published

Languages