chore: turn tiny_httpd_ws into tiny_httpd.ws, a sub-lib

now that there's no additional dep it's not a problem!
This commit is contained in:
Simon Cruanes 2024-02-05 10:36:55 -05:00
parent 78baf70126
commit 1a45961443
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
7 changed files with 5 additions and 48 deletions

View file

@ -27,14 +27,6 @@
(ptime :with-test)
(qcheck-core (and (>= 0.9) :with-test))))
(package
(name tiny_httpd_ws)
(synopsis "Websockets for tiny_httpd")
(depends
(tiny_httpd (= :version))
(logs :with-test)
(odoc :with-doc)))
(package
(name tiny_httpd_camlzip)
(synopsis "Interface to camlzip for tiny_httpd")

View file

@ -24,7 +24,7 @@
(name echo_ws)
(flags :standard -warn-error -a+8)
(modules echo_ws)
(libraries tiny_httpd tiny_httpd_ws logs))
(libraries tiny_httpd tiny_httpd.ws logs))
(rule
(targets test_output.txt)

View file

@ -1 +1,2 @@
module IO = Tiny_httpd_io
let spf = Printf.sprintf
let ( let@ ) = ( @@ )

View file

@ -1,7 +1,7 @@
(library
(name tiny_httpd_ws)
(public_name tiny_httpd_ws)
(public_name tiny_httpd.ws)
(synopsis "Websockets for tiny_httpd")
(private_modules common_ utils_)
(foreign_stubs

View file

@ -3,9 +3,6 @@ open Tiny_httpd_server
module Log = Tiny_httpd_log
module IO = Tiny_httpd_io
let spf = Printf.sprintf
let ( let@ ) = ( @@ )
type handler = Unix.sockaddr -> IO.Input.t -> IO.Output.t -> unit
module Frame_type = struct
@ -34,7 +31,7 @@ module Header = struct
mutable ty: Frame_type.t;
mutable payload_len: int;
mutable mask: bool;
mutable mask_key: bytes; (** len = 4 *)
mask_key: bytes; (** len = 4 *)
}
let create () : t =

View file

@ -1,4 +1,3 @@
open Common_
open Tiny_httpd_server
module IO = Tiny_httpd_io

View file

@ -1,32 +0,0 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "0.16"
synopsis: "Websockets for tiny_httpd"
maintainer: ["c-cube"]
authors: ["c-cube"]
license: "MIT"
homepage: "https://github.com/c-cube/tiny_httpd/"
bug-reports: "https://github.com/c-cube/tiny_httpd/issues"
depends: [
"dune" {>= "2.9"}
"tiny_httpd" {= version}
"logs" {with-test}
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"--promote-install-files=false"
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
["dune" "install" "-p" name "--create-install-files" name]
]
dev-repo: "git+https://github.com/c-cube/tiny_httpd.git"