Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

separate server module #109

Open
wants to merge 11 commits into
base: partial_eval
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/opam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,17 @@ jobs:

steps:
- uses: actions/checkout@v4

- uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 4.14
- run: opam install dune

- run: opam install . --deps-only --with-test
- run: opam exec -- dune build --profile release

- run: opam install . --deps-only --with-test
working-directory: aslp_server
- run: opam exec -- dune build --profile release
working-directory: aslp_server

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
33 changes: 33 additions & 0 deletions aslp_server/aslp_server.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "REST server for ASLp"
description: ""
maintainer: ["ailrst"]
authors: ["ailrst"]
license: "BSD-3-Clause"
homepage: "https://github.com/UQ-PAC/aslp"
doc: "https://github.com/UQ-PAC/aslp"
bug-reports: "https://github.com/UQ-PAC/aslp/issues"
depends: [
"ocaml"
"dune" {>= "2.8"}
"cohttp-lwt-unix"
"yojson"
"asli"
"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/UQ-PAC/aslp.git"
7 changes: 7 additions & 0 deletions aslp_server/bin/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(executable
(public_name aslp_server)
(modes exe byte)
(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
28 changes: 28 additions & 0 deletions aslp_server/dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
(lang dune 2.8)

(name aslp_server)

(generate_opam_files true)

(source
(github UQ-PAC/aslp))

(authors "ailrst")
(maintainers "ailrst")

(license BSD-3-Clause)

(documentation https://github.com/UQ-PAC/aslp)

(package
(name aslp_server)
(synopsis "REST server for ASLp")
(description "")
(depends ocaml dune
"cohttp-lwt-unix"
"yojson"
"asli"
)
)

; See the complete stanza docs at https://dune.readthedocs.io/en/stable/reference/dune-project/index.html
Empty file added aslp_server/dune-workspace
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
Loading