Skip to content

Commit bcc4373

Browse files
committed
update README for v0.2
1 parent f93e819 commit bcc4373

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## rust-clib
22

3+
An example project that uses Rust to create a library with C API.
4+
35
Build rust lib and run C tests
46
```
57
(cd mylib && cargo build)
@@ -8,13 +10,13 @@ make test
810

911
successful output looks like this:
1012
```
11-
Compiling add v0.1.0 (~/src/rust/clib/mylib)
13+
Compiling add v0.2.0 (~/src/rust/clib/mylib)
1214
Finished dev [unoptimized + debuginfo] target(s) in 4.21s
1315
cp mylib/target/debug/libmylib.a .
1416
gcc libmylib.a -o test test.o libmylib.a
1517
./test
1618
PASSED
17-
Tests run: 2
19+
Tests run: 4
1820
```
1921

2022

@@ -27,10 +29,11 @@ Tests run: 2
2729

2830
## The Rust part
2931

30-
in the `add` directory is a Rust crate
32+
in the `my` directory is a Rust crate, which has tests along with a very
33+
simple example that calls a function from Rust (that is also callable from C)
3134

3235
```
33-
cd add
36+
cd mylib
3437
cargo test # test that we can call the function in Rust
3538
cargo run --example stdin # interactive example
3639
```

0 commit comments

Comments
 (0)