-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdune-project
80 lines (71 loc) · 2.48 KB
/
dune-project
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
(lang dune 2.7)
(name rust-staticlib-gen)
(generate_opam_files true)
(source
(github Lupus/rust-staticlib-gen))
(license Apache-2.0)
(authors "Konstantin Olkhovskiy <[email protected]>")
(maintainers "Konstantin Olkhovskiy <[email protected]>")
(package
(name rust-staticlib-gen)
(synopsis "Utility for generating Rust static libraries for OCaml projects")
(description
"rust-staticlib-gen is a tool designed to streamline the integration of Rust code into OCaml projects. It automates the generation of build files and orchestrates the build process, allowing OCaml code to seamlessly interface with Rust libraries. This tool extracts Rust crate dependencies from opam files, generates necessary dune and Cargo.toml files, and builds the Rust static libraries. It ensures compatibility between OCaml bindings and Rust crates by specifying exact versions in Cargo.toml.")
(depends
(toml
(>= 7.1.0))
(yojson
(>= 2.2.2))
(sexplib0
(>= v0.16.0))
(parsexp
(>= v0.16.0))
(opam-client
(and
(>= 2.2.1)
(< 2.3)))
(opam-state
(and
(>= 2.2.1)
(< 2.3)))
(opam-solver
(and
(>= 2.2.1)
(< 2.3)))
(fpath
(>= 0.7.3))
(cmdliner
(>= 1.3.0))
(ocamlformat
(and
:with-test
(>= 0.26.2)
(< 0.27.0)))
(rust-staticlib-virtual
(= :version))
(dune-cargo-build
(= :version))))
(package
(name rust-staticlib-virtual)
(synopsis
"A Sentinel/marker package to define the rust staticlib virtual library")
(description
"The rust-staticlib-virtual package is a sentinel/marker package that defines a virtual dune library that indicates presence of Rust dependencies somewhere down the dependency chain. To have an implementation of this virtual library in your project, please use `rust-staticlib-gen` tool: https://github.com/Lupus/rust-staticlib-gen")
(depends))
(package
(name dune-cargo-build)
(synopsis
"Tool to invoke Cargo for building Rust crates within the dune sandbox")
(description
"dune-cargo-build is a tool that runs cargo build in offline mode for a specified crate, ensuring compatibility with dune's/opam's sandboxing. It parses Cargo's JSON output to determine the produced artifacts and copies them to the current directory, renaming them to match what OCaml expects for foreign stubs. This tool is useful for integrating Rust build processes into OCaml projects managed by dune.")
(depends
(ocaml
(>= 4.13))
(yojson
(>= 2.2.2))
(ocamlformat
(and
:with-test
(>= 0.26.2)
(< 0.27.0)))
(odoc :with-doc)))