You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-21Lines changed: 17 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,31 +7,26 @@
7
7
8
8
> Reference implementations for the Pact Specification written in Rust
9
9
10
-
This project contains a reference implementation of the [Pact specification](https://github.com/pact-foundation/pact-specification)
11
-
written in Rust, often referred to as the Pact Core.
10
+
This project contains a reference implementation of the [Pact specification](https://github.com/pact-foundation/pact-specification) written in Rust, often referred to as the Pact Core.
11
+
12
+
It exposes the core functionality through various crates, as part of the Pact Rust SDK, as well as through FFI (Foreign Function Interface) and CLI (Command Line Interface) for use in other programming languages.
12
13
13
14
## Usage
14
15
15
16
### Rust
16
17
17
-
For Rust projects, you can use the Rust crates from this library in your project directly. Refer to the [Rust project
For Rust projects, you can use the Rust crates from this library in your project directly. Refer to the [Rust project readme](rust/README.md).
21
19
22
-
####FFI
20
+
### FFI
23
21
24
-
This project contains dynamic libraries that expose the core functionality through FFI (Foreign Function Interface).
22
+
This project contains dynamic libraries that expose the core functionality through a C-compatible FFI (Foreign Function Interface).
25
23
26
-
For examples:
24
+
This project contains a couple of examples which demonstrate how to use the FFI library in a C project, with a focus on showcasing how to call the FFI functions from C:
Most of the Pact SDKs in other languages make use of this FFI library to provide Pact functionality. You can see this in the [Ecosystem graph](https://docs.pact.io/diagrams/ecosystem#rust-ffi-consumers-goldberg-machine), and the following examples:
35
30
36
31
*[Javascript via pact-js-core](https://github.com/pact-foundation/pact-js-core)
37
32
*[Ruby via pact-ruby-ffi](https://github.com/YOU54F/pact-ruby-ffi)
@@ -43,7 +38,9 @@ For implementations:
43
38
*[C++ via pact-cplusplus](https://github.com/pact-foundation/pact-cplusplus)
44
39
*[Python via pact-python](https://github.com/pact-foundation/pact-python)
45
40
46
-
#### CLI
41
+
Lastly, you can also refer to [Hello Pact FFI](https://github.com/YOU54F/hello_ffi) for collection of examples in various languages.
42
+
43
+
### CLI
47
44
48
45
This project contains code to support exposing the core functionality through CLI (Command Line Interface).
49
46
@@ -55,8 +52,7 @@ They are distributed in binary & Docker formats.
55
52
56
53
## Building
57
54
58
-
To build the libraries in this project, you need a working Rust environment. Requires minimum Rust 1.59.0.
59
-
Refer to the [Rust Guide](https://www.rust-lang.org/learn/get-started).
55
+
To build the libraries in this project, you need a working Rust environment. Requires minimum Rust 1.59.0. Refer to the [Rust Guide](https://www.rust-lang.org/learn/get-started).
60
56
61
57
The build tool used is `cargo`.
62
58
@@ -73,7 +69,7 @@ See [CONTRIBUTING](CONTRIBUTING.md) (PRs are always welcome!).
73
69
74
70
## Documentation
75
71
76
-
Rust library documentation is published to the Rust documentation site. Refer to the [Rust project README](rust/README.md).
72
+
Rust library documentation is published to the Rust documentation site[`docs.rs`](https://docs.rs). Refer to the [Rust project README](rust/README.md).
77
73
78
74
Additional documentation can be found at the main [Pact website](https://pact.io).
79
75
@@ -83,8 +79,8 @@ Join us in slack: [](https://slack.pact
0 commit comments