Skip to content

Commit e2db5cc

Browse files
committed
Update README to clarify installation steps and add .opam file for dependencies
1 parent dccfd43 commit e2db5cc

File tree

2 files changed

+38
-4
lines changed

2 files changed

+38
-4
lines changed

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,27 +332,33 @@ sudo ./my_project # Run the program
332332

333333
## Getting Started
334334

335-
1. **Install KernelScript:**
335+
1. **Install system dependencies (Debian/Ubuntu):**
336+
```bash
337+
sudo apt update
338+
sudo apt install libbpf-dev libelf-dev zlib1g-dev
339+
```
340+
341+
2. **Install KernelScript:**
336342
```bash
337343
git clone https://github.com/multikernel/kernelscript.git
338344
cd kernelscript
339345
opam install . --deps-only
340346
eval $(opam env) && dune build && dune install
341347
```
342348

343-
2. **Create your first project:**
349+
3. **Create your first project:**
344350
```bash
345351
kernelscript -- init xdp hello_world
346352
cd hello_world/
347353
```
348354

349-
3. **Edit the generated code:**
355+
4. **Edit the generated code:**
350356
```bash
351357
# Edit hello_world.ks with your logic
352358
vim hello_world.ks
353359
```
354360

355-
4. **Compile and run:**
361+
5. **Compile and run:**
356362
```bash
357363
kernelscript compile hello_world/hello_world.ks
358364
cd hello_world/

kernelscript.opam

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
opam-version: "2.0"
2+
name: "kernelscript"
3+
authors: ["Cong Wang"]
4+
maintainer: ["Cong Wang <cwang@multikernel.io>"]
5+
license: "Apache-2.0"
6+
homepage: "https://github.com/multikernel/kernelscript"
7+
bug-reports: "https://github.com/multikernel/kernelscript/issues"
8+
synopsis: "A modern programming language for eBPF development"
9+
depends: [
10+
"ocaml"
11+
"dune" {>= "2.9"}
12+
"menhir"
13+
"alcotest" {with-test}
14+
]
15+
build: [
16+
["dune" "subst"] {dev}
17+
[
18+
"dune"
19+
"build"
20+
"-p"
21+
name
22+
"-j"
23+
jobs
24+
"@install"
25+
"@runtest" {with-test}
26+
"@doc" {with-doc}
27+
]
28+
]

0 commit comments

Comments
 (0)