You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

libm

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libm - cargo Package Compare versions

Comparing version
0.2.7
to
0.2.8
+1
-1
.cargo_vcs_info.json
{
"git": {
"sha1": "1dbb9d2d476d65d020feca17b11391652038e2e1"
"sha1": "721a5edc1be6b0412e4b1704590aed76f9a55899"
},
"path_in_vcs": ""
}

@@ -15,4 +15,8 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO

name = "libm"
version = "0.2.7"
version = "0.2.8"
authors = ["Jorge Aparicio <jorge@japaric.io>"]
exclude = [
"/ci/",
"/.github/workflows/",
]
description = "libm in pure Rust"

@@ -19,0 +23,0 @@ documentation = "https://docs.rs/libm"

@@ -11,5 +11,15 @@ #[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]

let ans = if is_positive {
x + one_over_e - one_over_e
#[cfg(all(target_arch = "x86", not(target_feature = "sse2")))]
let x = force_eval!(x);
let xplusoneovere = x + one_over_e;
#[cfg(all(target_arch = "x86", not(target_feature = "sse2")))]
let xplusoneovere = force_eval!(xplusoneovere);
xplusoneovere - one_over_e
} else {
x - one_over_e + one_over_e
#[cfg(all(target_arch = "x86", not(target_feature = "sse2")))]
let x = force_eval!(x);
let xminusoneovere = x - one_over_e;
#[cfg(all(target_arch = "x86", not(target_feature = "sse2")))]
let xminusoneovere = force_eval!(xminusoneovere);
xminusoneovere + one_over_e
};

@@ -16,0 +26,0 @@

@@ -11,5 +11,15 @@ #[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]

let ans = if is_positive {
x + one_over_e - one_over_e
#[cfg(all(target_arch = "x86", not(target_feature = "sse2")))]
let x = force_eval!(x);
let xplusoneovere = x + one_over_e;
#[cfg(all(target_arch = "x86", not(target_feature = "sse2")))]
let xplusoneovere = force_eval!(xplusoneovere);
xplusoneovere - one_over_e
} else {
x - one_over_e + one_over_e
#[cfg(all(target_arch = "x86", not(target_feature = "sse2")))]
let x = force_eval!(x);
let xminusoneovere = x - one_over_e;
#[cfg(all(target_arch = "x86", not(target_feature = "sse2")))]
let xminusoneovere = force_eval!(xminusoneovere);
xminusoneovere + one_over_e
};

@@ -16,0 +26,0 @@

name: CI
on: [push, pull_request]
jobs:
docker:
name: Docker
runs-on: ubuntu-latest
strategy:
matrix:
target:
- aarch64-unknown-linux-gnu
- arm-unknown-linux-gnueabi
- arm-unknown-linux-gnueabihf
- armv7-unknown-linux-gnueabihf
# - i686-unknown-linux-gnu
- mips-unknown-linux-gnu
- mips64-unknown-linux-gnuabi64
- mips64el-unknown-linux-gnuabi64
- powerpc-unknown-linux-gnu
- powerpc64-unknown-linux-gnu
- powerpc64le-unknown-linux-gnu
- x86_64-unknown-linux-gnu
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update nightly && rustup default nightly
- run: rustup target add ${{ matrix.target }}
- run: rustup target add x86_64-unknown-linux-musl
- run: cargo generate-lockfile
- run: ./ci/run-docker.sh ${{ matrix.target }}
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update stable && rustup default stable && rustup component add rustfmt
- run: cargo fmt -- --check
wasm:
name: WebAssembly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update nightly && rustup default nightly
- run: rustup target add wasm32-unknown-unknown
- run: cargo build --target wasm32-unknown-unknown
cb:
name: "The compiler-builtins crate works"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update nightly && rustup default nightly
- run: cargo build -p cb
benchmarks:
name: Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update nightly && rustup default nightly
- run: cargo bench --all
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc libc6-dev ca-certificates \
gcc-aarch64-linux-gnu libc6-dev-arm64-cross \
qemu-user-static
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER=qemu-aarch64-static \
QEMU_LD_PREFIX=/usr/aarch64-linux-gnu \
RUST_TEST_THREADS=1
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc libc6-dev ca-certificates \
gcc-arm-linux-gnueabi libc6-dev-armel-cross qemu-user-static
ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_LINKER=arm-linux-gnueabi-gcc \
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_RUNNER=qemu-arm-static \
QEMU_LD_PREFIX=/usr/arm-linux-gnueabi \
RUST_TEST_THREADS=1
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc libc6-dev ca-certificates \
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user-static
ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER=qemu-arm-static \
QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf \
RUST_TEST_THREADS=1
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc libc6-dev ca-certificates \
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user-static
ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUNNER=qemu-arm-static \
QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf \
RUST_TEST_THREADS=1
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc-multilib libc6-dev ca-certificates
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc libc6-dev ca-certificates \
gcc-mips-linux-gnu libc6-dev-mips-cross \
binfmt-support qemu-user-static qemu-system-mips
ENV CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-linux-gnu-gcc \
CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_RUNNER=qemu-mips-static \
QEMU_LD_PREFIX=/usr/mips-linux-gnu \
RUST_TEST_THREADS=1
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
gcc \
gcc-mips64-linux-gnuabi64 \
libc6-dev \
libc6-dev-mips64-cross \
qemu-user-static \
qemu-system-mips
ENV CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_LINKER=mips64-linux-gnuabi64-gcc \
CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_RUNNER=qemu-mips64-static \
CC_mips64_unknown_linux_gnuabi64=mips64-linux-gnuabi64-gcc \
QEMU_LD_PREFIX=/usr/mips64-linux-gnuabi64 \
RUST_TEST_THREADS=1
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
gcc \
gcc-mips64el-linux-gnuabi64 \
libc6-dev \
libc6-dev-mips64el-cross \
qemu-user-static
ENV CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_GNUABI64_LINKER=mips64el-linux-gnuabi64-gcc \
CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_GNUABI64_RUNNER=qemu-mips64el-static \
CC_mips64el_unknown_linux_gnuabi64=mips64el-linux-gnuabi64-gcc \
QEMU_LD_PREFIX=/usr/mips64el-linux-gnuabi64 \
RUST_TEST_THREADS=1
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc libc6-dev ca-certificates \
gcc-mipsel-linux-gnu libc6-dev-mipsel-cross \
binfmt-support qemu-user-static
ENV CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_GNU_LINKER=mipsel-linux-gnu-gcc \
CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_GNU_RUNNER=qemu-mipsel-static \
QEMU_LD_PREFIX=/usr/mipsel-linux-gnu \
RUST_TEST_THREADS=1
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc libc6-dev qemu-user-static ca-certificates \
gcc-powerpc-linux-gnu libc6-dev-powerpc-cross \
qemu-system-ppc
ENV CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_LINKER=powerpc-linux-gnu-gcc \
CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_RUNNER=qemu-ppc-static \
QEMU_LD_PREFIX=/usr/powerpc-linux-gnu \
RUST_TEST_THREADS=1
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc libc6-dev ca-certificates \
gcc-powerpc64-linux-gnu libc6-dev-ppc64-cross \
binfmt-support qemu-user-static qemu-system-ppc
ENV CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_LINKER=powerpc64-linux-gnu-gcc \
CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_RUNNER=qemu-ppc64-static \
CC_powerpc64_unknown_linux_gnu=powerpc64-linux-gnu-gcc \
QEMU_LD_PREFIX=/usr/powerpc64-linux-gnu \
RUST_TEST_THREADS=1
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc libc6-dev qemu-user-static ca-certificates \
gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross \
qemu-system-ppc
ENV CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_LINKER=powerpc64le-linux-gnu-gcc \
CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_RUNNER=qemu-ppc64le-static \
QEMU_CPU=POWER8 \
QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu \
RUST_TEST_THREADS=1
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc libc6-dev ca-certificates
# Small script to run tests for a target (or all targets) inside all the
# respective docker images.
set -ex
run() {
local target=$1
echo $target
# This directory needs to exist before calling docker, otherwise docker will create it but it
# will be owned by root
mkdir -p target
docker build -t $target ci/docker/$target
docker run \
--rm \
--user $(id -u):$(id -g) \
-e CARGO_HOME=/cargo \
-e CARGO_TARGET_DIR=/target \
-v "${HOME}/.cargo":/cargo \
-v `pwd`/target:/target \
-v `pwd`:/checkout:ro \
-v `rustc --print sysroot`:/rust:ro \
--init \
-w /checkout \
$target \
sh -c "HOME=/tmp PATH=\$PATH:/rust/bin exec ci/run.sh $target"
}
if [ -z "$1" ]; then
for d in `ls ci/docker/`; do
run $d
done
else
run $1
fi
#!/usr/bin/env sh
set -ex
TARGET=$1
CMD="cargo test --all --target $TARGET"
# Needed for no-panic to correct detect a lack of panics
export RUSTFLAGS="$RUSTFLAGS -Ccodegen-units=1"
# stable by default
$CMD
$CMD --release
# unstable with a feature
$CMD --features 'unstable'
$CMD --release --features 'unstable'
# also run the reference tests
$CMD --features 'unstable musl-reference-tests'
$CMD --release --features 'unstable musl-reference-tests'

Sorry, the diff of this file is not supported yet