Skip to content

Commit 77274e2

Browse files
stilschersim642
authored andcommitted
create dune files for http-server within gobview package
1 parent 096a1ab commit 77274e2

File tree

8 files changed

+32
-204
lines changed

8 files changed

+32
-204
lines changed

dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(rule
22
(alias gobview)
33
(targets dist)
4-
(deps src/App.bc.js node_modules webpack.config.js)
4+
(deps src/App.bc.js goblint-http-server/src/goblint_http.exe node_modules webpack.config.js)
55
(action
66
(run npx webpack build)))
77

dune-project

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,16 @@
2424
(synopsis "Web frontend for Goblint")
2525
(depends
2626
dune
27-
(ocaml
28-
(>= 4.10.0))
27+
(ocaml (>= 4.10.0))
28+
batteries
29+
cohttp-lwt
30+
cohttp-lwt-unix
31+
fileutils
32+
jsonrpc
33+
lwt
34+
lwt_ppx
35+
yojson
36+
conduit-lwt-unix
2937
jsoo-react
3038
(goblint-cil (>= 2.0.0))
3139
ctypes_stubs_js

goblint-http-server/dune-project

Lines changed: 0 additions & 32 deletions
This file was deleted.

goblint-http-server/goblint-http-server.opam

Lines changed: 0 additions & 41 deletions
This file was deleted.

goblint-http-server/goblint-http-server.opam.locked

Lines changed: 0 additions & 125 deletions
This file was deleted.

goblint-http-server/src/dune

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
(executable
22
(name goblint_http)
33
(public_name goblint-http)
4-
(libraries batteries cohttp cohttp-lwt-unix jsonrpc lwt.unix)
4+
(libraries
5+
batteries
6+
cohttp
7+
cohttp-lwt
8+
cohttp-lwt-unix
9+
conduit-lwt-unix
10+
jsonrpc
11+
lwt.unix
12+
yojson
13+
uri)
514
(preprocess
615
(pps lwt_ppx ppx_yojson_conv)))

goblint-http-server/src/goblint.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ let send goblint name params =
3030
let id = `Int goblint.counter in
3131
goblint.counter <- goblint.counter + 1;
3232
let req =
33-
Jsonrpc.Message.create ?params ~id ~method_:name ()
34-
|> Jsonrpc.Message.yojson_of_request
33+
Jsonrpc.Request.create ?params ~id ~method_:name ()
34+
|> Jsonrpc.Request.yojson_of_t
3535
|> Yojson.Safe.to_string in
3636
Printf.printf "send jsonrpc message:\n%s\n" req;
3737
let%lwt () = Lwt_io.fprintl goblint.output req in

gobview.opam

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ bug-reports: "https://github.com/goblint/gobview/issues"
1414
depends: [
1515
"dune" {>= "2.7"}
1616
"ocaml" {>= "4.10.0"}
17+
"batteries"
18+
"cohttp-lwt"
19+
"cohttp-lwt-unix"
20+
"fileutils"
21+
"jsonrpc"
22+
"lwt"
23+
"lwt_ppx"
24+
"yojson"
25+
"conduit-lwt-unix"
1726
"jsoo-react"
1827
"goblint-cil" {>= "2.0.0"}
1928
"ctypes_stubs_js"

0 commit comments

Comments
 (0)