Skip to content

Commit 70fd6f6

Browse files
committed
Merge branch 'add-static-lib'
2 parents ee5e2fb + b9c011e commit 70fd6f6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rust-version = "1.81"
1515

1616
[lib]
1717
name = "crc_fast"
18-
crate-type = ["lib", "cdylib"]
18+
crate-type = ["lib", "cdylib", "staticlib"]
1919
bench = true
2020

2121
[dependencies]

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ So I wrote one. :)
2424

2525
## Other languages
2626

27-
Supplies a [C/C++ compatible shared library](#cc-compatible-shared-library) for use with other non-`Rust` languages.
27+
Supplies a [C/C++ compatible library](#cc-compatible-library) for use with other non-`Rust` languages.
2828

2929
## Implementations
3030

@@ -39,8 +39,7 @@ See [CHANGELOG](CHANGELOG.md).
3939
## Build & Install
4040

4141
`cargo build` will obviously build the library, including
42-
the [C-compatible shared library](#c-compatible-shared-library). There are fine-tuning [feature flags](Cargo.toml)
43-
available, should they be necessary for your deployment and [acceleration](#acceleration-targets) targets.
42+
the [C-compatible library](#cc-compatible-library).
4443

4544
A _very_ basic [Makefile](Makefile) is supplied which supports `make install` to install the shared library and header
4645
file to
@@ -246,11 +245,12 @@ let checksum = checksum_file_with_params(custom_params, file_on_disk, None);
246245
assert_eq!(checksum.unwrap(), 0xcbf43926);
247246
```
248247

249-
## C/C++ compatible shared library
248+
## C/C++ compatible library
250249

251250
`cargo build` will produce a shared library target (`.so` on Linux, `.dll` on Windows, `.dylib` on macOS, etc) and an
252251
auto-generated [libcrc_fast.h](libcrc_fast.h) header file for use in non-Rust projects, such as through
253-
[FFI](https://en.wikipedia.org/wiki/Foreign_function_interface).
252+
[FFI](https://en.wikipedia.org/wiki/Foreign_function_interface). It will also produce a static library target (`.a` on Linux and macOS, `.lib` on Windows, etc) for projects
253+
which prefer statically linking.
254254

255255
There is a [crc-fast PHP extension](https://github.com/awesomized/crc-fast-php-ext) using it, for example.
256256

0 commit comments

Comments
 (0)