Expand description
Dynamic linking support for Stringleton.
This crate always produces a dynamic library, and it should be used by any
crate that ends up being a cdylib
. When this appears somewhere in the
dependency graph, it causes the Rust compiler to produce a dynamic version
of stringleton-registry
, which means that both uses of stringleton
and
stringleton-dylib
use the same symbol registry, so Symbol
s can be safely
passed across the dynamic linking boundary.
The host crate can safely use stringleton
as a dependency, except when
dynamic libraries using stringleton-dylib
are loaded at runtime (i.e.,
Rust cannot know that stringleton-registry
should be dynamically linked).
In that case, the host crate should specify this crate as its dependency
instead of stringleton
.
Macros§
- enable
- Enable the
sym!(...)
macro in the calling crate. - static_
sym - Create a static location for a literal symbol.
- sym
- Create a literal symbol from a literal identifier or string
Structs§
- Registry
- The global symbol registry.
- Static
Symbol - Const-compatible static symbol.
- Symbol
- Interned string with very fast comparison and hashing.