Skip to content

Commit

Permalink
separate server module
Browse files Browse the repository at this point in the history
  • Loading branch information
ailrst committed Sep 24, 2024
1 parent 5eaf73c commit dca41ef
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 23 deletions.
3 changes: 0 additions & 3 deletions asli.opam
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ depends: [
"z3" {>= "4.8.7"}
"alcotest" {with-test}
"ppx_blob"
"lwt"
"cohttp-lwt-unix"
"yojson"
"mlbdd"
"odoc" {with-doc}
]
Expand Down
34 changes: 34 additions & 0 deletions aslp_server/aslp_server.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "A short synopsis"
description: "A longer description"
maintainer: ["Maintainer Name"]
authors: ["Author Name"]
license: "LICENSE"
tags: ["topics" "to describe" "your" "project"]
homepage: "https://github.com/username/reponame"
doc: "https://url/to/documentation"
bug-reports: "https://github.com/username/reponame/issues"
depends: [
"ocaml"
"dune" {>= "3.16"}
"cohttp-lwt-unix"
"yojson"
"asli" {= "0.2.0"}
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/username/reponame.git"
6 changes: 6 additions & 0 deletions aslp_server/bin/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(executable
(public_name aslp_server)
(name main)
(modules main)
(libraries asli.libASL lwt.unix yojson cohttp-lwt cohttp-lwt-unix pprint))

8 changes: 0 additions & 8 deletions bin/server.ml → aslp_server/bin/main.ml
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
open LibASL


open Yojson
open Cohttp
open Cohttp_lwt
open Cohttp_lwt_unix
open String
open List
open Array
open Asl_ast
open Value
open Eval
open Asl_utils
open Lwt


Expand Down
30 changes: 30 additions & 0 deletions aslp_server/dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
(lang dune 3.16)

(name aslp_server)

(generate_opam_files true)

(source
(github username/reponame))

(authors "Author Name")

(maintainers "Maintainer Name")

(license LICENSE)

(documentation https://url/to/documentation)

(package
(name aslp_server)
(synopsis "A short synopsis")
(description "A longer description")
(depends ocaml dune
"cohttp-lwt-unix"
"yojson"
("asli" (= 0.2.0))
)
(tags
(topics "to describe" your project)))

; See the complete stanza docs at https://dune.readthedocs.io/en/stable/reference/dune-project/index.html
2 changes: 2 additions & 0 deletions aslp_server/lib/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(library
(name aslp_server))
2 changes: 2 additions & 0 deletions aslp_server/test/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(test
(name test_aslp_server))
Empty file.
9 changes: 0 additions & 9 deletions bin/dune
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@
(libraries asli.libASL linenoise pprint)
)

(executable
(name server)
(public_name aslp-server)
(modes exe)
(modules server)
(flags (-cclib -lstdc++))
(libraries asli.libASL pprint lwt.unix yojson cohttp-lwt cohttp-lwt-unix))


(executable
(name testlexer)
(modes exe)
Expand Down
3 changes: 0 additions & 3 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
("z3" (>= "4.8.7"))
("alcotest" :with-test)
"ppx_blob"
"lwt"
"cohttp-lwt-unix"
"yojson"
"mlbdd"
)
)
Expand Down

0 comments on commit dca41ef

Please sign in to comment.