I am willing to test the Dream webframework for a small project.
Installing it took me some time because of the recent ssl dependency issue. Then I am trying to reproduce the 01-hello tutorial by copy/paste the source code in a project I build myself. I have a linking error I don’t know how to resolve (@antron ). Help appreciated.
My ocaml setup is on a windows box.
opam exec -- dune init project test_dream
I modify the dune file:
(executable
(public_name test_dream)
(name main)
(libraries test_dream dream))
copy / paste the source code into main.ml
let () =
Dream.run (fun _ ->
Dream.html "Good morning, world!")
and build
PS H:\OCaml\test_dream> (& opam env) -split '\r?\n' | ForEach-Object { Invoke-Expression $_ }
PS H:\OCaml\test_dream> opam exec -- dune build
File "bin/dune", line 3, characters 7-11:
3 | (name main)
^^^^
/bin/bash: C:UsersNAlec~1AppDataLocalTempbuild_967b29_dunelongcmd8d30f6: No folder or file of this type
** Fatal error: Error during linking
File "caml_startup", line 1:
Error: Error during linking (exit code 2)
PS H:\OCaml\test_dream>
If it were necessary :
PS H:\OCaml\test_dream> opam show dream
<><> dream: information on all versions <><><><><><><><><><><><><><><><><><> 🐫
name dream
all-installed-versions 1.0.0~alpha7 [default]
all-versions 1.0.0~alpha1 1.0.0~alpha2 1.0.0~alpha3 1.0.0~alpha4 1.0.0~alpha5 1.0.0~alpha6 1.0.0~alpha7
<><> Version-specific details <><><><><><><><><><><><><><><><><><><><><><><> 🐫
version 1.0.0~alpha7
repository default
url.src "https://github.com/aantron/dream/releases/download/1.0.0-alpha7/dream-1.0.0-alpha7.tar.gz"
url.checksum "sha256=b715cecf7e2b249335c8d1cd22c3e87017e40c0556774d209f338f9d78388c86"
homepage "https://github.com/aantron/dream"
doc "https://aantron.github.io/dream"
bug-reports "https://github.com/aantron/dream/issues"
dev-repo "git+https://github.com/aantron/dream.git"
authors "Anton Bachin <antonbachin@yahoo.com>"
maintainer "Anton Bachin <antonbachin@yahoo.com>"
license "MIT"
tags "http" "web" "framework" "websocket" "graphql" "server" "http2" "tls"
depends "base-unix"
"bigarray-compat"
"camlp-streams"
"caqti" {>= "2.0.0"}
"caqti-lwt" {>= "2.0.0"}
("conf-libev" {os != "win32"} | "ocaml" {os = "win32"})
"cstruct" {>= "6.0.0"}
"digestif" {>= "0.7"}
"dream-httpaf" {>= "1.0.0~alpha3"}
"dream-pure" {>= "1.0.0~alpha2"}
"dune" {>= "2.7.0"}
"fmt" {>= "0.8.7"}
"graphql_parser"
"graphql-lwt"
"lambdasoup" {>= "0.6.1"}
"lwt"
"lwt_ppx" {>= "1.2.2"}
"lwt_ssl"
"logs" {>= "0.5.0"}
"magic-mime"
"markup" {>= "1.0.2"}
"mirage-clock" {>= "3.0.0"}
"mirage-crypto" {>= "1.0.0"}
"mirage-crypto-rng" {>= "1.0.0"}
"mirage-crypto-rng-lwt"
"multipart_form" {>= "0.4.0"}
"multipart_form-lwt"
"ocaml" {>= "4.08.0"}
"ptime" {>= "0.8.1"}
"ssl" {>= "0.5.8"}
"uri" {>= "4.2.0"}
"yojson"
"alcotest" {with-test}
"bisect_ppx" {with-test & >= "2.5.0"}
"caqti-driver-postgresql" {with-test}
"caqti-driver-sqlite3" {with-test}
"crunch" {with-test}
"html_of_jsx" {with-test}
"js_of_ocaml" {with-test}
"js_of_ocaml-ppx" {with-test}
"ppx_expect" {with-test & >= "v0.15.0"}
"ppx_yojson_conv" {with-test}
"reason" {with-test}
"tyxml" {with-test & >= "4.5.0"}
"tyxml-jsx" {with-test}