Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
ziskos-hints
This crate is a wrapper around ziskos that compiles the same source code with the hints feature enabled.
How it works
Symlinked Source
The src/ directory in this crate is a symlink to ../ziskos/entrypoint/src/. This means:
- Both
ziskosandziskos-hintscompile from the same source files - No code duplication is needed
- Changes to the source are automatically reflected in both crates
Conditional Compilation
The source code uses conditional compilation to export different C symbols:
pub extern "C" fn <function_name>
When compiled:
- ziskos (no hints feature): Exports C symbol
<function_name> - ziskos-hints (hints feature enabled): Exports C symbol
hints_<function_name>
Why This Pattern?
This solves a Cargo limitation: feature unification. In a single build, if multiple crates depend on the same crate, Cargo unifies their features. This means you cannot have different feature sets for the same dependency.
By creating a separate crate (ziskos-hints) that always enables the hints feature, we can:
- Use
ziskoswithout hints in most places - Use
ziskos-hintswith hints where needed (e.g., inprecompiles-hints) - Link both into the same binary without symbol conflicts
The different C symbol names (<function_name> vs hints_<function_name>) prevent linker duplicate symbol errors.
Usage
In your Cargo.toml:
# For normal usage without hints:
= { = true }
# For usage with hints enabled:
= { = true }
From Rust code, both have the same API:
use syscall_arith256_mod;
// or
use syscall_arith256_mod;
// or rename for consistency:
use ziskos_hints as ziskos;
use syscall_arith256_mod;
The function name in Rust is the same; only the exported C symbol differs.