Skip to content

Commit

Permalink
readme: add additional information
Browse files Browse the repository at this point in the history
  • Loading branch information
torque committed Sep 15, 2024
1 parent ea53b83 commit fbd8c18
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"build.zig.zon",
"LICENSE",
"LICENSE-LIBRESSL",
"README.md",
"readme.md",
},
}
30 changes: 25 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,42 @@

This is [LibreSSL Portable](https://github.com/libressl/portable), packaged for [Zig](https://ziglang.org/).

## Installation
## Status

This project currently builds the three main LibreSSL libraries as static libraries:

- `libcrypto`: core cryptographic routines
- `libssl`: OpenSSL 1.1 compatibility layer
- `libtls`: LibreSSL's new cryptography API

Operating systems and hardware architectures are supported on a best-effort basis. Building for Linux, macOS, and Windows (mingw64) is directly tested by CI.

The command line programs `nc`, `ocspcheck`, and `openssl` are **not** currently built by this build system.

## Usage

First, update your `build.zig.zon`:

```
```sh
# Initialize a `zig build` project if you haven't already
zig init
zig fetch --save <PLACEHOLDER>
# replace <refname> with the version you want to use, e.g. 3.9.2
zig fetch --save git+https://github.com/allyourcodebase/libressl#<refname>
```

You can then import `libressl` in your `build.zig` with:
You can then use `libressl` in your `build.zig` as follows:

```zig
const libressl_dependency = b.dependency("libressl", .{
.target = target,
.optimize = optimize,
.@"enable-asm" = true, // enable assembly routines on supported platforms
});
your_exe.linkLibrary(libressl_dependency.artifact("tls"));
your_exe.linkLibrary(libressl_dependency.artifact("tls")); // or "ssl", or "crypto"
```

## Version Support Matrix

| Refname | LibreSSL Version | Zig `0.12.x` | Zig `0.13.x` | Zig `0.14.0-dev` |
|----------|------------------|--------------|--------------|------------------|
| `3.9.2` | `3.9.2` ||||

0 comments on commit fbd8c18

Please sign in to comment.