Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full no_std and miri support #18

Merged
merged 15 commits into from
Jan 28, 2023
Merged

Full no_std and miri support #18

merged 15 commits into from
Jan 28, 2023

Commits on Dec 22, 2022

  1. Fix {from, into}_raw_parts methods

    This changes some type signatures, which is technically a breaking
    change (although the previous implementations were essentially unusable
    anyway).
    robamler committed Dec 22, 2022
    Configuration menu
    Copy the full SHA
    1230273 View commit details
    Browse the repository at this point in the history
  2. Add QuantizedCauchy to python bindings

    This requires upgrading the dependency on `probability` from 0.17
    to 0.18, which is technically a breaking change since `constriction`
    re-exports `probability::distribution::Distribution` and
    `probability::distribution::Inverse` unless compiled without the default
    feature "std".
    robamler committed Dec 22, 2022
    Configuration menu
    Copy the full SHA
    4514e64 View commit details
    Browse the repository at this point in the history
  3. Update dep and remove --feature probability

    Starting from version 0.19, crate `probability` is now supposed to
    both support `no_std` mode and remove all external syscalls for
    mathematical special functions. We therefore no longer need to make the
    crate `probability` an optional dependency.
    
    The updated `probability` *should* allow users to use `constriction` in
    `no_std` mode in more contexts, and to run more tests in `miri`. Whether
    this is actually the case will be tested in the next few commits.
    robamler committed Dec 22, 2022
    Configuration menu
    Copy the full SHA
    b71e2b5 View commit details
    Browse the repository at this point in the history
  4. Enable all previously disabled tests on miri

    The new version of the `probability` crate no longer uses system calls
    for special mathematical functions, so we can now run (almost) all tests
    in miri.
    
    The only tests that are still disabled in miri are the benchmarks in
    directory `benches`. These cannot be enabled at this point since
    `criterion` seems to be incompatible with `miri`.
    robamler committed Dec 22, 2022
    Configuration menu
    Copy the full SHA
    636e227 View commit details
    Browse the repository at this point in the history
  5. Replace dependency on num by nym_traits

    First step towards `no_std` compatibility.
    robamler committed Dec 22, 2022
    Configuration menu
    Copy the full SHA
    1d28240 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    31b9ca4 View commit details
    Browse the repository at this point in the history
  7. Revert "Update dep and remove --feature probability"

    This reverts commit 63f6252.
    robamler committed Dec 22, 2022
    Configuration menu
    Copy the full SHA
    b80806d View commit details
    Browse the repository at this point in the history
  8. Put log2 behind a feature gate

    For `no_std` compatibility, we can use `log2` only if either feature
    "std" or feature "libm" is active.
    robamler committed Dec 22, 2022
    Configuration menu
    Copy the full SHA
    17abc7e View commit details
    Browse the repository at this point in the history
  9. Fix no_std compatibility

    robamler committed Dec 22, 2022
    Configuration menu
    Copy the full SHA
    bd6cf58 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c419117 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    5626734 View commit details
    Browse the repository at this point in the history
  12. Update to probability 0.20

    This one is `no_std` compatible
    robamler committed Dec 22, 2022
    Configuration menu
    Copy the full SHA
    1aea7b8 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    c7163ba View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2023

  1. Make optimize_leaky_categorical nostd-compatible

    The only missing piece was to replace `f64::ln_1p` with `libm::log1p`.
    robamler committed Jan 28, 2023
    Configuration menu
    Copy the full SHA
    23d1622 View commit details
    Browse the repository at this point in the history
  2. Fix new clippy lints

    robamler committed Jan 28, 2023
    Configuration menu
    Copy the full SHA
    a969ef3 View commit details
    Browse the repository at this point in the history