Skip to content

ElizabethF2/PettyJSOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PettyJSOS

PettyJSOS is a toy/proof-of-concept OS, kernel and bootloader written 100% in JavaScript just for the fun of it to prove that, despite claims to the contrary, you really can write an entire operating system using only JavaScript, even though you really shouldn't. The build script (also written in JavaScript) uses TS2C to transpile the JavaScript code before using Clang and LLD to compile and link the final binary. Between transpilation and compilation, the build script handles fixing the entry point and the implementation of a new function, __inline_asm, which enables JavaScript to have inline assembly similar to how C or Rust do.

Building

  1. With Docker setup, run docker run -v pettyjsos:/pettyjsos:ro --rm -it alpine /bin/sh -c "apk add --no-cache npm;ash" to open a shell

  2. Run npm --prefix /pettyjsos run build to build

Testing/Usage

Within the shell, run npm --prefix /pettyjsos run boot to boot the EFI bin in qemu

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published