Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename runtime library into pbrt, make it independent #176

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchs/benchs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ module Nested = struct
done
*)

let[@inline] int64_as_varint = varint
let int64_as_varint = varint
let int_as_varint i e =
(varint[@inlined]) (Int64.of_int i) e

Expand Down
4 changes: 2 additions & 2 deletions dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(env
(_
(flags -bin-annot -annot -safe-string
-keep-locs -no-alias-deps -w A-4-42-41-48)))
(flags -bin-annot -annot -safe-string -strict-sequence
-keep-locs -no-alias-deps -w A-4-42-41-48-70)))
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(lang dune 1.11)
(lang dune 2.0)
(name ocaml-protoc)
(allow_approximate_merlin)
6 changes: 5 additions & 1 deletion ocaml-protoc.opam
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version: "2.1"
synopsis: "Protobuf compiler for OCaml"
description: "Protobuf compiler for OCaml"
maintainer: "Maxime Ransan <[email protected]>"
post-messages: [
"The runtime library is now called \"pbrt\"."
]
authors:[
"Maxime Ransan <[email protected]>"
]
Expand All @@ -19,7 +22,8 @@ build: [
]
depends: [
"ocaml" {>="4.03.0"}
"dune" {>="1.11"}
"dune" {>="2.0"}
"stdlib-shims"
"pbrt" {= version}
"odoc" {with-doc}
]
31 changes: 31 additions & 0 deletions pbrt.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
opam-version: "2.0"
name: "pbrt"
version: "2.1"
synopsis: "Runtime library for Protobuf tooling"
description: "Runtime library for Protobuf tooling"
maintainer: "Maxime Ransan <[email protected]>"
post-messages: [
"Pbrt: runtime library for ocaml-protoc.

A shim library named \"ocaml-protoc\" still exists, to ease the
migration."
]
authors:[
"Maxime Ransan <[email protected]>"
]
homepage: "https://github.com/mransan/ocaml-protoc"
bug-reports:"https://github.com/mransan/ocaml-protoc/issues"
dev-repo:"git+https://github.com/mransan/ocaml-protoc.git"
license: "MIT"
build: [
["dune" "subst"] {dev}
["dune" "build" "@install" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
["dune" "build" "@doc" "-p" name "-j" jobs] {with-doc}
]
depends: [
"ocaml" {>="4.03.0"}
"dune" {>="1.11"}
"stdlib-shims"
"odoc" {with-doc}
]
16 changes: 12 additions & 4 deletions src/ocaml-protoc/dune
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
(executable
(executable
(name ocaml_protoc)
(public_name ocaml-protoc)
(modules
(package ocaml-protoc)
(modules
ocaml_protoc
ocaml_protoc_cmdline
ocaml_protoc_compilation
ocaml_protoc_generation)
ocaml_protoc_compilation
ocaml_protoc_generation)
(libraries compiler_lib)
)

(library
(synopsis "Shim to depend on pbrt")
(name ocaml_protoc)
(public_name ocaml-protoc)
(modules)
(libraries (re_export pbrt)))
6 changes: 2 additions & 4 deletions src/runtime/dune
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
(library
(name pbrt)
(public_name ocaml-protoc)
(public_name pbrt)
; we need to increase -inline, so that the varint encoder/decoder can
; be remembered by the inliner.
(ocamlopt_flags :standard -inline 100)
(wrapped false)
)
(ocamlopt_flags :standard -inline 100))