|
| 1 | +opam-version: "2.0" |
| 2 | + |
| 3 | +synopsis: "Tidy, feature-complete Web framework" |
| 4 | +tags: ["http" "web" "framework" "websocket" "graphql" "server" "http2" "tls"] |
| 5 | + |
| 6 | +description: """ |
| 7 | +Dream is a feature-complete Web framework with a simple programming |
| 8 | +model and no boilerplate. It provides only two data types, request and |
| 9 | +response. |
| 10 | + |
| 11 | +Almost everything else is either a built-in OCaml type, or an |
| 12 | +abbreviation for a bare function. For example, a Web app, known in |
| 13 | +Dream as a handler, is just an ordinary function from requests to |
| 14 | +responses. And a middleware is then just a function from handlers to |
| 15 | +handlers. |
| 16 | + |
| 17 | +Within this model, Dream adds: |
| 18 | + |
| 19 | +- Session management with pluggable back ends. |
| 20 | +- A fully composable router. |
| 21 | +- Support for HTTP/1.1, HTTP/2, and HTTPS. |
| 22 | +- WebSockets. |
| 23 | +- GraphQL, including subscriptions and a built-in GraphiQL editor. |
| 24 | +- SQL connection pool helpers. |
| 25 | +- Server-side HTML templates. |
| 26 | +- Automatic secure handling of cookies and forms. |
| 27 | +- Unified, internationalization-friendly error handling. |
| 28 | +- A neat log, and OCaml runtime configuration. |
| 29 | +- Helpers for Web formats, such as Base64url, and a modern cipher. |
| 30 | + |
| 31 | +Because of the simple programming model, everything is optional and |
| 32 | +composable. It is trivially possible to strip Dream down to just a |
| 33 | +bare driver of the various HTTP protocols. |
| 34 | + |
| 35 | +Dream is presented as a single module, whose API is documented on one |
| 36 | +page. In addition, Dream comes with a large number of examples. |
| 37 | +Security topics are introduced throughout, wherever they are |
| 38 | +applicable.""" |
| 39 | + |
| 40 | +license: "MIT" |
| 41 | +homepage: "https://github.com/aantron/dream" |
| 42 | +doc: "https://aantron.github.io/dream" |
| 43 | +bug-reports: "https://github.com/aantron/dream/issues" |
| 44 | +dev-repo: "git+https://github.com/aantron/dream.git" |
| 45 | + |
| 46 | +author: "Anton Bachin < [email protected]>" |
| 47 | +maintainer: "Anton Bachin < [email protected]>" |
| 48 | + |
| 49 | +depends: [ |
| 50 | + "base-unix" |
| 51 | + "bigarray-compat" |
| 52 | + "camlp-streams" |
| 53 | + "caqti" {>= "2.0.0"} |
| 54 | + "caqti-lwt" {>= "2.0.0"} |
| 55 | + ("conf-libev" {os != "win32"} | "ocaml" {os = "win32"}) |
| 56 | + "cstruct" {>= "6.0.0"} |
| 57 | + "digestif" {>= "0.7"} # to_raw_string. |
| 58 | + "dream-httpaf" {>= "1.0.0~alpha4"} |
| 59 | + "dream-pure" {>= "1.0.0~alpha2"} |
| 60 | + "dune" {>= "2.7.0"} # --instrument-with. |
| 61 | + "fmt" {>= "0.8.7"} # `Italic. |
| 62 | + "graphql_parser" |
| 63 | + "graphql-lwt" |
| 64 | + "lambdasoup" {>= "0.6.1"} |
| 65 | + "lwt" |
| 66 | + "lwt_ppx" {>= "1.2.2"} |
| 67 | + "lwt_ssl" |
| 68 | + "logs" {>= "0.5.0"} |
| 69 | + "magic-mime" |
| 70 | + "markup" {>= "1.0.2"} |
| 71 | + "mirage-clock" {>= "3.0.0"} # now_d_ps : unit -> int * int64. |
| 72 | + "mirage-crypto" {>= "1.0.0"} |
| 73 | + "mirage-crypto-rng" {>= "1.0.0"} |
| 74 | + "mirage-crypto-rng-lwt" |
| 75 | + "multipart_form" {>= "0.4.0"} |
| 76 | + "multipart_form-lwt" |
| 77 | + "ocaml" {>= "4.08.0"} |
| 78 | + "ptime" {>= "0.8.1"} # Ptime.v. |
| 79 | + "ssl" {>= "0.5.8"} # Ssl.get_negotiated_alpn_protocol. |
| 80 | + "uri" {>= "4.2.0"} |
| 81 | + "yojson" # ... |
| 82 | + |
| 83 | + # Testing, development. |
| 84 | + "alcotest" {with-test} |
| 85 | + "bisect_ppx" {with-test & >= "2.5.0"} # --instrument-with. |
| 86 | + "caqti-driver-postgresql" {with-test} |
| 87 | + "caqti-driver-sqlite3" {with-test} |
| 88 | + "crunch" {with-test} |
| 89 | + "html_of_jsx" {with-test} |
| 90 | + "js_of_ocaml" {with-test} |
| 91 | + "js_of_ocaml-ppx" {with-test} |
| 92 | + "ppx_expect" {with-test & >= "v0.15.0" & < "v0.17.0"} # Breaking changes. |
| 93 | + "ppx_yojson_conv" {with-test} |
| 94 | + "reason" {with-test} |
| 95 | + "tyxml" {with-test & >= "4.5.0"} |
| 96 | + "tyxml-jsx" {with-test} |
| 97 | +] |
| 98 | + |
| 99 | +build: [ |
| 100 | + ["dune" "build" "-p" name "-j" jobs] |
| 101 | +] |
| 102 | + |
| 103 | +url { |
| 104 | + src: "https://github.com/aantron/dream/releases/download/1.0.0-alpha8/dream-1.0.0-alpha8.tar.gz" |
| 105 | + checksum: "sha256=23ed812890c03fe5c9974a4961a9e8e62126bed7bc7d7d1440b84652c95cf296" |
| 106 | +} |
0 commit comments