mirror of
https://github.com/bdnugget/eggos.git
synced 2026-11-07 04:17:27 +00:00
update README
This commit is contained in:
1 parent
6da6de9b23
commit
7247f736ad
3 files changed
+94
-1
No files matched your search
@@ -21,6 +21,7 @@ In general, writing kernel in Go is a very interesting experience. On the one ha
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
|
||||
# Feature list
|
||||
@@ -33,6 +34,7 @@ In general, writing kernel in Go is a very interesting experience. On the one ha
|
||||
- A Javascript interpreter using [otto](https://github.com/robertkrimen/otto)
|
||||
- VBE based frame buffer.
|
||||
- Some simple network apps(httpd, sshd).
|
||||
- GUI support by [nucular](https://github.com/aarzilli/nucular).
|
||||
|
||||
|
||||
# Dependencies
|
||||
@@ -89,7 +91,7 @@ The multiboot.elf generated after executing the make command is a kernel image c
|
||||
|
||||
# Documentation
|
||||
|
||||
For some design details see [docs/internal.md](docs/internal.md)
|
||||
[docs/README.md](docs/README.md)
|
||||
|
||||
# Roadmap
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# Command line usage
|
||||
|
||||
[command usage](./usage.md)
|
||||
|
||||
# Design internal
|
||||
|
||||
[design internal](./internal.md)
|
||||
@@ -0,0 +1,84 @@
|
||||
# Javascript interpreter
|
||||
|
||||
``` sh
|
||||
root@eggos# js
|
||||
>>> console.log("hello world")
|
||||
hello world
|
||||
>>> reg = new RegExp("hello")
|
||||
>>> console.log(reg)
|
||||
/hello/
|
||||
>>> resp = reg.test("hello world")
|
||||
>>> console.log(resp)
|
||||
true
|
||||
>>> var url = "http://baidu.com"
|
||||
>>> resp = http.Get(url)
|
||||
>>> console.log(resp)
|
||||
<html>
|
||||
<meta http-equiv="refresh" content="0;url=http://www.baidu.com/">
|
||||
</html>
|
||||
```
|
||||
|
||||
# Mount samba filesystem
|
||||
|
||||
``` sh
|
||||
root@eggos# mount smb://icexin:eggos@172.28.90.3:445/sambashare /share
|
||||
root@eggos# cd /share
|
||||
root@eggos# ls
|
||||
-rw-rw-rw- 111 fib.js
|
||||
root@eggos# cat fib.js
|
||||
function fib(n) {
|
||||
if (n == 1 || n == 2) {
|
||||
return 1;
|
||||
}
|
||||
return fib(n-1) + fib(n-2);
|
||||
}
|
||||
|
||||
console.log(fib(10))
|
||||
|
||||
root@eggos# js fib.js
|
||||
55
|
||||
|
||||
```
|
||||
|
||||
# Run nes emulator
|
||||
|
||||
First run `QEMU_GRAPHIC=true QEMU_ACCEL=true mage graphic`
|
||||
|
||||
``` sh
|
||||
root@eggos# ls /share
|
||||
-rw-rw-rw- 111 fib.js
|
||||
-rw-rw-rw- 40976 mario.nes
|
||||
root@eggos# nes -rom /share/mario.nes
|
||||
```
|
||||
|
||||
- `W`, `S`, `A`, `D` mapping `up`, `down`, `left` and `right`.
|
||||
- `K`, `J` mapping `A` and `B`
|
||||
- `space` and `enter` mapping `select` and `start`
|
||||
- `Q` to quit game.
|
||||
|
||||
# GUI
|
||||
|
||||
First run `QEMU_GRAPHIC=true QEMU_ACCEL=true mage graphic`
|
||||
|
||||
``` sh
|
||||
root@eggos# uidemo
|
||||
```
|
||||
|
||||
|
||||
# Chipmunk2D physics engine
|
||||
|
||||
First run `QEMU_GRAPHIC=true QEMU_ACCEL=true mage graphic`
|
||||
|
||||
``` sh
|
||||
root@eggos# phy
|
||||
```
|
||||
|
||||
# HTTP server
|
||||
|
||||
Running a HTTP server in background.
|
||||
|
||||
``` sh
|
||||
root@eggos# go httpd
|
||||
```
|
||||
|
||||
visit http://127.0.0.1:8080/debug/pprof in browser
|
||||
Reference in new issue
Block a user