My working unpac repository

Spring clean build infrastructure.

+90 -90
+17 -26
B0.ml
··· 8 8 9 9 (* Libraries *) 10 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 11 + let uutf_lib = B0_ocaml.lib uutf ~srcs:[`Dir ~/"src"] 15 12 16 13 (* Tests *) 17 14 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 15 + let test_uutf = B0_ocaml.test ~/"test/test_uutf.ml" ~requires:[uutf] 23 16 24 17 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 18 + let srcs = [`File ~/"test/utftrip.ml"] in 27 19 let requires = [unix; uutf; cmdliner] in 28 - B0_ocaml.exe "utftrip" ~public:true ~doc ~srcs ~requires 20 + B0_ocaml.exe "utftrip" ~public:true ~srcs ~requires 29 21 30 22 (* Packs *) 31 23 32 24 let default = 33 25 let meta = 34 26 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) 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 44 35 ["unicode"; "text"; "utf-8"; "utf-16"; "codec"; "org:erratique"] 45 36 |> 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"|}; 37 + |> ~~ B0_opam.depopts ["cmdliner", ""] 38 + |> ~~ B0_opam.conflicts 39 + [ "cmdliner", {|< "1.3.0"|}] 40 + |> ~~ B0_opam.depends 41 + [ "ocaml", {|>= "4.08.0"|}; 51 42 "ocamlfind", {|build|}; 52 43 "ocamlbuild", {|build|}; 53 44 "topkg", {|build & >= "1.0.3"|};
+2 -1
CHANGES.md
··· 1 1 2 - - `uuidtrip` support for `cmdliner` 2.0 and handle 1.1.0 deprecations. 2 + - Require OCaml >= 4.08. 3 + - `uuidtrip` handle `cmdliner` deprecations. 3 4 4 5 v1.0.3 2022-02-03 5 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 1 Uutf — Non-blocking streaming Unicode codec for OCaml 2 - ------------------------------------------------------------------------------- 3 - %%VERSION%% 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 + --- 4 12 5 13 Uutf is a non-blocking streaming codec to decode and encode the UTF-8, 6 14 UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently ··· 9 17 10 18 Functions are also provided to fold over the characters of UTF encoded 11 19 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. 20 + Buffer.t values. 14 21 15 22 Uutf has no dependency and is distributed under the ISC license. 16 23 17 - Home page: http://erratique.ch/software/uutf 18 - Contact: Daniel Bünzli `<daniel.buenzl i@erratique.ch>` 24 + Home page: <http://erratique.ch/software/uutf> 25 + 26 + [`bytesrw`]: https://erratique.ch/software/bytesrw 19 27 20 28 21 29 ## Installation ··· 27 35 If you don't use `opam` consult the [`opam`](opam) file for build 28 36 instructions. 29 37 30 - 31 38 ## Documentation 32 39 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 40 + The documentation can be consulted [online] or via `odig doc uutf`. 46 41 47 - The resulting binaries are in `_build/test` : 42 + Questions are welcome but better asked on the [OCaml forum] than on the 43 + issue tracker. 48 44 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). 45 + [online]: http://erratique.ch/software/uutf/doc/ 46 + [OCaml forum]: https://discuss.ocaml.org/
-3
_tags
··· 1 1 true : bin_annot, safe_string 2 - 3 2 <_b0> : -traverse 4 3 <src> : include 5 - <test> : include 6 4 <test/utftrip.*> : package(unix), package(cmdliner) 7 - <test/examples.*> : package(unix)
+11 -3
doc/index.mld
··· 1 1 {0 Uutf {%html: <span class="version">%%VERSION%%</span>%}} 2 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 + 3 12 Uutf is a non-blocking streaming codec to decode and encode the UTF-8, 4 13 UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently 5 14 work character by character without blocking on IO. Decoders perform ··· 7 16 8 17 Functions are also provided to fold over the characters of UTF encoded 9 18 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. 19 + {!Buffer.t} values. 12 20 13 - {1:api API} 21 + {1:library_uutf Library [uutf]} 14 22 15 23 {!modules: 16 24 Uutf
+32 -28
opam
··· 1 1 opam-version: "2.0" 2 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"] 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"] 6 15 homepage: "https://erratique.ch/software/uutf" 7 16 doc: "https://erratique.ch/software/uutf/doc/" 8 - dev-repo: "git+https://erratique.ch/repos/uutf.git" 9 17 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"}] 18 + depends: [ 19 + "ocaml" {>= "4.08.0"} 20 + "ocamlfind" {build} 21 + "ocamlbuild" {build} 22 + "topkg" {build & >= "1.0.3"} 23 + ] 16 24 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>`""" 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 1 description = "Non-blocking streaming Unicode codec for OCaml" 2 + version = "%%VERSION_NUM%%" 3 3 requires = "" 4 4 archive(byte) = "uutf.cma" 5 5 archive(native) = "uutf.cmxa" 6 6 plugin(byte) = "uutf.cma" 7 7 plugin(native) = "uutf.cmxs" 8 + exists_if = "uutf.cma uutf.cmxa"
+1 -3
pkg/pkg.ml
··· 4 4 open Topkg 5 5 6 6 let cmdliner = Conf.with_pkg "cmdliner" 7 - 8 7 let () = 9 8 Pkg.describe "uutf" @@ fun c -> 10 9 let cmdliner = Conf.value c cmdliner in 11 10 Ok [ Pkg.mllib "src/uutf.mllib"; 12 11 Pkg.bin ~cond:cmdliner "test/utftrip"; 13 - Pkg.test "test/examples"; 14 - Pkg.test "test/test"; ] 12 + Pkg.doc "doc/index.mld" ~dst:"odoc-pages/index.mld" ]
test/test.ml test/test_uutf.ml