|
2 | 2 |
|
3 | 3 | This is [LibreSSL Portable](https://github.com/libressl/portable), packaged for [Zig](https://ziglang.org/).
|
4 | 4 |
|
5 |
| -## Installation |
| 5 | +## Status |
| 6 | + |
| 7 | +This project currently builds the three main LibreSSL libraries as static libraries: |
| 8 | + |
| 9 | +- `libcrypto`: core cryptographic routines |
| 10 | +- `libssl`: OpenSSL 1.1 compatibility layer |
| 11 | +- `libtls`: LibreSSL's new cryptography API |
| 12 | + |
| 13 | +Operating systems and hardware architectures are supported on a best-effort basis. Building for Linux, macOS, and Windows (mingw64) is directly tested by CI. |
| 14 | + |
| 15 | +The command line programs `nc`, `ocspcheck`, and `openssl` are **not** currently built by this build system. |
| 16 | + |
| 17 | +## Usage |
6 | 18 |
|
7 | 19 | First, update your `build.zig.zon`:
|
8 | 20 |
|
9 |
| -``` |
| 21 | +```sh |
10 | 22 | # Initialize a `zig build` project if you haven't already
|
11 | 23 | zig init
|
12 |
| -zig fetch --save <PLACEHOLDER> |
| 24 | +# replace <refname> with the version you want to use, e.g. 3.9.2 |
| 25 | +zig fetch --save git+https://github.com/allyourcodebase/libressl#<refname> |
13 | 26 | ```
|
14 | 27 |
|
15 |
| -You can then import `libressl` in your `build.zig` with: |
| 28 | +You can then use `libressl` in your `build.zig` as follows: |
16 | 29 |
|
17 | 30 | ```zig
|
18 | 31 | const libressl_dependency = b.dependency("libressl", .{
|
19 | 32 | .target = target,
|
20 | 33 | .optimize = optimize,
|
| 34 | + .@"enable-asm" = true, // enable assembly routines on supported platforms |
21 | 35 | });
|
22 |
| -your_exe.linkLibrary(libressl_dependency.artifact("tls")); |
| 36 | +your_exe.linkLibrary(libressl_dependency.artifact("tls")); // or "ssl", or "crypto" |
23 | 37 | ```
|
| 38 | + |
| 39 | +## Version Support Matrix |
| 40 | + |
| 41 | +| Refname | LibreSSL Version | Zig `0.12.x` | Zig `0.13.x` | Zig `0.14.0-dev` | |
| 42 | +|----------|------------------|--------------|--------------|------------------| |
| 43 | +| `3.9.2` | `3.9.2` | ✅ | ✅ | ✅ | |
0 commit comments