Module BuilderOps.Make
Contents
Instructions: Use this module in your project
In the IDE (CLion, Visual Studio Code, Xcode, etc.) you use for your DkSDK project:
Add the following to your project's
dependencies/CMakeLists.txt
:DkSDKProject_DeclareAvailable(capnp CONSTRAINT "= 3.5.0" FINDLIBS capnp capnp.unix) DkSDKProject_MakeAvailable(capnp)
Add the
Findlib::capnp
library to any desired targets insrc/*/CMakeLists.txt
:target_link_libraries(YourPackage_YourLibraryName # ... existing libraries, if any ... Findlib::capnp)
Click your IDE's
Build
button
Not using DkSDK?
FIRST, do one or all of the following:
Run:
opam install capnp.3.5.0
Edit your
dune-project
and add:(package (name YourExistingPackage) (depends ; ... existing dependenices ... (capnp (>= 3.5.0))))
Then run:
dune build *.opam # if this fails, run: dune build
Edit your
<package>.opam
file and add:depends: [ # ... existing dependencies ... "capnp" {>= "3.5.0"} ]
Then run:
opam install . --deps-only
FINALLY, add the capnp
library to any desired (library)
and/or (executable)
targets in your **/dune
files:
(library
(name YourLibrary)
; ... existing library options ...
(libraries
; ... existing libraries ...
capnp))
(executable
(name YourExecutable)
; ... existing executable options ...
(libraries
; ... existing libraries ...
capnp))
Parameters
module
ROM
:
MessageSig.S
Signature
module
ROM
:
sig
...
end
module
ROC
:
sig
...
end
module
RWC
:
sig
...
end
module
RReader
:
sig
...
end
val
get_struct_pointer : ``(
'cap
,
'a
)``
RWM.StructStorage.t
->
``int
->
'cap0
RWM.Slice.t
val
alloc_struct_storage :
rw
RWM.Message.t
->
``data_words:int
->
``pointer_words:int
->
``(
rw
,
'a
)``
RWM.StructStorage.t
val
alloc_list_storage :
rw
RWM.Message.t
->
Capnp__.ListStorageType.t
->
``int
->
rw
RWM.ListStorage.t
val
init_far_pointer :
rw
RWM.Slice.t
->
``content:
'a
->
``content_slice:
rw
RWM.Slice.t
->
``init_normal_pointer:``(
rw
RWM.Slice.t
->
'a0
->
unit)``
->
``init_far_pointer_tag:``(
rw
RWM.Slice.t
->
unit)``
->
unit
val
list_pointer_type_of_storage_type :
Capnp__.ListStorageType.t
->
Capnp__.ListPointer.element_type_t
val
init_normal_list_pointer :
rw
RWM.Slice.t
->
rw
RWM.ListStorage.t
->
unit
val
init_list_pointer :
rw
RWM.Slice.t
->
rw
RWM.ListStorage.t
->
unit
val
init_normal_struct_pointer :
rw
RWM.Slice.t
->
``(
'cap
,
'a
)``
RWM.StructStorage.t
->
unit
val
init_struct_pointer :
rw
RWM.Slice.t
->
``(
rw
,
'a
)``
RWM.StructStorage.t
->
unit
val
shallow_copy_pointer : ``src:
rw
RWM.Slice.t
->
``dest:
rw
RWM.Slice.t
->
unit
val
shallow_copy_struct : ``src:``(
rw
,
'a
)``
RWM.StructStorage.t
->
``dest:``(
rw
,
'b
)``
RWM.StructStorage.t
->
unit
val
upgrade_struct_list :
rw
RWM.Slice.t
->
rw
RWM.ListStorage.t
->
``data_words:int
->
``pointer_words:int
->
rw
RWM.ListStorage.t
val
deref_list_pointer : ``?struct_sizes:
StructSizes.t
->
``create_default:``(
rw
RWM.Message.t
->
rw
RWM.ListStorage.t
)``
->
rw
RWM.Slice.t
->
rw
RWM.ListStorage.t
val
shallow_zero_out_struct : ``(
rw
,
'a
)``
RWM.StructStorage.t
->
unit
val
upgrade_struct :
rw
RWM.Slice.t
->
``(
rw
,
'a
)``
RWM.StructStorage.t
->
``data_words:int
->
``pointer_words:int
->
``(
rw
,
'b
)``
RWM.StructStorage.t
val
deref_struct_pointer : ``create_default:``(
rw
RWM.Message.t
->
``(
rw
,
'a
)``
RWM.StructStorage.t
)``
->
``data_words:int
->
``pointer_words:int
->
rw
RWM.Slice.t
->
``(
rw
,
'a0
)``
RWM.StructStorage.t
val
deep_copy_pointer : ``src:
'cap
ROM.Slice.t
->
``dest:
rw
RWM.Slice.t
->
unit
val
deep_copy_struct : ``src:``(
'cap
,
'a
)``
ROM.StructStorage.t
->
``dest_message:
rw
RWM.Message.t
->
``data_words:int
->
``pointer_words:int
->
``(
rw
,
'b
)``
RWM.StructStorage.t
val
deep_copy_struct_to_dest : ``src:``(
'cap
,
'a
)``
ROM.StructStorage.t
->
``dest:``(
rw
,
'b
)``
RWC.StructStorage.t
->
unit
val
deep_copy_list : ``?struct_sizes:
StructSizes.t
->
``src:
'cap
ROM.ListStorage.t
->
``dest_message:
rw
RWM.Message.t
->
``unit
->
rw
RWM.ListStorage.t
val
deep_copy_struct_list : ``src:
'cap
ROM.ListStorage.t
->
``dest_message:
rw
RWM.Message.t
->
``data_words:int
->
``pointer_words:int
->
rw
RWM.ListStorage.t
val
deep_zero_pointer :
rw
RWM.Slice.t
->
unit
val
deep_zero_list :
rw
RWM.ListStorage.t
->
unit
val
deep_zero_struct : ``(
rw
,
'a
)``
RWM.StructStorage.t
->
unit