@@ -10,7 +10,7 @@ APIs in Rust match the APIs defined in C.
10
10
11
11
## MSRV (Minimum Supported Rust Version)
12
12
13
- The MSRV is 1.63 .0 because of the transitive dependencies.
13
+ The MSRV is 1.88 .0 because of the transitive dependencies.
14
14
Note that MSRV may be changed anytime by dependencies.
15
15
16
16
## Example
@@ -34,7 +34,7 @@ mylib-sys = { path = "../mylib-sys" }
34
34
libc = " 0.2"
35
35
36
36
[build-dependencies ]
37
- ctest = " 0.4 "
37
+ ctest = " 0.5.0-beta.0 "
38
38
```
39
39
40
40
Next, add a build script to ` systest/build.rs ` :
@@ -52,7 +52,7 @@ fn main() {
52
52
53
53
// Generate the tests, passing the path to the `*-sys` library as well as
54
54
// the module to generate.
55
- cfg . generate ( " ../mylib-sys/lib.rs" , " all.rs" );
55
+ ctest :: generate_test ( & mut cfg , " ../mylib-sys/lib.rs" , " all.rs" );
56
56
}
57
57
```
58
58
@@ -72,10 +72,10 @@ directory, and everything should be kicked into action!
72
72
73
73
## How it works
74
74
75
- This library will parse the ` *-sys ` crate to learn about all extern fn
76
- definitions within. It will then generate a test suite to ensure that all
77
- function function signatures, constant values, struct layout/alignment, type
78
- size/alignment, etc, all match their C equivalent.
75
+ This library will parse the ` *-sys ` crate to learn about all definitions within.
76
+ It will then generate a test suite to ensure that all function signatures,
77
+ constant values, struct layout/alignment, type size/alignment, etc,
78
+ all match their C equivalent.
79
79
80
80
The generated tests come in two forms. One is a Rust file which contains the
81
81
` main ` function (hence the ` include! ` above), and another is a C file which is
@@ -101,6 +101,14 @@ This project is licensed under either of
101
101
102
102
at your option.
103
103
104
+ ## Modifying test templates
105
+ If you modify the test templates for either Rust or C in any way, then before
106
+ contributing you must run the following command to update the pre-generated test
107
+ files we check against:
108
+ ``` rust
109
+ $ LIBC_BLESS = 1 cargo test
110
+ ```
111
+
104
112
## Contribution
105
113
106
114
Unless you explicitly state otherwise, any contribution intentionally submitted
0 commit comments