Compile time static maps for Rust

Overview

Rust-PHF

CI Latest Version

Documentation

Rust-PHF is a library to generate efficient lookup tables at compile time using perfect hash functions.

It currently uses the CHD algorithm and can generate a 100,000 entry map in roughly .4 seconds. By default statistics are not produced, but if you set the environment variable PHF_STATS it will issue a compiler note about how long it took.

MSRV (minimum supported rust version) is Rust 1.46.

Usage

PHF data structures can be constructed via either the procedural macros in the phf_macros crate or code generation supported by the phf_codegen crate.

To compile the phf crate with a dependency on libcore instead of libstd, enabling use in environments where libstd will not work, set default-features = false for the dependency:

[dependencies]
# to use `phf` in `no_std` environments
phf = { version = "0.10", default-features = false }

phf_macros

use phf::phf_map;

#[derive(Clone)]
pub enum Keyword {
    Loop,
    Continue,
    Break,
    Fn,
    Extern,
}

static KEYWORDS: phf::Map<&'static str, Keyword> = phf_map! {
    "loop" => Keyword::Loop,
    "continue" => Keyword::Continue,
    "break" => Keyword::Break,
    "fn" => Keyword::Fn,
    "extern" => Keyword::Extern,
};

pub fn parse_keyword(keyword: &str) -> Option<Keyword> {
    KEYWORDS.get(keyword).cloned()
}
[dependencies]
phf = { version = "0.10", features = ["macros"] }

Note

Currently, the macro syntax has some limitations and may not work as you want. See #183 or #196 for example.

phf_codegen

build.rs:

use std::env;
use std::fs::File;
use std::io::{BufWriter, Write};
use std::path::Path;

fn main() {
    let path = Path::new(&env::var("OUT_DIR").unwrap()).join("codegen.rs");
    let mut file = BufWriter::new(File::create(&path).unwrap());

    write!(&mut file, "static KEYWORDS: phf::Map<&'static str, Keyword> = ").unwrap();
    phf_codegen::Map::new()
        .entry("loop", "Keyword::Loop")
        .entry("continue", "Keyword::Continue")
        .entry("break", "Keyword::Break")
        .entry("fn", "Keyword::Fn")
        .entry("extern", "Keyword::Extern")
        .build(&mut file)
        .unwrap();
    write!(&mut file, ";\n").unwrap();
}

lib.rs:

#[derive(Clone)]
enum Keyword {
    Loop,
    Continue,
    Break,
    Fn,
    Extern,
}

include!(concat!(env!("OUT_DIR"), "/codegen.rs"));

pub fn parse_keyword(keyword: &str) -> Option<Keyword> {
    KEYWORDS.get(keyword).cloned()
}
Comments
  • Complexity of codegen algorithm

    Complexity of codegen algorithm

    I've got a list of 14_000_000 passwords that I want to create a hash from. I'm finding that up to say 500_000 it completes more or less instantly, but at 1_000_000 it takes a long time (20mins+). I would guess anecdotally that the build step is O(n^2) or thereabouts. Has anyone else done perf work on the generation algorithm?

    Some timings:

    • 100_000 - 1 sec
    • 500_000 - 40 sec
    • 1_000_000 - abort after 20 mins

    Rough complexity

    Using the first 2 results Gives time = k * size ^ n where n = 2.3, k = 3e-12, so for my 14_000_000 passwords I'm looking at about 24 hours :'( (modulo horrendous assumptions)

    opened by derekdreery 27
  • Upgrade UniCase

    Upgrade UniCase

    closes #143

    • [x] Introduce a new trait FmtConst for printing const exprs of types which delegates to fmt::Debug where applicable instead of always relying on it
    • [x] Upgrade unicase to ^2.4*
      • [x] Merge seanmonstar/unicase#30
    opened by abonander 13
  • Add support for uncased

    Add support for uncased

    I suspect the unsafe in this PR may make this unmergeable, but figured I'd throw up anyway, because the current support for UniCase is sadly pretty useless, as far as I can tell. Details below, but basically AFAICT you can only perform lookups in a UniCase map if you have a static string literal.


    uncased is an ASCII-only case insensitive comparison library like UniCase, but it has better support for being used in a map.

    Specifically, UniCase does not support the Borrow trait (see seanmonstar/unicase#22), so the type

    phf::Map<UniCase<&'static str>, _>
    

    only supports lookups with static string literals, which has limited usefulness.

    By contrast, the the equivalent uncased construction

    phf::Map<&'static Uncased, _>
    

    does support lookups with non-static strings.

    opened by benesch 11
  • phf_map! (sort of) on stable with macro_rules + proc_macro_derive

    phf_map! (sort of) on stable with macro_rules + proc_macro_derive

    You may be interested in this: https://github.com/servo/rust-cssparser/blob/48905424c5214b22a545eb7135cf671fbd63c312/src/lib.rs#L158-L211

    I’ve managed to make macro_rules! macro similar to phf_map!, that uses a derive procedural macro internally instead of a compiler plugin,and therefore runs on Rust 1.15 stable.

    Differences are:

    • The macro expands to an item, not an expression. (In the phf_map plugin, it expands to a const expression used to initialize a static.) Extra work is needed to support pub v.s. not, doc-comments, etc.
    • Values are given as strings that contain Rust syntax for const expressions, rather than literally as const expressions.

    Both are limitations due to busing derive rather than having a proper functional procedural macro (which are not stable yet).

    (This particular macro also does case-insensitive matching, but that part can easily be removed.)

    opened by SimonSapin 9
  • Add UniCase support to phf_macros and bump unicase version

    Add UniCase support to phf_macros and bump unicase version

    This is actually my first time doing anything compiler/plugin related so this may be pretty bad... Any pointers to improvements are highly welcome.

    I'm not sure if there's a better solution regarding the naming of the feature (related: https://github.com/rust-lang/cargo/issues/1286 by you :smile:)

    opened by Bobo1239 9
  • Borrow trait is overly restrictive for lookups

    Borrow trait is overly restrictive for lookups

    This kind of necros #8 but the context is different; essentially, it's kind of difficult to use UniCase<&'static str> as a key because you can only do lookups with UniCase<&'static str>:

    fn get_key(map: &'static phf::Map<UniCase<&'static str>, ()>) {
        let key = String::new();
        map.get(&UniCase::new(&*key));
        //       ---------------^^^
        //       |              |
        //       |              borrowed value does not live long enough
        //       argument requires that `key` is borrowed for `'static`
    }
    

    As far as I can tell this is entirely due to the K: Borrow<T> bound on Map et al because the compiler thinks the following line means T needs to live as long as K:

    https://github.com/sfackler/rust-phf/blob/50c6c75d406b529601f0377afba93e562bbff2aa/phf/src/map.rs#L87

    If you change the bounds to T: PartialEq<K> + PhfHash the above compiles but that changes the semantics slightly since it's going through different traits but I believe it's actually less restrictive because it's impossible to generically implement Borrow<Foo<U>> for Foo<T> without unsafe while PartialEq<Foo<U>> for Foo<T> is perfectly fine. (This also means looking up with UniCase would work regardless of the string type being used.)

    cc @sfackler

    opened by abonander 8
  • Changed macros to work on stable (with proc-macro-hack)

    Changed macros to work on stable (with proc-macro-hack)

    proc-macro-hack-based (much simpler) reimplementation of https://github.com/sfackler/rust-phf/pull/148, to address https://github.com/sfackler/rust-phf/issues/106

    opened by danielhenrymantilla 8
  • Remove PhfHash, use std::hash::Hash instead.

    Remove PhfHash, use std::hash::Hash instead.

    I started introducing a PhfHasher struct to make PhfHash more flexible for https://github.com/sfackler/rust-phf/issues/21#issuecomment-124632568 but quickly realized that this was redundant with std::hash::Hasher, and that PhfHash itself does little more than std::hash::Hash.

    As a consequence of this change:

    • str is hashed as bytes, 0xff_u8 rather than just bytes, and [u8] is hashes as length as usize, bytes rather than just bytes. I don’t know if this affects anything. Tests still pass.
    • A given type can not have a PhfHash impl and a Hash impl that behave differently anymore. I don’t know why they would want to do that.
    • This is a breaking change, though perhaps not for most users. Users who use or implement PhfHash need to use Hash instead.
    opened by SimonSapin 8
  • Static Hash Values

    Static Hash Values

    I have a need to generate hashes of string and $ident values at compile time. Would it be possible to register an additional macro simply called sip_hash to your system which sip::hash and returns the u64?

    Thanks

    opened by rrichardson 8
  • Invalid metadata for phf_macros when trying to test with coverage.

    Invalid metadata for phf_macros when trying to test with coverage.

    Operating System: Windows 11 Professional 64 Bit Toolchain: stable-x86_64-pc-windows-msvc Rust Version: rustc 1.62.0 (a8314ef7d 2022-06-27) phf Version: 0.11.1 with feature "macros"

    Normal compilation and testing works. When running the tests with coverage though, I get the following errors:

    C:/Users/drako/.cargo/bin/cargo.exe +stable test --color=always --message-format=json-diagnostic-rendered-ansi --no-run --lib lexer::tests --manifest-path C:\Users\drako\Desktop\Projects\asm-rs\assembly\Cargo.toml
       Compiling proc-macro2 v1.0.43
       Compiling quote v1.0.21
       Compiling unicode-ident v1.0.3
       Compiling siphasher v0.3.10
       Compiling rand_core v0.6.3
       Compiling syn v1.0.99
       Compiling rand v0.8.5
       Compiling phf_shared v0.11.1
       Compiling phf_generator v0.11.1
       Compiling phf_macros v0.11.1
       Compiling phf v0.11.1
    error[E0786]: found invalid metadata files for crate `phf_macros`
       --> C:\Users\drako\.cargo\registry\src\github.com-1ecc6299db9ec823\phf-0.11.1\src/lib.rs:105:9
        |
    105 | pub use phf_macros::phf_map;
        |         ^^^^^^^^^^
        |
        = note: failed to decompress metadata: \\?\C:\Users\drako\Desktop\Projects\asm-rs\target\debug\deps\phf_macros-4175faaf2b68124a.dll
    
    error[E0786]: found invalid metadata files for crate `phf_macros`
       --> C:\Users\drako\.cargo\registry\src\github.com-1ecc6299db9ec823\phf-0.11.1\src/lib.rs:111:9
        |
    111 | pub use phf_macros::phf_ordered_map;
        |         ^^^^^^^^^^
        |
        = note: failed to decompress metadata: \\?\C:\Users\drako\Desktop\Projects\asm-rs\target\debug\deps\phf_macros-4175faaf2b68124a.dll
    
    error[E0786]: found invalid metadata files for crate `phf_macros`
       --> C:\Users\drako\.cargo\registry\src\github.com-1ecc6299db9ec823\phf-0.11.1\src/lib.rs:132:9
        |
    132 | pub use phf_macros::phf_set;
        |         ^^^^^^^^^^
        |
        = note: failed to decompress metadata: \\?\C:\Users\drako\Desktop\Projects\asm-rs\target\debug\deps\phf_macros-4175faaf2b68124a.dll
    
    error[E0786]: found invalid metadata files for crate `phf_macros`
       --> C:\Users\drako\.cargo\registry\src\github.com-1ecc6299db9ec823\phf-0.11.1\src/lib.rs:138:9
        |
    138 | pub use phf_macros::phf_ordered_set;
        |         ^^^^^^^^^^
        |
        = note: failed to decompress metadata: \\?\C:\Users\drako\Desktop\Projects\asm-rs\target\debug\deps\phf_macros-4175faaf2b68124a.dll
    
    error: aborting due to 4 previous errors
    
    For more information about this error, try `rustc --explain E0786`.
    error: could not compile `phf` due to 5 previous errors
    Process finished with exit code 101
    

    I also tried cargo clean as that was suggested for similar issues, but that didn't change anything.

    I'm not sure, if that is a Rust issue or a phf issue. I also tried to use rustc 1.65.0-nightly (d394408fb 2022-08-07), but that had the same results.

    opened by Drako 7
  • Panic when using get() on an empty map

    Panic when using get() on an empty map

    I'm not sure if this is actually supported but I did see #111 and #116 with slight variations of this.

    In one of my tests I create an empty map like so

    pub static TS_BY_UID: phf::Map<&'static str, TSRef> = phf::Map {
        key: 0,
        disps: ::phf::Slice::Static(&[]),
        entries: ::phf::Slice::Static(&[]),
    };
    

    From this bit of code

    self.ts = self.ts_by_uid  // self.ts_by_uid ends up being set as TS_BY_UID above
            .get::<str>(ts_uid.as_ref())
            .cloned()
            .ok_or_else(|| {
                Error::new(
                    ErrorKind::InvalidData,
                    format!("Unknown TransferSyntax: {:?}", ts_uid),
                )
            })?;
    

    Results in this panic

    thread 'core::tests::tests::test_dicom_object' panicked at 'attempt to calculate the remainder with a divisor of zero', /Users/cspeckrun/.cargo/registry/src/github.com-1ecc6299db9ec823/phf_shared-0.7.24/src/lib.rs:46:26
    stack backtrace:
       0: backtrace::backtrace::libunwind::trace
                 at /Users/vsts/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/libunwind.rs:88
       1: backtrace::backtrace::trace_unsynchronized
                 at /Users/vsts/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/mod.rs:66
       2: std::sys_common::backtrace::_print
                 at src/libstd/sys_common/backtrace.rs:47
       3: std::sys_common::backtrace::print
                 at src/libstd/sys_common/backtrace.rs:36
       4: std::panicking::default_hook::{{closure}}
                 at src/libstd/panicking.rs:200
       5: std::panicking::default_hook
                 at src/libstd/panicking.rs:211
       6: std::panicking::rust_panic_with_hook
                 at src/libstd/panicking.rs:477
       7: std::panicking::continue_panic_fmt
                 at src/libstd/panicking.rs:384
       8: rust_begin_unwind
                 at src/libstd/panicking.rs:311
       9: core::panicking::panic_fmt
                 at src/libcore/panicking.rs:85
      10: core::panicking::panic
                 at src/libcore/panicking.rs:49
      11: phf_shared::get_index
                 at /Users/cspeckrun/.cargo/registry/src/github.com-1ecc6299db9ec823/phf_shared-0.7.24/src/lib.rs:46
      12: phf::map::Map<K,V>::get_entry
                 at /Users/cspeckrun/.cargo/registry/src/github.com-1ecc6299db9ec823/phf-0.7.24/src/map.rs:84
      13: phf::map::Map<K,V>::get
                 at /Users/cspeckrun/.cargo/registry/src/github.com-1ecc6299db9ec823/phf-0.7.24/src/map.rs:64
      14: dcmpipe_lib::core::dcmparser::DicomStreamParser<StreamType>::parse_transfer_syntax
                 at dcmpipe_lib/src/core/dcmparser.rs:319
    
    opened by neandrake 7
  • Please update Cargo.toml so that macros work with the Rust Playground

    Please update Cargo.toml so that macros work with the Rust Playground

    The phf crate is one of the crates that can be used with the Rust Playground. However, the macros feature is disabled there, and so use phf::phf_map; and other macros do not work. Can you please add a suitable Playground configuration to Cargo.toml so that it can be used nicely with the Playground?

    An example they give is:

    # Cargo.toml
    [package]
    name = "test"
    
    [package.metadata.playground]
    default-features = true
    features = ["std", "extra-traits"]
    all-features = false
    
    opened by ChaiTRex 0
  • Constify the code generator

    Constify the code generator

    This is an initial draft to make the phf_generator crate usable as const fn, as directly and indirectly requested in #188, #196, #198, and #202. Being able to construct static maps from arbitrary const expressions as keys is the main goal of this PR.

    The current approach depends on quite a bunch of nightly feature gates so I'm not expecting to get this merged anytime soon. For the time being, I'd rather collect feedback and thoughts on this and discuss the approach that is taken to make this a thing.

    phf_shared

    Using the const_trait_impl feature, I largely made the PhfBorrow and PhfHash traits const-compatible and adapted the proper implementations for types. All this is behind a const-api Cargo feature.

    In the process, I also replaced the siphasher dependency by a corresponding in-crate implementation that supports compile-time hashing. It runs (and passes) the same test suite as the siphasher trait and I generally think the maintenance burden for this addition will be very low due to being a non-cryptographic hash that will hardly ever require any changes to the implementation.

    Unresolved

    • I replaced std::ptr::copy_nonoverlapping operations with fixed-length arrays in a similar fashion to [buf[0], buf[1], buf[2], buf[3]]. I haven't decompiled the code yet but should the code emitted for this end up being worse than for copy_nonoverlapping I will use the const-api feature to provide separate implementations intended for performant runtime usage and purely compile-time usage, respectively.

    phf_generator

    const compatibility turned out to be quite difficult here. At its core we have the generate_hash function which should enable us to generate a HashState over a given slice of key entries. This turned out to be a non-trivial journey that mandates a breaking change to the API which can be sensibly gated behind yet another const-api Cargo feature for this crate.

    To make const fn generate_hash a thing, we need to have fixed-length slices - this will barely be a problem with phf_macros but it would be a big problem for phf_codegen where the number of map entries cannot be measured statically - the const-api feature comes yet again handy here as we can exclude the phf_codegen crate from constified phf_generator APIs and it will continue to work as it did until now.

    For a const PRNG, I decided to go with wyrand which is also used in quite a few programming languages and has some good attributes going for it, e.g. a very minimal implementation that will also turn out faster at runtime than rand's SmallRng. I consider the maintenance burden very low here too because the core implementation is less than 20 lines of code.

    Unresolved

    • ~~Some further additions to the RNG implementation will be required to make letter generation for gen_hash_test viable which currently does not compile.~~

    • ~~The last unimplemented feature currently is sorting buckets by descending order. I will try to get this resolved as fast as possible, but help with the implementation would be appreciated here.~~

    phf

    Lastly, for the phf crate itself, we will want to expose phf_map and phf_set macros that expand to const expressions but don't break existing code at the same time.

    I solved this by introducing declarative macros with macro_rules! that expand into a constant expression using APIs provided by the phf_macros crate. This will also fix #183.

    However, this comes at the cost that phf_generator must be a hard dependency of phf when building with the macro feature.

    phf_macros

    I had to repurpose this crate into providing utilities for macro implementations in the documentation as the now declarative macros would need types from phf which leads to a dependency cycle if all of the previous user API should remain intact.

    I figured deleting or renaming it is not within the scope of my decisions but I also don't feel this is the optimal state, so I'm leaving the "future" of this crate open for further discussion here.

    phf_codegen

    phf_codegen is the reason phf_shared and phf_generator have their const API behind the const-api feature - a way to generate PHF types dynamically is still needed and should be provided.

    This however imposed an issue for me during development - in-tree cargo check will make the phf_codegen crate error over the const API of phf_generator which actually shouldn't be exposed to it. I haven't found a good solution yet so help with that is heavily appreciated.


    Lastly, all of this is in a very experimental state and will evolve over time as Rust upstream grants us more flexibility. I'd love to hear your thoughts on this and please let me know if something is not up to standards.

    opened by vbe0201 1
  • Generic Hashers

    Generic Hashers

    This is a draft proposal for a generic hasher interface (#88) for this library.

    How this Works

    1. Adds PhfHasher trait
    2. Adds generic PhfHasher parameter to maps/sets
    3. Adds FmtConstPath trait to hook PhfHasher into phf_codegen
    4. Uses quote::ToTokens trait to hook PhfHasher into phf_macros

    Note on Point 1

    Right now, the PhfHasher trait is only responsible for the initial PHF distribution (think SipHasher keys) and the actual hashing (computing Hashes object). The PHF generation algorithm is still the same as before, but if it makes more sense to use a separate generation algorithm for each hashing algorithm, then we should replace PhfHasher with something like the following which is a little simpler than what the current draft proposes:

    pub trait PhfHasher {
    	/// PHF Generation Error
    	type Error;
    	
    	/// Try to generate a perfect hash function for the list of `entries`.
    	fn try_generate<T>(entries: &[T]) -> Result<HashState, Self::Error>
    	where
    		T: PhfHash;
    	
    	/// Hashes the data at `x` returning the computed displacement parameters.
    	fn hash<T>(&self, x: &T) -> Hashes
    	where
    		T: PhfHash;
    }
    

    where HashState and Hashes are the computed map/displacements and index respectively.

    Also, in this PR, phf_generator is removed since it only contains the generation algorithm which should live closer to PhfHasher and eventually could be part of it.

    Note on Point 4

    Right now, the macro interface itself has not changed so it's not possible with this current draft to use custom hashers with macros. To enable this, we would need to have to extend the macro interface or have some sort of type inference to detect the hasher. It's still not clear to me how we should do this.

    opened by bhgomes 2
  • Question: Removing unused lookup entries during compilation

    Question: Removing unused lookup entries during compilation

    Is it possible to remove unused lookup tables if the lookups are known at compile time? For example, if I have a map full of values but a user of a library only needs one or two values out of it.

    I am not sure if Rust is capable of doing this. I think storing the return type inside a const variable would do the trick, as it would move the data into the user's application, but that would mean that get had to be const as well.

    blocked-on-upstream 
    opened by mainrs 1
  • Support for tuples

    Support for tuples

    I would like to be able to make a set of tuples, like so:

    use phf::phf_set;
    static MY_SET: phf::Set<(&str, u32, &[&str])> = phf_set! {
        ("some value", 1, &["even", "more", "values"]),
    };
    

    This is currently not possible it seems. I am guessing it's also not possible to use tuples as keys in phf::Map

    You can work around this by using phf_map with the first value as key and the rest as the resulting value but that isn't very ergonomic and also only works if the first value is unique.

    C-enhancement A-macros 
    opened by SorteKanin 1
Releases(phf_shared-v0.11.1)
  • phf_shared-v0.11.1(Aug 8, 2022)

    Chore

    • Update siphasher to 0.3

    Other

    • make uncased feature compatible with no_std

    Commit Statistics

    • 130 commits contributed to the release over the course of 2946 calendar days.
    • 2 commits where understood as conventional.
    • 0 issues like '(#ID)' where seen in commit messages

    Commit Details

    view details
    • Uncategorized
      • Replace handmade changelog with generated one by cargo-smart-release (cb84cf6)
      • Add README.md for some crates (e0b34fa)
      • Add category to crates (32a72c3)
      • Update repository links on Cargo.toml (1af3b0f)
      • Release 0.11.0 (d2efdc0)
      • Make crates edition 2021 (b9d25da)
      • Make "unicase + macros" features work (11bb242)
      • Fix build issues. (ee82cc9)
      • Implement PhfHash for arrays of any size. (cf0f6ec)
      • Refine doc comments (d8cfc43)
      • make uncased feature compatible with no_std (3068a18)
      • Fix CI failure (d9b5ff2)
      • Prepare for release 0.10.0 (588ac25)
      • Minor cleanups (8868d08)
      • Prepare 0.9.0 release (2ca46c4)
      • Run rustfmt (dd86c6c)
      • Fix some clippy warnings (9adc370)
      • Cleanup docs (ddecc3a)
      • Add support for uncased (2a6087f)
      • replace uses of std::borrow::Borrow with new PhfBorrow trait (b2f3a9c)
      • Allow using the owned String type for phf dynamic code generation. (58dfc05)
      • Release v0.8.0 (4060288)
      • switch optional core feature to default std feature (645e23d)
      • use sip128 instead of hashing twice (a8e67c3)
      • use two separate hashes and full 32-bit displacements (9b70bd9)
      • Merge pull request #159 from upsuper/rand-07 (f6407a0)
      • fix formatting for arrays after #156 (40c1476)
      • fix FmtConst for [u8] (12b4fde)
      • Merge branch 'master' into patch-1 (cd0d7ce)
      • implement support for 128-bit ints and fix high magnitude vals (5be5919)
      • convert to 2018 edition (9ff66ab)
      • upgrade unicase (4a7f766)
      • don't rely on fmt::Debug for codegen (97405f5)
      • Update siphasher to 0.3 (71977b2)
      • Release v0.7.24 (1287414)
      • Downgrade siphasher (54dd1e2)
      • Upgrade rand and siphasher (80d9894)
      • Release v0.7.23 (a050b6f)
      • Release 0.7.22 (ab88405)
      • Release v0.7.21 (6c7e2d9)
      • Link to docs.rs (61142c5)
      • Switch to non-deprecated SipHasher (fb3c115)
      • Release v0.7.20 (f631f50)
      • Release v0.7.19 (0a98dd1)
      • Release v0.7.18 (3f71765)
      • Release v0.7.17 (21ecf72)
      • Add UniCase support to phf_macros and bump unicase version (2af3abb)
      • Release v0.7.16 (8bf29c1)
      • Release v0.7.15 (20f896e)
      • Release v0.7.14 (fee66fc)
      • Add an impl of PhfHash for UniCase (d761144)
      • Drop all rust features (888f623)
      • Conditionally compile String and Vec impls (8105ae8)
      • Implement PhfHash for String and Vec (ae820e6)
      • Release v0.7.13 (4769a6d)
      • Release v0.7.12 (9b75ee5)
      • Release v0.7.11 (a004227)
      • Release v0.7.10 (c43154b)
      • Release v0.7.9 (b7d29df)
      • Release v0.7.8 (aad0b9b)
      • Release v0.7.7 (c9e7a93)
      • Run through rustfmt (58e2223)
      • Release v0.7.6 (5bcd5c9)
      • Simplify no_std logic a bit (70f2ed9)
      • Reinstantiate no_std cargo feature flag. (7c3f757)
      • Release v0.7.5 (fda44f5)
      • Release v0.7.4 (c7c0d3c)
      • Add hash() and get_index() to phf_shared. (d3b2ea0)
      • Update PhfHash to mirror std::hash::Hash (96ef156)
      • Make PhfHash endianness-independent (8f406b9)
      • Release v0.7.3 (77ea239)
      • Release v0.7.2 (642b69d)
      • Release v0.7.1 (9cb9de9)
      • Release v0.7.0 (555a690)
      • Release v0.6.19 (5810d30)
      • Release v0.6.18 (36efc72)
      • Fix for upstream changes (eabadcf)
      • Release v0.6.17 (271ccc2)
      • Release v0.6.15 (ede14df)
      • Release v0.6.14 (cf64ebb)
      • Update to rustc 1.0.0-dev (e46610966 2015-03-17) (built 2015-03-17) (54f32dd)
      • Release v0.6.13 (4fdb533)
      • Release v0.6.12 (59ca586)
      • Release v0.6.11 (e1e6d3b)
      • Release v0.6.10 (fc45373)
      • Add doc URLs (4605db3)
      • Remove core feature (d4c189a)
      • Release v0.6.9 (822f4e3)
      • More fixes (0c04b9c)
      • Fix for upstream changes (f014882)
      • Release v0.6.8 (cd637ca)
      • Release v0.6.7 (bfc36c9)
      • Fix for upstream changes (5ff7040)
      • Release v0.6.6 (b09a174)
      • Release v0.6.5 (271e784)
      • Fix for upstream changes (3db7cef)
      • Move docs to this repo and auto build them (f8ef160)
      • Release v0.6.4 (6866c1b)
      • Release v0.6.3 (b0c5e3c)
      • Release v0.6.2 (d9ddf45)
      • Link to libstd by default (24555b1)
      • Release v0.6.1 (ca0e9f6)
      • Fix for stability changes (f7fb510)
      • Release v0.6.0 (09d6870)
      • Release v0.5.0 (8683be2)
      • Fix deprecation warning (d0fa86a)
      • Release v0.4.9 (28cbe70)
      • Fix for upstream changes (0b22188)
      • Release v0.4.8 (bb858f1)
      • Release v0.4.7 (d83f551)
      • Fix for upstream changes (c3ae5ac)
      • Release v0.4.6 (360bf81)
      • Release v0.4.5 (ab4786c)
      • Release v0.4.4 (f678635)
      • Fix for upstream changes (2b4863f)
      • Release v0.4.3 (4f5902c)
      • Release v0.4.2 (69d92b8)
      • Update to rust master (4a0d48d)
      • Release v0.4.1 (0fba837)
      • Make sure we're actually no_std (126c6e2)
      • Re-fix str and [u8] hashing when cross compiling (a0eb200)
      • Release v0.4.0 (49dbb36)
      • Fix for upstream changes and drop xxhash (fc2539f)
      • Release v0.3.0 (0a80b06)
      • add support for [u8, ..N] keys (e26947c)
      • Bump to 0.2 (4546f51)
      • Bump to 0.1.0 (43d9a50)
      • Merge pull request #31 from jamesrhurst/exactsize (d20c311)
      • Make publishable on crates.io (4ad2bb2)
      • Pull shared code into a module (19c4f8d)
    Source code(tar.gz)
    Source code(zip)
  • phf_macros-v0.11.1(Aug 8, 2022)

    Chore

    • upgrade syn/proc-macro

    Bug Fixes

    • remove now-unnecessary proc-macro-hack crate usage Resolves https://github.com/rust-phf/rust-phf/issues/255.

      This resolves an issue with Windows Defender identifying proc-macro-hack as threats. It also sheds a depedency that is no longer necessary, now that the MSRV of this crate is 1.46 and proc-macro-hack is only useful for providing support for Rust versions 1.31 through 1.45. Per upstream:

      Note: As of Rust 1.45 this crate is superseded by native support for #[proc_macro] in expression position. Only consider using this crate if you care about supporting compilers between 1.31 and 1.45.

    Other

    • Update code for changes in Rust LitBinary is now LitByteStr

    Commit Statistics

    • 150 commits contributed to the release over the course of 2751 calendar days.
    • 3 commits where understood as conventional.
    • 0 issues like '(#ID)' where seen in commit messages

    Commit Details

    view details
    • Uncategorized
      • Replace handmade changelog with generated one by cargo-smart-release (cb84cf6)
      • Add category to crates (32a72c3)
      • Update repository links on Cargo.toml (1af3b0f)
      • Release 0.11.0 (d2efdc0)
      • Merge pull request #257 from JohnTitor/edition-2021 (36ec885)
      • Make crates edition 2021 (b9d25da)
      • remove now-unnecessary proc-macro-hack crate usage (caf1ce7)
      • Make "unicase + macros" features work (11bb242)
      • Extract phf_macros tests as a separated crate (8cf694d)
      • Remove some stuff which is now unnecessary (6941e82)
      • Refine doc comments (d8cfc43)
      • Fix CI failure (d9b5ff2)
      • Fix phf dev dep version (3cc6f05)
      • Prepare for release 0.10.0 (588ac25)
      • Fix publish failure (fbb18f9)
      • Prepare for v0.9.1 (9b71978)
      • remove Slice type and fix some docs (99d3533)
      • Minor cleanups (8868d08)
      • Bless tests (dab668c)
      • Fix the release failure (647f331)
      • Downgrade phf dev-dep version for now (7dd8a1b)
      • Prepare 0.9.0 release (2ca46c4)
      • Cleanup cargo metadata (a9e4b0a)
      • Fix test (ffa7e41)
      • Run rustfmt check on CI (1adfb30)
      • Run rustfmt (dd86c6c)
      • Rename unicase_support to unicase (b47174b)
      • Run UI tests only on stable (7522b16)
      • Add back ordered_map, ordered_set (0ab0108)
      • Improve implementation for unicase support (6957e47)
      • Restore unicase_support for phf_macros (77e6cce)
      • Use [patch.crates-io] section instead of path key (f47515b)
      • Fix phf_macros on no_std (d7af3dc)
      • Merge pull request #194 from pickfire/patch-1 (caec346)
      • Update stderrs (0f1407e)
      • Update expected test case output for latest nightly (e387f69)
      • Release v0.8.0 (4060288)
      • Avoid missing main error in tests (1992222)
      • Merge pull request #172 from kornelski/patch-1 (eee56c0)
      • upgrade syn/proc-macro (d40d663)
      • remove ordered_map, ordered_set, phf_builder (8ae2bb8)
      • port compile-fail tests to trybuild (4a4256c)
      • create Display adapters for phf_codegen builders (93aa7ae)
      • Merge pull request #164 from abonander/perf-improvements (70129c6)
      • ignore compiletest (f1362b2)
      • proc_macro_hygiene is not needed with proc-macro-hack (ab473a4)
      • Merge pull request #157 from abonander/array-formatting (8fc18be)
      • Made macros work in stable (4fc0d1a)
      • implement support for 128-bit ints and fix high magnitude vals (5be5919)
      • Fixed typo in benchmark (f46b2e1)
      • Fix tests (ae4ef3e)
      • Release v0.7.24 (1287414)
      • Reexport macros through phf crate (588fd1a)
      • Convert phf_macros to new-style proc-macros (5ae4131)
      • Release v0.7.23 (a050b6f)
      • Update to nightly-2018-08-23 (e03f536)
      • Release 0.7.22 (ab88405)
      • Fix build (2071d25)
      • Update to latest nightly (fcf758f)
      • Upgrade rand (e7b5a35)
      • Release v0.7.21 (6c7e2d9)
      • Upgrade to rustc 1.16.0-nightly (c07a6ae77 2017-01-17) (dc756bf)
      • Don't ICE on bad syntax (e87e95f)
      • Link to docs.rs (61142c5)
      • Cleanup (9278c47)
      • Fix tests (5947cd1)
      • Remove time dependency (98f56e5)
      • Dependency cleanup (f106aa6)
      • Release v0.7.20 (f631f50)
      • Update to Rust 1.15.0-nightly (7b3eeea22 2016-11-21) (39cc485)
      • Release v0.7.19 (0a98dd1)
      • Update phf_macros to Rust 1.14.0-nightly (7c69b0d5a 2016-11-01) (b7d2d4d)
      • Release v0.7.18 (3f71765)
      • Fix for latest nightly (35e991b)
      • Release v0.7.17 (21ecf72)
      • Fix for latest nightly (cb1ec95)
      • Remove dead code (df0d8e8)
      • Add compile-fail test for equivalent UniCase keys (711515a)
      • Add UniCase support to phf_macros and bump unicase version (2af3abb)
      • Release v0.7.16 (8bf29c1)
      • Update the TokenTree import (f404629)
      • Release v0.7.15 (20f896e)
      • Release v0.7.14 (fee66fc)
      • Introduce a Slice abstraction for buffers (0cc3844)
      • Release v0.7.13 (4769a6d)
      • Update to Rust 2016-02-22 (c995514)
      • Release v0.7.12 (9b75ee5)
      • Support byte string keys in phf_macros (fixes #76) (652beae)
      • Release v0.7.11 (a004227)
      • Update for changed return value of parser.eat (82da9f0)
      • Switch timing info back to a hint (771e781)
      • Release v0.7.10 (c43154b)
      • Update for syntax changes (3be2db8)
      • Release v0.7.9 (b7d29df)
      • Registry now seems to live in rustc_plugin instead of rustc::plugin (ba8d701)
      • Release v0.7.8 (aad0b9b)
      • Rustup (a6c43fa)
      • Release v0.7.7 (c9e7a93)
      • rustup for phf_macros (4c51ffc)
      • Run through rustfmt (58e2223)
      • Release v0.7.6 (5bcd5c9)
      • Release v0.7.5 (fda44f5)
      • Update code for changes in Rust (8225c4b)
      • Macro assemble benchmark map and match to ensure sync (a2486ed)
      • Add benchmarks (9585cc3)
      • Release v0.7.4 (c7c0d3c)
      • Update PhfHash to mirror std::hash::Hash (96ef156)
      • Release v0.7.3 (77ea239)
      • Release v0.7.2 (642b69d)
      • Add an index test (f51f449)
      • Release v0.7.1 (9cb9de9)
      • Fix phf-macros (6c98e9f)
      • Release v0.7.0 (555a690)
      • Stabilize phf (e215273)
      • Release v0.6.19 (5810d30)
      • Release v0.6.18 (36efc72)
      • Fix for upstream changes (eabadcf)
      • Release v0.6.17 (271ccc2)
      • Release v0.6.15 (ede14df)
      • Remove broken test (f54adb7)
      • Release v0.6.14 (cf64ebb)
      • Release v0.6.13 (4fdb533)
      • Fix warnings and use debug builders (4d28684)
      • Release v0.6.12 (59ca586)
      • Fix phf_macros (6567152)
      • Release v0.6.11 (e1e6d3b)
      • Release v0.6.10 (fc45373)
      • Add doc URLs (4605db3)
      • Add documentation for phf_macros (8eca797)
      • Move generation logic to its own crate (cfeee87)
      • Move tests to phf_macros (40dbc32)
      • Release v0.6.9 (822f4e3)
      • More fixes (0c04b9c)
      • Release v0.6.8 (cd637ca)
      • Release v0.6.7 (bfc36c9)
      • Fix for upstream changes (5ff7040)
      • rustup to current master (f6922e2)
      • Release v0.6.6 (b09a174)
      • Release v0.6.5 (271e784)
      • Move docs to this repo and auto build them (f8ef160)
      • Release v0.6.4 (6866c1b)
      • Remove unused feature (2ee5f78)
      • InternedString.get() removal; brings us to rustc 1.0.0-dev (80627cd3c 2015-02-07 12:01:31 +0000) (3150bf0)
      • Release v0.6.3 (b0c5e3c)
      • Use out of tree rand (9e1623b)
      • Release v0.6.2 (d9ddf45)
      • Release v0.6.1 (ca0e9f6)
      • Fix for stability changes (f7fb510)
      • Release v0.6.0 (09d6870)
      • Rename phf_mac to phf_macros (c50d107)
    Source code(tar.gz)
    Source code(zip)
  • phf_generator-v0.11.1(Aug 8, 2022)

    Other

    • Unpin the criterion dependency

    Commit Statistics

    • 77 commits contributed to the release over the course of 2723 calendar days.
    • 1 commit where understood as conventional.
    • 0 issues like '(#ID)' where seen in commit messages

    Commit Details

    view details
    • Uncategorized
      • Unpin the criterion dependency (27a2ce4)
      • Replace handmade changelog with generated one by cargo-smart-release (cb84cf6)
      • Disable default features for rand dep in phf_generator (deefda1)
      • Add README.md for some crates (e0b34fa)
      • Add category to crates (32a72c3)
      • Update repository links on Cargo.toml (1af3b0f)
      • Release 0.11.0 (d2efdc0)
      • Make crates edition 2021 (b9d25da)
      • Make "unicase + macros" features work (11bb242)
      • Refine doc comments (d8cfc43)
      • Fix CI failure (d9b5ff2)
      • Prepare for release 0.10.0 (588ac25)
      • Prepare for v0.9.1 (9b71978)
      • Pin criterion version (b19afb6)
      • Fix included files (0442122)
      • Prepare 0.9.0 release (2ca46c4)
      • Cleanup cargo metadata (a9e4b0a)
      • Run rustfmt (dd86c6c)
      • Cleanup docs (ddecc3a)
      • Tweak benchmarks (5ea2854)
      • Use [patch.crates-io] section instead of path key (f47515b)
      • Fix phf_macros on no_std (d7af3dc)
      • Merge pull request #194 from pickfire/patch-1 (caec346)
      • Update to rand v0.8 (6d5bfb4)
      • Release v0.8.0 (4060288)
      • Update criterion (9de3d83)
      • use two separate hashes and full 32-bit displacements (9b70bd9)
      • add simple test for timing checks (ecb9fd5)
      • Upgrade rand to 0.7 (522f823)
      • convert to 2018 edition (9ff66ab)
      • Release v0.7.24 (1287414)
      • Upgrade rand and siphasher (80d9894)
      • Release v0.7.23 (a050b6f)
      • Upgrade rand (9098872)
      • Release 0.7.22 (ab88405)
      • Upgrade rand (e7b5a35)
      • Release v0.7.21 (6c7e2d9)
      • Link to docs.rs (61142c5)
      • Dependency cleanup (f106aa6)
      • Release v0.7.20 (f631f50)
      • Release v0.7.19 (0a98dd1)
      • Release v0.7.18 (3f71765)
      • Release v0.7.17 (21ecf72)
      • Release v0.7.16 (8bf29c1)
      • Release v0.7.15 (20f896e)
      • Release v0.7.14 (fee66fc)
      • Release v0.7.13 (4769a6d)
      • Release v0.7.12 (9b75ee5)
      • Release v0.7.11 (a004227)
      • Release v0.7.10 (c43154b)
      • Release v0.7.9 (b7d29df)
      • Release v0.7.8 (aad0b9b)
      • Release v0.7.7 (c9e7a93)
      • Run through rustfmt (58e2223)
      • Release v0.7.6 (5bcd5c9)
      • Release v0.7.5 (fda44f5)
      • Release v0.7.4 (c7c0d3c)
      • Add hash() and get_index() to phf_shared. (d3b2ea0)
      • Update PhfHash to mirror std::hash::Hash (96ef156)
      • Release v0.7.3 (77ea239)
      • Minor generator cleanup (14e81a9)
      • Release v0.7.2 (642b69d)
      • Release v0.7.1 (9cb9de9)
      • Release v0.7.0 (555a690)
      • Release v0.6.19 (5810d30)
      • Release v0.6.18 (36efc72)
      • Release v0.6.17 (271ccc2)
      • Bump rand version (8959cee)
      • Release v0.6.15 (ede14df)
      • Update to rand 0.2 (ab49d38)
      • Release v0.6.14 (cf64ebb)
      • Release v0.6.13 (4fdb533)
      • Release v0.6.12 (59ca586)
      • Release v0.6.11 (e1e6d3b)
      • Release v0.6.10 (fc45373)
      • Add doc roots (e22cdea)
      • Move generation logic to its own crate (cfeee87)
    Source code(tar.gz)
    Source code(zip)
  • phf_codegen-v0.11.1(Aug 8, 2022)

    Other

    • add example using byte strings

    Commit Statistics

    • 100 commits contributed to the release over the course of 2723 calendar days.
    • 1 commit where understood as conventional.
    • 0 issues like '(#ID)' where seen in commit messages

    Commit Details

    view details
    • Uncategorized
      • Replace handmade changelog with generated one by cargo-smart-release (cb84cf6)
      • Add category to crates (32a72c3)
      • Update repository links on Cargo.toml (1af3b0f)
      • Release 0.11.0 (d2efdc0)
      • Make crates edition 2021 (b9d25da)
      • Merge pull request #253 from JohnTitor/action-tweaks (a3e04bc)
      • Fix some Clippy warnings (71fd47c)
      • Make "unicase + macros" features work (11bb242)
      • Prepare 0.10.1 release (4cc8344)
      • Extract phf_macros tests as a separated crate (8cf694d)
      • Refine doc comments (d8cfc43)
      • Fix CI failure (d9b5ff2)
      • Prepare for release 0.10.0 (588ac25)
      • Prepare for v0.9.1 (9b71978)
      • remove Slice type and fix some docs (99d3533)
      • Minor cleanups (8868d08)
      • Prepare 0.9.0 release (2ca46c4)
      • Cleanup cargo metadata (a9e4b0a)
      • Run rustfmt (dd86c6c)
      • Fix some clippy warnings (9adc370)
      • Cleanup docs (ddecc3a)
      • Add support for uncased (2a6087f)
      • replace uses of std::borrow::Borrow with new PhfBorrow trait (b2f3a9c)
      • Add back ordered_map, ordered_set (0ab0108)
      • Use [patch.crates-io] section instead of path key (f47515b)
      • Release v0.8.0 (4060288)
      • Merge pull request #172 from kornelski/patch-1 (eee56c0)
      • remove ordered_map, ordered_set, phf_builder (8ae2bb8)
      • Merge pull request #166 from abonander/158-trybuild (50c6c75)
      • fix intra-module links (774c527)
      • remove links to phf types since that crate is not linked (e7830f9)
      • add example using byte strings (f04e8de)
      • create Display adapters for phf_codegen builders (93aa7ae)
      • use two separate hashes and full 32-bit displacements (9b70bd9)
      • Merge pull request #159 from upsuper/rand-07 (f6407a0)
      • add tests for array and byte-slice keys (cb7aa0c)
      • convert to 2018 edition (9ff66ab)
      • upgrade unicase (4a7f766)
      • don't rely on fmt::Debug for codegen (97405f5)
      • Fix & include tests for empty maps (83fd51c)
      • Release v0.7.24 (1287414)
      • Release v0.7.23 (a050b6f)
      • Release 0.7.22 (ab88405)
      • Release v0.7.21 (6c7e2d9)
      • Link to docs.rs (61142c5)
      • Dependency cleanup (f106aa6)
      • Release v0.7.20 (f631f50)
      • Release v0.7.19 (0a98dd1)
      • Release v0.7.18 (3f71765)
      • Release v0.7.17 (21ecf72)
      • Release v0.7.16 (8bf29c1)
      • Release v0.7.15 (20f896e)
      • Add overlooked phf path overrides (da5f9be)
      • Allow specifying a module path to the phf crate for codegen (4a7999e)
      • Release v0.7.14 (fee66fc)
      • Add an impl of PhfHash for UniCase (d761144)
      • Introduce a Slice abstraction for buffers (0cc3844)
      • Release v0.7.13 (4769a6d)
      • Release v0.7.12 (9b75ee5)
      • Release v0.7.11 (a004227)
      • Release v0.7.10 (c43154b)
      • Release v0.7.9 (b7d29df)
      • Release v0.7.8 (aad0b9b)
      • Release v0.7.7 (c9e7a93)
      • Run through rustfmt (58e2223)
      • Release v0.7.6 (5bcd5c9)
      • Release v0.7.5 (fda44f5)
      • Work around rust#27438 by adding a call to a non-generic function (ddfaebf)
      • Release v0.7.4 (c7c0d3c)
      • Don’t use/recommend env! in build scripts. (b9391ff)
      • Release v0.7.3 (77ea239)
      • Doc tweak (0d23afb)
      • Warn about rustc stack overflow (48759a8)
      • Fix docs (4b94d0f)
      • Fix example (0705574)
      • Remove unneeded feature flag (efac42a)
      • Release v0.7.2 (642b69d)
      • Release v0.7.1 (9cb9de9)
      • Fix codegen tests (4f1cf46)
      • Release v0.7.0 (555a690)
      • Release v0.6.19 (5810d30)
      • Release v0.6.18 (36efc72)
      • Fix for upstream changes (eabadcf)
      • Release v0.6.17 (271ccc2)
      • Release v0.6.15 (ede14df)
      • Remove pointless dev-dependencies (4620622)
      • Release v0.6.14 (cf64ebb)
      • Release v0.6.13 (4fdb533)
      • Fix warnings and use debug builders (4d28684)
      • Remove unused feature (efcdc74)
      • Release v0.6.12 (59ca586)
      • Fix whitespace in codegen (8078e83)
      • Release v0.6.11 (e1e6d3b)
      • Pretty print generated structs (96c5ef3)
      • Fix string keys in codegen (71db0b9)
      • Release v0.6.10 (fc45373)
      • Add doc roots (e22cdea)
      • Add docs to phf_codegen (8b71a9a)
      • Fix paths in codegen (75b37fd)
      • Add a codegen crate (311bf94)
    Source code(tar.gz)
    Source code(zip)
  • phf-v0.11.1(Aug 8, 2022)

    Chore

    • point to local crates for now

    Documentation

    • state allowed key expressions in phf_map

    Bug Fixes

    • remove now-unnecessary proc-macro-hack crate usage Resolves https://github.com/rust-phf/rust-phf/issues/255.

      This resolves an issue with Windows Defender identifying proc-macro-hack as threats. It also sheds a depedency that is no longer necessary, now that the MSRV of this crate is 1.46 and proc-macro-hack is only useful for providing support for Rust versions 1.31 through 1.45. Per upstream:

      Note: As of Rust 1.45 this crate is superseded by native support for #[proc_macro] in expression position. Only consider using this crate if you care about supporting compilers between 1.31 and 1.45.

    Commit Statistics

    • 234 commits contributed to the release over the course of 2957 calendar days.
    • 3 commits where understood as conventional.
    • 1 unique issue was worked on: #249

    Commit Details

    view details
    • #249
      • Add Map::new() function and Default implementation to create new, empty map (baac7d0)
    • Uncategorized
      • Replace handmade changelog with generated one by cargo-smart-release (cb84cf6)
      • Add category to crates (32a72c3)
      • Update repository links on Cargo.toml (1af3b0f)
      • Release 0.11.0 (d2efdc0)
      • Merge pull request #257 from JohnTitor/edition-2021 (36ec885)
      • Make crates edition 2021 (b9d25da)
      • remove now-unnecessary proc-macro-hack crate usage (caf1ce7)
      • point to local crates for now (92e7b43)
      • Merge pull request #253 from JohnTitor/action-tweaks (a3e04bc)
      • Fix some Clippy warnings (71fd47c)
      • Make "unicase + macros" features work (11bb242)
      • Prepare 0.10.1 release (4cc8344)
      • Allow serializing Map. (b6c682e)
      • state allowed key expressions in phf_map (6be1599)
      • Remove some stuff which is now unnecessary (6941e82)
      • Refine doc comments (d8cfc43)
      • Fix CI failure (d9b5ff2)
      • Prepare for release 0.10.0 (588ac25)
      • Prepare for v0.9.1 (9b71978)
      • add trait implementations to iterators mirroring std::collections (e47e4dc)
      • remove Slice type and fix some docs (99d3533)
      • add len/is_empty const-fns (f474922)
      • Minor cleanups (8868d08)
      • Precisify MSRV (63886f6)
      • Prepare 0.9.0 release (2ca46c4)
      • Cleanup cargo metadata (a9e4b0a)
      • Run rustfmt (dd86c6c)
      • Fix some clippy warnings (9adc370)
      • Cleanup docs (ddecc3a)
      • Rename unicase_support to unicase (b47174b)
      • Add support for uncased (2a6087f)
      • Replace std::borrow::Borrow with PhfBorrow for ordered maps and sets (f43a9cf)
      • replace uses of std::borrow::Borrow with new PhfBorrow trait (b2f3a9c)
      • Add back ordered_map, ordered_set (0ab0108)
      • Use [patch.crates-io] section instead of path key (f47515b)
      • Merge pull request #194 from pickfire/patch-1 (caec346)
      • Fix style in doc (a285906)
      • Fix building with no_std (db4ce56)
      • Release v0.8.0 (4060288)
      • Merge pull request #172 from kornelski/patch-1 (eee56c0)
      • remove ordered_map, ordered_set, phf_builder (8ae2bb8)
      • switch optional core feature to default std feature (645e23d)
      • use two separate hashes and full 32-bit displacements (9b70bd9)
      • Merge pull request #157 from abonander/array-formatting (8fc18be)
      • Made macros work in stable (4fc0d1a)
      • convert to 2018 edition (9ff66ab)
      • Fix & include tests for empty maps (83fd51c)
      • Release v0.7.24 (1287414)
      • Docs for new macro setup (364ed47)
      • Fix feature name (e3a7442)
      • Reexport macros through phf crate (588fd1a)
      • Release v0.7.23 (a050b6f)
      • Release 0.7.22 (ab88405)
      • Release v0.7.21 (6c7e2d9)
      • Typo (8d23b15)
      • Link to docs.rs (61142c5)
      • Release v0.7.20 (f631f50)
      • Release v0.7.19 (0a98dd1)
      • Release v0.7.18 (3f71765)
      • Release v0.7.17 (21ecf72)
      • Release v0.7.16 (8bf29c1)
      • Release v0.7.15 (20f896e)
      • Release v0.7.14 (fee66fc)
      • Add an impl of PhfHash for UniCase (d761144)
      • Drop all rust features (888f623)
      • Introduce a Slice abstraction for buffers (0cc3844)
      • Release v0.7.13 (4769a6d)
      • Release v0.7.12 (9b75ee5)
      • Fix ordered set index documentation (44e495f)
      • Release v0.7.11 (a004227)
      • Release v0.7.10 (c43154b)
      • Release v0.7.9 (b7d29df)
      • Release v0.7.8 (aad0b9b)
      • Release v0.7.7 (c9e7a93)
      • Run through rustfmt (58e2223)
      • Release v0.7.6 (5bcd5c9)
      • Fix core feature build (751c94b)
      • Use libstd debug builders (fd71c31)
      • Simplify no_std logic a bit (70f2ed9)
      • Reinstantiate no_std cargo feature flag. (7c3f757)
      • Release v0.7.5 (fda44f5)
      • Release v0.7.4 (c7c0d3c)
      • Add hash() and get_index() to phf_shared. (d3b2ea0)
      • Update PhfHash to mirror std::hash::Hash (96ef156)
      • Release v0.7.3 (77ea239)
      • Remove prelude imports (98183e1)
      • Release v0.7.2 (642b69d)
      • Add index methods to OrderedMap and OrderedSet. (d2af00d)
      • Release v0.7.1 (9cb9de9)
      • Release v0.7.0 (555a690)
      • Stabilize phf (e215273)
      • Drop debug_builders feature (0b68ea5)
      • Release v0.6.19 (5810d30)
      • Clean up debug impls (7e32f39)
      • Upgrade to rustc 1.0.0-dev (d8be84eb4 2015-03-29) (built 2015-03-29) (7d74f1f)
      • Release v0.6.18 (36efc72)
      • Fix for upstream changes (eabadcf)
      • Release v0.6.17 (271ccc2)
      • Release v0.6.15 (ede14df)
      • Release v0.6.14 (cf64ebb)
      • Release v0.6.13 (4fdb533)
      • Fix warnings and use debug builders (4d28684)
      • Release v0.6.12 (59ca586)
      • Release v0.6.11 (e1e6d3b)
      • Release v0.6.10 (fc45373)
      • Add documentation for phf_macros (8eca797)
      • Move tests to phf_macros (40dbc32)
      • Remove core feature (d4c189a)
      • Release v0.6.9 (822f4e3)
      • Fix for upstream changes (f014882)
      • Release v0.6.8 (cd637ca)
      • Upgrade to rustc 1.0.0-nightly (6c065fc8c 2015-02-17) (built 2015-02-18) (cbd9a41)
      • .map(|t| t.clone()) -> .cloned() (044f690)
      • Add example to root module docs (fbbb530)
      • Release v0.6.7 (bfc36c9)
      • Release v0.6.6 (b09a174)
      • Fix for upstream changse (9bd8705)
      • Release v0.6.5 (271e784)
      • Fix for upstream changes (3db7cef)
      • Fix doc URLs (e1c53fc)
      • Move docs to this repo and auto build them (f8ef160)
      • Release v0.6.4 (6866c1b)
      • Release v0.6.3 (b0c5e3c)
      • Release v0.6.2 (d9ddf45)
      • Implement IntoIterator (2f63ded)
      • Link to libstd by default (24555b1)
      • Release v0.6.1 (ca0e9f6)
      • Fix for upstream changes (69ca376)
      • Fix for stability changes (f7fb510)
      • More sed fixes (81b54b2)
      • Release v0.6.0 (09d6870)
      • Rename phf_mac to phf_macros (c50d107)
      • More fixes for bad sed (28af2aa)
      • Fix silly sed error (39e098a)
      • Show -> Debug (384ead4)
      • Release v0.5.0 (8683be2)
      • Add type to Show implementations (c5a4f31)
      • Remove unused features (88700a2)
      • Remove fmt::String impls for structures (5135f02)
      • Release v0.4.9 (28cbe70)
      • Fix for upstream changes (0b22188)
      • Release v0.4.8 (bb858f1)
      • Release v0.4.7 (d83f551)
      • Fix for upstream changes (c3ae5ac)
      • Release v0.4.6 (360bf81)
      • Release v0.4.5 (ab4786c)
      • Fix for upstream changes (6963a16)
      • Release v0.4.4 (f678635)
      • Fix for upstream changes (2b4863f)
      • Release v0.4.3 (4f5902c)
      • Fix for weird type inference breakage (3c36bfb)
      • Release v0.4.2 (69d92b8)
      • Update to rust master (4a0d48d)
      • Release v0.4.1 (0fba837)
      • Release v0.4.0 (49dbb36)
      • Fix for upstream changes and drop xxhash (fc2539f)
      • Release v0.3.0 (0a80b06)
      • Fix for unboxed closure changes (d96a1e5)
      • Rename Set and OrderedSet iterators (9103fc5)
      • add support for [u8, ..N] keys (e26947c)
      • Bump to 0.2 (4546f51)
      • Remove uneeded feature (98dde65)
      • Alter entries iterator behavior (14627f5)
      • Bump to 0.1.0 (43d9a50)
      • Merge pull request #31 from jamesrhurst/exactsize (d20c311)
      • Make publishable on crates.io (4ad2bb2)
      • ExactSize is now ExactSizeIterator (6a7cc6e)
      • Use repository packages (6e3a54d)
      • Add license and descriptions (ff7dad4)
      • Update to use BorrowFrom (2f3c605)
      • Merge pull request #25 from cmr/master (aa3e2d0)
      • s/kv/entry/ (bf62eb8)
      • more code review (aec5aab)
      • code review (88d54c2)
      • Added key+value equivalents for the map getters. (7ced000)
      • Switch from find to get (88abf6c)
      • Fix some deprecation warnings (af2dd53)
      • Update for collections traits removal (f585e4c)
      • Remove deprecated reexports (b697d13)
      • Hide deprecated reexports from docs (d120067)
      • Add deprecated reexports (5752604)
      • Fix doc header size (8f5c0f0)
      • Fix docs (eadea0b)
      • Convert PhfOrderedSet to new naming conventions (de193c7)
      • Switch over PhfOrderedMap to new naming scheme (f17bae1)
      • Convert PhfSet to new naming conventions (b2416db)
      • Move and rename PhfMap stuff (7fc934a)
      • Update for Equiv DST changes (719de47)
      • Clean up warnings (b44065b)
      • Fix docs (83a8116)
      • Drop libstd requirement (dd3d0f1)
      • Remove unneeded import (15cc179)
      • Update docs location (49647cd)
      • Misc cleanup (2fe6940)
      • Use XXHash instead of SipHash (bd10658)
      • Use slice operators (a1b5030)
      • Fix warnings in tests (4bf6f82)
      • Remove old crate_name attributes (35701e2)
      • Fix typo (68458d3)
      • Rephrase order guarantees (3c2661d)
      • Update examples (85a3b28)
      • Minor cleanup (2f75f5f)
      • Provide find_index{,_equiv} on PhfOrdered{Set,Map} (b16d440)
      • Merge pull request #11 from huonw/speed++ (3687c0e)
      • Update for lifetime changes (af0a11c)
      • Add back crate_name for rustdoc (92ec57a)
      • More cleanup (20dea1d)
      • One more where clause (d6e5d77)
      • Switch to where clause syntax (13b9389)
      • cargo update (2a650ef)
      • Re-disable in-crate tests (9c4d247)
      • Properly support cross compiled builds (b2220d9)
      • Reenable tests for phf crate for docs (3ab5bd1)
      • Update for pattern changes (f79814a)
      • Move test to tests dir (c9ca9b1)
      • Add more _equiv methods (61eea75)
      • Elide lifetimes (20a1e83)
      • Impl Index for PhfMap and PhfOrderedMap (3995dbc)
      • Switch Travis to using cargo (95f3c90)
      • Rename module (25aeba6)
      • Rename phf_shared to phf (6372fa4)
      • Turn off tests for main crates (6718b60)
      • Pull shared code into a module (19c4f8d)
      • Move iterator maps to construction time (a8bb815)
      • Implement more iterator traits for PhfMap iters (4b48972)
      • Merge pull request #6 from alexcrichton/new-cargo-flag (a90e7cc)
      • Add support for remaining literals (55ededf)
      • Byte and char key support (789990e)
      • Support binary literal keys! (6bfb12b)
      • Parameterize the key type of PhfOrdered* (f6ce641)
      • Parameterize the key type of PhfMap and Set (cb4ed93)
      • Update for crate_id removal (a0ab8d7)
      • Split to two separate Cargo packages (4ff3544)
    Source code(tar.gz)
    Source code(zip)
  • v0.11.0(Jul 15, 2022)

    What's Changed

    • Implement PhfHash for integral arrays of any size. by @turbocool3r in https://github.com/rust-phf/rust-phf/pull/247
    • Fix phf_codegen example by @fgsch in https://github.com/rust-phf/rust-phf/pull/248
    • Add Map::new() function and Default implementation to create new, empty map by @msrd0 in https://github.com/rust-phf/rust-phf/pull/249
    • Make "unicase + macros" features work by @JohnTitor in https://github.com/rust-phf/rust-phf/pull/251
    • Fix some Clippy warnings by @JohnTitor in https://github.com/rust-phf/rust-phf/pull/252
    • Upgrade actions/checkout to v3 by @JohnTitor in https://github.com/rust-phf/rust-phf/pull/253
    • fix: remove now-unnecessary proc-macro-hack crate usage by @ErichDonGubler in https://github.com/rust-phf/rust-phf/pull/256
    • Make crates edition 2021 by @JohnTitor in https://github.com/rust-phf/rust-phf/pull/257
    • Release 0.11.0 by @JohnTitor in https://github.com/rust-phf/rust-phf/pull/258

    New Contributors

    • @turbocool3r made their first contribution in https://github.com/rust-phf/rust-phf/pull/247
    • @fgsch made their first contribution in https://github.com/rust-phf/rust-phf/pull/248
    • @msrd0 made their first contribution in https://github.com/rust-phf/rust-phf/pull/249
    • @ErichDonGubler made their first contribution in https://github.com/rust-phf/rust-phf/pull/256

    Full Changelog: https://github.com/rust-phf/rust-phf/compare/v0.10.1...v0.11.0

    Source code(tar.gz)
    Source code(zip)
  • v0.10.1(Dec 13, 2021)

  • v0.10.0(Aug 10, 2021)

  • v0.9.1(Aug 6, 2021)

  • v0.9.0(Jun 17, 2021)

Owner
null
Rust crate: Overloaded Literals to construct your datatypes without boilerplate and with compile-time validation.

overloaded_literals   Overloaded Literals to construct your datatypes without boilerplate and with compile-time validation. Features Compile-time vali

Qqwy / Marten 6 Apr 14, 2023
Compile-time stuff and other goodies for rustaceans 🦀

?? bagel: Always baked, never fried bagel is a collection of macros and other things that we frequently use at Skytable, primarily to get work done at

Skytable 3 Jul 4, 2022
Construct complex structures within single call + simple compile-time meta-inheritance model with mixins.

Introduction constructivism is a Rust sample-library designed to simplify the construction of structured data by defining and manipulating sequences o

polako.rs 5 Oct 24, 2023
High-order Virtual Machine (HVM) is a pure functional compile target that is lazy, non-garbage-collected and massively parallel

High-order Virtual Machine (HVM) High-order Virtual Machine (HVM) is a pure functional compile target that is lazy, non-garbage-collected and massivel

null 5.5k Jan 2, 2023
Static low-bandwidth search at scale

Pagefind Pagefind is a fully static search library that aims to perform well on large sites, while using as little of your users' bandwidth as possibl

CloudCannon 657 Dec 30, 2022
Static-checked parsing of regexes into structs

Statically-checked regex parsing into structs. This avoids common regex pitfalls like Off by one capture indexes Trying to get nonexistent captures De

Andrew Baxter 4 Dec 18, 2022
Safe, comp time generated queries in rust

query_builder For each struct field following methods will be generated. All fields where_FIELDNAME_eq Numeric fields where_FIELDNAME_le where_FIELDNA

Amirreza Askarpour 2 Oct 31, 2021
Simple time handling in Rust

time Documentation: latest release main branch book Minimum Rust version policy The time crate is guaranteed to compile with any release of rustc from

Time 680 Dec 31, 2022
Fast and simple datetime, date, time and duration parsing for rust.

speedate Fast and simple datetime, date, time and duration parsing for rust. speedate is a lax† RFC 3339 date and time parser, in other words, it pars

Samuel Colvin 43 Nov 25, 2022
Time to dive into Rust!

Lets-Learn-Rust Time to dive into Rust! Day 1 Installation Running a Simple Rust Program Managing Projects with Cargo Basic Programming - Comments and

null 6 Jun 10, 2023
🦀 A Rust CLI to find the optimal time to meet given a when2meet URL

when3meet ?? The Rust when2meet CLI Install | Usage | Contributing & Issues | Docs Built with ❤️ and ?? by Garrett Ladley Install cargo install when3m

Garrett Ladley 4 Sep 18, 2023
A real-time mixer

Pagana Pagana is a real-time mixer. This project is still in early stages of development and is not ready for any kind of production use or testing. D

null 1 Nov 26, 2021
Isn't it time to be a bit nicer to rustc?

politeness-macro Aren't we all too rude to computers? Isn't it time to bring a bit more politeness into our programming? Shouldn't we be a bit nicer t

Rin 6 Mar 11, 2022
A real-time data backend for browser-based applications.

DriftDB DriftDB is a real-time data backend for browser-based applications. For more information, see driftdb.com. Structure of this repo docs/: main

drifting in space 453 Feb 6, 2023
Parses a relative time string and returns a `Duration`

humantime_to_duration A Rust crate for parsing human-readable relative time strings and converting them to a Duration. Features Parses a variety of hu

null 5 Apr 25, 2023
A perfect smoother; A discrete time version of spline smoothing for equally spaced data

Whittaker Smoother Aka Whittaker-Henderson, Whittaker-Eilers Smoother is known as the perfect smoother. Its a discrete-time version of spline smoothin

Mathis Wellmann 3 Aug 12, 2023
Mindful Time Tracking: Simplify Your Focus and Boost Productivity Effortlessly.

Mindful Time Tracking: Simplify Your Focus and Boost Productivity Effortlessly. About pace is a mindful productivity tool designed to help you keep tr

pace 6 Mar 1, 2024
Leetcode Solutions in Rust, Advent of Code Solutions in Rust and more

RUST GYM Rust Solutions Leetcode Solutions in Rust AdventOfCode Solutions in Rust This project demostrates how to create Data Structures and to implem

Larry Fantasy 635 Jan 3, 2023
Simple autoclicker written in Rust, to learn the Rust language.

RClicker is an autoclicker written in Rust, written to learn more about the Rust programming language. RClicker was was written by me to learn more ab

null 7 Nov 15, 2022