Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tensorush/zig-quickphf

Zig port of quickphf library for static hash map generation.
https://github.com/tensorush/zig-quickphf

compile-time-map hash-map hash-maps minimal-perfect-hash perfect-hash phf static-map static-map-generator static-maps zig zig-lang zig-language zig-lib zig-library zig-package zig-port ziglang

Last synced: about 1 month ago
JSON representation

Zig port of quickphf library for static hash map generation.

Awesome Lists containing this project

README

        

# zig-quickphf

[![CI][ci-shd]][ci-url]
[![CD][cd-shd]][cd-url]
[![DC][dc-shd]][dc-url]
[![LC][lc-shd]][lc-url]

## Zig port of [quickphf library](https://github.com/dtrifuno/quickphf) for static hash map generation.

### :rocket: Usage

- Add `quickphf` dependency to `build.zig.zon`.

```sh
zig fetch --save https://github.com/tensorush/zig-quickphf/archive/.tar.gz
```

- Use `quickphf` dependency in `build.zig`.

```zig
const quickphf_dep = b.dependency("quickphf", .{
.target = target,
.optimize = optimize,
});
const quickphf_mod = quickphf_dep.module("quickphf");
.root_module.addImport("quickphf", quickphf_mod);
```

[ci-shd]: https://img.shields.io/github/actions/workflow/status/tensorush/zig-quickphf/ci.yaml?branch=main&style=for-the-badge&logo=github&label=CI&labelColor=black
[ci-url]: https://github.com/tensorush/zig-quickphf/blob/main/.github/workflows/ci.yaml
[cd-shd]: https://img.shields.io/github/actions/workflow/status/tensorush/zig-quickphf/cd.yaml?branch=main&style=for-the-badge&logo=github&label=CD&labelColor=black
[cd-url]: https://github.com/tensorush/zig-quickphf/blob/main/.github/workflows/cd.yaml
[dc-shd]: https://img.shields.io/badge/click-F6A516?style=for-the-badge&logo=zig&logoColor=F6A516&label=docs&labelColor=black
[dc-url]: https://tensorush.github.io/zig-quickphf
[lc-shd]: https://img.shields.io/github/license/tensorush/zig-quickphf.svg?style=for-the-badge&labelColor=black
[lc-url]: https://github.com/tensorush/zig-quickphf/blob/main/LICENSE