Skip to content

Commit

Permalink
prepare for 0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Mar 31, 2022
1 parent ad92acb commit a78c489
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 10 deletions.
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 0.12

- add dep on `seq`
- add a `Html` module with combinators to produce html
- add `Tiny_httpd_dir.VFS` to emulate file systems
- add a small program, `tiny-httpd-vfs-pack`, to pack directories and files
(local or behind a URL) into a OCaml module using `VFS`
- show small example of socket activation

## 0.11

Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ watch:
@dune build @all -w

.PHONY: benchs tests build watch

VERSION=$(shell awk '/^version:/ {print $$2}' tiny_httpd.opam)

update_next_tag:
@echo "update version to $(VERSION)..."
sed --follow-symlinks -i "s/NEXT_VERSION/$(VERSION)/g" $(wildcard src/**.ml) $(wildcard src/**.mli) \
$(wildcard src/**/*.ml) $(wildcard src/**/*.mli)
sed --follow-symlinks -i "s/NEXT_RELEASE/$(VERSION)/g" $(wildcard src/**.ml) $(wildcard src/**.mli) \
$(wildcard src/**/*.ml) $(wildcard src/**/*.mli)
2 changes: 1 addition & 1 deletion src/Tiny_httpd_buf.mli
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
These buffers are used to avoid allocating too many byte arrays when
processing streams and parsing requests.
@since NEXT_RELEASE
@since 0.12
*)

type t
Expand Down
10 changes: 5 additions & 5 deletions src/Tiny_httpd_dir.mli
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ val config :
unit ->
config
(** Build a config from {!default_config}.
@since NEXT_RELEASE *)
@since 0.12 *)

(** [add_dirpath ~config ~dir ~prefix server] adds route handle to the
[server] to serve static files in [dir] when url starts with [prefix],
Expand All @@ -83,7 +83,7 @@ val add_dir_path :
This is used to emulate a file system from pure OCaml functions and data,
e.g. for resources bundled inside the web server.
@since NEXT_RELEASE
@since 0.12
*)
module type VFS = sig
val descr : string
Expand Down Expand Up @@ -118,7 +118,7 @@ end
val vfs_of_dir : string -> (module VFS)
(** [vfs_of_dir dir] makes a virtual file system that reads from the
disk.
@since NEXT_RELEASE
@since 0.12
*)

val add_vfs :
Expand All @@ -127,14 +127,14 @@ val add_vfs :
prefix:string ->
Tiny_httpd_server.t -> unit
(** Similar to {!add_dir_path} but using a virtual file system instead.
@since NEXT_RELEASE
@since 0.12
*)

(** An embedded file system, as a list of files with (relative) paths.
This is useful in combination with the "tiny-httpd-mkfs" tool,
which embeds the files it's given into a OCaml module.
@since NEXT_RELEASE
@since 0.12
*)
module Embedded_fs : sig
type t
Expand Down
2 changes: 1 addition & 1 deletion src/Tiny_httpd_html.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
This module provides combinators to produce html. It doesn't enforce
the well-formedness of the html, unlike Tyxml, but it's simple and should
be reasonably efficient.
@since NEXT_RELEASE
@since 0.12
*)

(** @inline *)
Expand Down
2 changes: 1 addition & 1 deletion src/gen/gentags.ml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ let prelude = {|
This output type is used to produce a string reasonably efficiently from
a tree of combinators.
@since NEXT_RELEASE
@since 0.12
@open *)
module Out : sig
type t
Expand Down
2 changes: 1 addition & 1 deletion tiny_httpd.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "2.0"
version: "0.11"
version: "0.12"
authors: ["Simon Cruanes"]
maintainer: "[email protected]"
license: "MIT"
Expand Down
2 changes: 1 addition & 1 deletion tiny_httpd_camlzip.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "2.0"
version: "0.11"
version: "0.12"
authors: ["Simon Cruanes"]
maintainer: "[email protected]"
license: "MIT"
Expand Down

0 comments on commit a78c489

Please sign in to comment.