My working unpac repository

Spring clean build infrastructure.

+90 -90
+17 -26
B0.ml
··· 8 9 (* Libraries *) 10 11 - let uutf_lib = 12 - let srcs = Fpath.[`Dir (v "src")] in 13 - let requires = [] in 14 - B0_ocaml.lib uutf ~doc:"The uutf library" ~srcs ~requires 15 16 (* Tests *) 17 18 - let test = 19 - let srcs = Fpath.[`File (v "test/test.ml")] in 20 - let meta = B0_meta.(empty |> tag test) in 21 - let requires = [ uutf ] in 22 - B0_ocaml.exe "test" ~doc:"Test suite" ~srcs ~meta ~requires 23 24 let utftrip = 25 - let doc = "Recode UTF-{8,16,16LE,16BE} and latin1 from stdin to stdout" in 26 - let srcs = Fpath.[`File (v "test/utftrip.ml")] in 27 let requires = [unix; uutf; cmdliner] in 28 - B0_ocaml.exe "utftrip" ~public:true ~doc ~srcs ~requires 29 30 (* Packs *) 31 32 let default = 33 let meta = 34 B0_meta.empty 35 - |> B0_meta.(add authors) ["The uutf programmers"] 36 - |> B0_meta.(add maintainers) 37 - ["Daniel Bünzli <daniel.buenzl i@erratique.ch>"] 38 - |> B0_meta.(add homepage) "https://erratique.ch/software/uutf" 39 - |> B0_meta.(add online_doc) "https://erratique.ch/software/uutf/doc/" 40 - |> B0_meta.(add licenses) ["ISC"] 41 - |> B0_meta.(add repo) "git+https://erratique.ch/repos/uutf.git" 42 - |> B0_meta.(add issues) "https://github.com/dbuenzli/uutf/issues" 43 - |> B0_meta.(add description_tags) 44 ["unicode"; "text"; "utf-8"; "utf-16"; "codec"; "org:erratique"] 45 |> B0_meta.tag B0_opam.tag 46 - |> B0_meta.add B0_opam.depopts ["cmdliner", ""] 47 - |> B0_meta.add B0_opam.conflicts 48 - [ "cmdliner", {|< "1.1.0"|}] 49 - |> B0_meta.add B0_opam.depends 50 - [ "ocaml", {|>= "4.03.0"|}; 51 "ocamlfind", {|build|}; 52 "ocamlbuild", {|build|}; 53 "topkg", {|build & >= "1.0.3"|};
··· 8 9 (* Libraries *) 10 11 + let uutf_lib = B0_ocaml.lib uutf ~srcs:[`Dir ~/"src"] 12 13 (* Tests *) 14 15 + let test_uutf = B0_ocaml.test ~/"test/test_uutf.ml" ~requires:[uutf] 16 17 let utftrip = 18 + let srcs = [`File ~/"test/utftrip.ml"] in 19 let requires = [unix; uutf; cmdliner] in 20 + B0_ocaml.exe "utftrip" ~public:true ~srcs ~requires 21 22 (* Packs *) 23 24 let default = 25 let meta = 26 B0_meta.empty 27 + |> ~~ B0_meta.authors ["The uutf programmers"] 28 + |> ~~ B0_meta.maintainers ["Daniel Bünzli <daniel.buenzl i@erratique.ch>"] 29 + |> ~~ B0_meta.homepage "https://erratique.ch/software/uutf" 30 + |> ~~ B0_meta.online_doc "https://erratique.ch/software/uutf/doc/" 31 + |> ~~ B0_meta.licenses ["ISC"] 32 + |> ~~ B0_meta.repo "git+https://erratique.ch/repos/uutf.git" 33 + |> ~~ B0_meta.issues "https://github.com/dbuenzli/uutf/issues" 34 + |> ~~ B0_meta.description_tags 35 ["unicode"; "text"; "utf-8"; "utf-16"; "codec"; "org:erratique"] 36 |> B0_meta.tag B0_opam.tag 37 + |> ~~ B0_opam.depopts ["cmdliner", ""] 38 + |> ~~ B0_opam.conflicts 39 + [ "cmdliner", {|< "1.3.0"|}] 40 + |> ~~ B0_opam.depends 41 + [ "ocaml", {|>= "4.08.0"|}; 42 "ocamlfind", {|build|}; 43 "ocamlbuild", {|build|}; 44 "topkg", {|build & >= "1.0.3"|};
+2 -1
CHANGES.md
··· 1 2 - - `uuidtrip` support for `cmdliner` 2.0 and handle 1.1.0 deprecations. 3 4 v1.0.3 2022-02-03 5 -----------------
··· 1 2 + - Require OCaml >= 4.08. 3 + - `uuidtrip` handle `cmdliner` deprecations. 4 5 v1.0.3 2022-02-03 6 -----------------
+6
DEVEL.md
···
··· 1 + This project uses (perhaps the development version of) [`b0`] for 2 + development. Consult [b0 occasionally] for quick hints on how to 3 + perform common development tasks. 4 + 5 + [`b0`]: https://erratique.ch/software/b0 6 + [b0 occasionally]: https://erratique.ch/software/b0/doc/occasionally.html
+19 -25
README.md
··· 1 Uutf — Non-blocking streaming Unicode codec for OCaml 2 - ------------------------------------------------------------------------------- 3 - %%VERSION%% 4 5 Uutf is a non-blocking streaming codec to decode and encode the UTF-8, 6 UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently ··· 9 10 Functions are also provided to fold over the characters of UTF encoded 11 OCaml string values and to directly encode characters in OCaml 12 - Buffer.t values. **Note** that since OCaml 4.14, that functionality 13 - can be found in the Stdlib and you are encouraged to migrate to it. 14 15 Uutf has no dependency and is distributed under the ISC license. 16 17 - Home page: http://erratique.ch/software/uutf 18 - Contact: Daniel Bünzli `<daniel.buenzl i@erratique.ch>` 19 20 21 ## Installation ··· 27 If you don't use `opam` consult the [`opam`](opam) file for build 28 instructions. 29 30 - 31 ## Documentation 32 33 - The documentation and API reference is automatically generated by from 34 - the source interfaces. It can be consulted [online][doc] or via 35 - `odig doc uutf`. 36 - 37 - [doc]: http://erratique.ch/software/uutf/doc/ 38 - 39 - 40 - ## Sample programs 41 - 42 - Sample programs are located in the `test` directory of the 43 - distribution. They can be built and run with: 44 - 45 - topkg build --test true && topkg test 46 47 - The resulting binaries are in `_build/test` : 48 49 - - `test.native` tests the library, nothing should fail. 50 - - `utftrip.native`, among other things, reads unicode on `stdin` and rewrites 51 - it on `stdout`. Invoke with `--help` for more information. Depends 52 - on [Cmdliner](http://erratique.ch/software/cmdliner).
··· 1 Uutf — Non-blocking streaming Unicode codec for OCaml 2 + ===================================================== 3 + 4 + **Warning.** You are encouraged not to use this library. 5 + 6 + - As of OCaml 4.14, both UTF encoding and decoding are available 7 + in the standard library, see the `String` and `Buffer` modules. 8 + - If you are looking for a stream abstraction compatible with 9 + effect based concurrency look into [`bytesrw`] package. 10 + 11 + --- 12 13 Uutf is a non-blocking streaming codec to decode and encode the UTF-8, 14 UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently ··· 17 18 Functions are also provided to fold over the characters of UTF encoded 19 OCaml string values and to directly encode characters in OCaml 20 + Buffer.t values. 21 22 Uutf has no dependency and is distributed under the ISC license. 23 24 + Home page: <http://erratique.ch/software/uutf> 25 + 26 + [`bytesrw`]: https://erratique.ch/software/bytesrw 27 28 29 ## Installation ··· 35 If you don't use `opam` consult the [`opam`](opam) file for build 36 instructions. 37 38 ## Documentation 39 40 + The documentation can be consulted [online] or via `odig doc uutf`. 41 42 + Questions are welcome but better asked on the [OCaml forum] than on the 43 + issue tracker. 44 45 + [online]: http://erratique.ch/software/uutf/doc/ 46 + [OCaml forum]: https://discuss.ocaml.org/
-3
_tags
··· 1 true : bin_annot, safe_string 2 - 3 <_b0> : -traverse 4 <src> : include 5 - <test> : include 6 <test/utftrip.*> : package(unix), package(cmdliner) 7 - <test/examples.*> : package(unix)
··· 1 true : bin_annot, safe_string 2 <_b0> : -traverse 3 <src> : include 4 <test/utftrip.*> : package(unix), package(cmdliner)
+11 -3
doc/index.mld
··· 1 {0 Uutf {%html: <span class="version">%%VERSION%%</span>%}} 2 3 Uutf is a non-blocking streaming codec to decode and encode the UTF-8, 4 UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently 5 work character by character without blocking on IO. Decoders perform ··· 7 8 Functions are also provided to fold over the characters of UTF encoded 9 OCaml string values and to directly encode characters in OCaml 10 - {!Buffer.t} values. {b Note} that since OCaml 4.14, that functionality 11 - can be found in the Stdlib and you are encouraged to migrate to it. 12 13 - {1:api API} 14 15 {!modules: 16 Uutf
··· 1 {0 Uutf {%html: <span class="version">%%VERSION%%</span>%}} 2 3 + {b Warning.} You are encouraged not to use this library. 4 + 5 + {ul 6 + {- As of OCaml 4.14, both UTF encoding and decoding are available 7 + in the standard library, see the {!String} and {!Buffer} modules.} 8 + {- If you are looking for a stream abstraction compatible with 9 + effect based concurrency look into the 10 + {{:https://erratique.ch/software/bytesrw}bytesrw} package.}} 11 + 12 Uutf is a non-blocking streaming codec to decode and encode the UTF-8, 13 UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently 14 work character by character without blocking on IO. Decoders perform ··· 16 17 Functions are also provided to fold over the characters of UTF encoded 18 OCaml string values and to directly encode characters in OCaml 19 + {!Buffer.t} values. 20 21 + {1:library_uutf Library [uutf]} 22 23 {!modules: 24 Uutf
+32 -28
opam
··· 1 opam-version: "2.0" 2 name: "uutf" 3 - synopsis: """Non-blocking streaming Unicode codec for OCaml""" 4 - maintainer: ["Daniel Bünzli <daniel.buenzl i@erratique.ch>"] 5 - authors: ["The uutf programmers"] 6 homepage: "https://erratique.ch/software/uutf" 7 doc: "https://erratique.ch/software/uutf/doc/" 8 - dev-repo: "git+https://erratique.ch/repos/uutf.git" 9 bug-reports: "https://github.com/dbuenzli/uutf/issues" 10 - license: ["ISC"] 11 - tags: ["unicode" "text" "utf-8" "utf-16" "codec" "org:erratique"] 12 - depends: ["ocaml" {>= "4.03.0"} 13 - "ocamlfind" {build} 14 - "ocamlbuild" {build} 15 - "topkg" {build & >= "1.0.3"}] 16 depopts: ["cmdliner"] 17 - conflicts: ["cmdliner" {< "1.1.0"}] 18 - build: [["ocaml" "pkg/pkg.ml" "build" "--dev-pkg" "%{dev}%" 19 - "--with-cmdliner" "%{cmdliner:installed}%"]] 20 - description: """ 21 - Uutf is a non-blocking streaming codec to decode and encode the UTF-8, 22 - UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently 23 - work character by character without blocking on IO. Decoders perform 24 - character position tracking and support newline normalization. 25 - 26 - Functions are also provided to fold over the characters of UTF encoded 27 - OCaml string values and to directly encode characters in OCaml 28 - Buffer.t values. **Note** that since OCaml 4.14, that functionality 29 - can be found in the Stdlib and you are encouraged to migrate to it. 30 - 31 - Uutf has no dependency and is distributed under the ISC license. 32 - 33 - Home page: http://erratique.ch/software/uutf 34 - Contact: Daniel Bünzli `<daniel.buenzl i@erratique.ch>`"""
··· 1 opam-version: "2.0" 2 name: "uutf" 3 + synopsis: "Non-blocking streaming Unicode codec for OCaml" 4 + description: """\ 5 + **Warning.** You are encouraged not to use this library. 6 + 7 + - As of OCaml 4.14, both UTF encoding and decoding are available 8 + in the standard library, see the `String` and `Buffer` modules. 9 + - If you are looking for a stream abstraction compatible with 10 + effect based concurrency look into [`bytesrw`] package.""" 11 + maintainer: "Daniel Bünzli <daniel.buenzl i@erratique.ch>" 12 + authors: "The uutf programmers" 13 + license: "ISC" 14 + tags: ["unicode" "text" "utf-8" "utf-16" "codec" "org:erratique"] 15 homepage: "https://erratique.ch/software/uutf" 16 doc: "https://erratique.ch/software/uutf/doc/" 17 bug-reports: "https://github.com/dbuenzli/uutf/issues" 18 + depends: [ 19 + "ocaml" {>= "4.08.0"} 20 + "ocamlfind" {build} 21 + "ocamlbuild" {build} 22 + "topkg" {build & >= "1.0.3"} 23 + ] 24 depopts: ["cmdliner"] 25 + conflicts: [ 26 + "cmdliner" {< "1.3.0"} 27 + ] 28 + build: [ 29 + "ocaml" 30 + "pkg/pkg.ml" 31 + "build" 32 + "--dev-pkg" 33 + "%{dev}%" 34 + "--with-cmdliner" 35 + "%{cmdliner:installed}%" 36 + ] 37 + dev-repo: "git+https://erratique.ch/repos/uutf.git" 38 + x-maintenance-intent: ["(latest)"]
+2 -1
pkg/META
··· 1 - version = "%%VERSION_NUM%%" 2 description = "Non-blocking streaming Unicode codec for OCaml" 3 requires = "" 4 archive(byte) = "uutf.cma" 5 archive(native) = "uutf.cmxa" 6 plugin(byte) = "uutf.cma" 7 plugin(native) = "uutf.cmxs"
··· 1 description = "Non-blocking streaming Unicode codec for OCaml" 2 + version = "%%VERSION_NUM%%" 3 requires = "" 4 archive(byte) = "uutf.cma" 5 archive(native) = "uutf.cmxa" 6 plugin(byte) = "uutf.cma" 7 plugin(native) = "uutf.cmxs" 8 + exists_if = "uutf.cma uutf.cmxa"
+1 -3
pkg/pkg.ml
··· 4 open Topkg 5 6 let cmdliner = Conf.with_pkg "cmdliner" 7 - 8 let () = 9 Pkg.describe "uutf" @@ fun c -> 10 let cmdliner = Conf.value c cmdliner in 11 Ok [ Pkg.mllib "src/uutf.mllib"; 12 Pkg.bin ~cond:cmdliner "test/utftrip"; 13 - Pkg.test "test/examples"; 14 - Pkg.test "test/test"; ]
··· 4 open Topkg 5 6 let cmdliner = Conf.with_pkg "cmdliner" 7 let () = 8 Pkg.describe "uutf" @@ fun c -> 9 let cmdliner = Conf.value c cmdliner in 10 Ok [ Pkg.mllib "src/uutf.mllib"; 11 Pkg.bin ~cond:cmdliner "test/utftrip"; 12 + Pkg.doc "doc/index.mld" ~dst:"odoc-pages/index.mld" ]
test/test.ml test/test_uutf.ml