Code Monkey home page Code Monkey logo

effective-limits.rs's Introduction

Estimate effective resource limits for a process

effective-limits is a mid-level API for determining the effective limits upon a process. It combines e.g. mem_info and getrlimit.

The goal is to have a good chance of avoiding failed allocations without requiring either developer or user a-priori selection of memory limits. That is, how much memory is effectively available for this process to use, considering the physical machine and ulimits, but not the impact of noisy neighbours, swappiness and so on. This limit can then be used to inform the size of in memory caches, put a threshold on in or output file buffers and so on.

#![warn(clippy::all)]

extern crate effective_limits;

fn main() -> effective_limits::Result<()> {
    println!("Effective mem limit: {}", effective_limits::memory_limit()?);
    Ok(())
}

effective-limits.rs's People

Contributors

alovchin91 avatar guillaumegomez avatar jclulow avatar kinnison avatar rbtcollins avatar renovate[bot] avatar snimmagadda avatar tblah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

effective-limits.rs's Issues

Apple silicon link fails in CI

Compiling effective-limits v0.5.4 (/Users/runner/work/effective-limits.rs/effective-limits.rs)
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-arch" "arm64" "/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/rustczLLsSV/symbols.o" "/Users/runner/work/effective-limits.rs/effective-limits.rs/target/aarch64-apple-darwin/release/deps/test_limited-d3a107b238aa6a4c.test_limited.ee3c1b10-cgu.0.rcgu.o" "/Users/runner/work/effective-limits.rs/effective-limits.rs/target/aarch64-apple-darwin/release/deps/test_limited-d3a107b238aa6a4c.test_limited.ee3c1b10-cgu.1.rcgu.o" "/Users/runner/work/effective-limits.rs/effective-limits.rs/target/aarch64-apple-darwin/release/deps/test_limited-d3a107b238aa6a4c.test_limited.ee3c1b10-cgu.2.rcgu.o" "/Users/runner/work/effective-limits.rs/effective-limits.rs/target/aarch64-apple-darwin/release/deps/test_limited-d3a107b238aa6a4c.test_limited.ee3c1b10-cgu.3.rcgu.o" "/Users/runner/work/effective-limits.rs/effective-limits.rs/target/aarch64-apple-darwin/release/deps/test_limited-d3a107b238aa6a4c.test_limited.ee3c1b10-cgu.4.rcgu.o" "/Users/runner/work/effective-limits.rs/effective-limits.rs/target/aarch64-apple-darwin/release/deps/test_limited-d3a107b238aa6a4c.test_limited.ee3c1b10-cgu.5.rcgu.o" "/Users/runner/work/effective-limits.rs/effective-limits.rs/target/aarch64-apple-darwin/release/deps/test_limited-d3a107b238aa6a4c.test_limited.ee3c1b10-cgu.6.rcgu.o" "/Users/runner/work/effective-limits.rs/effective-limits.rs/target/aarch64-apple-darwin/release/deps/test_limited-d3a107b238aa6a4c.nyncdh1yml35nr0.rcgu.o" "-L" "/Users/runner/work/effective-limits.rs/effective-limits.rs/target/aarch64-apple-darwin/release/deps" "-L" "/Users/runner/work/effective-limits.rs/effective-limits.rs/target/release/deps" "-L" "/Users/runner/work/effective-limits.rs/effective-limits.rs/target/aarch64-apple-darwin/release/build/sys-info-b59c8b6737670eb5/out" "-L" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "/Users/runner/work/effective-limits.rs/effective-limits.rs/target/aarch64-apple-darwin/release/deps/libeffective_limits-8ef6c973a049d041.rlib" "/Users/runner/work/effective-limits.rs/effective-limits.rs/target/aarch64-apple-darwin/release/deps/libsys_info-c630507d599be333.rlib" "/Users/runner/work/effective-limits.rs/effective-limits.rs/target/aarch64-apple-darwin/release/deps/liblibc-e39d15d04c1edbc0.rlib" "/Users/runner/work/effective-limits.rs/effective-limits.rs/target/aarch64-apple-darwin/release/deps/libthiserror-0664932432232f31.rlib" "/Users/runner/work/effective-limits.rs/effective-limits.rs/target/aarch64-apple-darwin/release/deps/libcfg_if-eae2332900f2d2d5.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libstd-e3c87b428a1bf732.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libpanic_unwind-2915de96b3a38450.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libobject-989d91694b1077cd.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libmemchr-cc296f8fecc3c15e.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libaddr2line-0b0f9149965a6330.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libgimli-5e33f7d33d783934.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_demangle-83f0a846e9c76cee.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libstd_detect-69b3363c3fbaf347.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libhashbrown-d4e9955bdbf45354.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libminiz_oxide-d982e650c3bbe3bb.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libadler-b[58](https://github.com/rbtcollins/effective-limits.rs/actions/runs/3509770981/jobs/5879100672#step:14:59)67aac50e0b1a1.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_alloc-384d20ab1f2939d7.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libunwind-221fd1d10e8b58f8.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcfg_if-f31edbcb638b419f.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/liblibc-1432fbf85665684e.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/liballoc-5a46785d55d8f2b9.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_core-a8a8[59](https://github.com/rbtcollins/effective-limits.rs/actions/runs/3509770981/jobs/5879100672#step:14:60)a864856684.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcore-908209eee[60](https://github.com/rbtcollins/effective-limits.rs/actions/runs/3509770981/jobs/5879100672#step:14:61)fb642.rlib" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-a7430b5ee2b3242a.rlib" "-liconv" "-lSystem" "-lc" "-lm" "-L" "/Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "-o" "/Users/runner/work/effective-limits.rs/effective-limits.rs/target/aarch64-apple-darwin/release/deps/test_limited-d3a107b238aa6a4c" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: in /Users/runner/work/effective-limits.rs/effective-limits.rs/target/aarch64-apple-darwin/release/deps/libsys_info-c[63](https://github.com/rbtcollins/effective-limits.rs/actions/runs/3509770981/jobs/5879100672#step:14:64)0507d599be333.rlib(darwin.o), archive member 'darwin.o' with length 5160 is not mach-o or llvm bitcode for architecture arm[64](https://github.com/rbtcollins/effective-limits.rs/actions/runs/3509770981/jobs/5879100672#step:14:65)
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
          

error: could not compile `effective-limits` due to previous error
Error: Process completed with exit code 101.

[Bug] Test failure when compiling for debian

I'm in the process of packaging this crate for debian. It compiles fine, but two tests fail:

Finished test [unoptimized + debuginfo] target(s) in 9.48s
     Running `/<<PKGBUILDDIR>>/target/x86_64-unknown-linux-gnu/debug/deps/effective_limits-66c8f94afbf48e40`

running 4 tests
test tests::test_min_opt ... ok
test tests::it_works ... ok
test tests::test_ulimit ... FAILED
test tests::test_no_ulimit ... FAILED

failures:

---- tests::test_ulimit stdout ----
Error: IoExplainedError(Os { code: 2, kind: NotFound, message: "No such file or directory" }, "error running helper")
thread 'tests::test_ulimit' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `0`: the test returned a termination value with a non-zero status code (1) which indicates a failure', /usr/src/rustc-1.62.1/library/test/src/lib.rs:185:5
...

I take it this is because It's because it's being build inside a chroot (see line 419 of src/lib.rs). Is there a way to work around this?

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cargo
Cargo.toml
  • cfg-if 0.1.10
  • thiserror 1.0.37
  • sys-info 0.9.1
  • libc 0.2.137
  • winapi 0.3.9
dockerfile
ci/docker/aarch64-unknown-linux-gnu/Dockerfile
ci/docker/aarch64-unknown-linux-musl/Dockerfile
ci/docker/android/Dockerfile
ci/docker/arm-unknown-linux-gnueabi/Dockerfile
ci/docker/arm-unknown-linux-gnueabihf/Dockerfile
ci/docker/armv7-unknown-linux-gnueabihf/Dockerfile
ci/docker/i686-unknown-linux-gnu/Dockerfile
ci/docker/mips-unknown-linux-gnu/Dockerfile
ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile
ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile
ci/docker/mipsel-unknown-linux-gnu/Dockerfile
ci/docker/powerpc-unknown-linux-gnu/Dockerfile
ci/docker/powerpc64-unknown-linux-gnu/Dockerfile
ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile
ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile
ci/docker/s390x-unknown-linux-gnu/Dockerfile
ci/docker/x86_64-unknown-freebsd/Dockerfile
ci/docker/x86_64-unknown-illumos/Dockerfile
ci/docker/x86_64-unknown-linux-gnu/Dockerfile
ci/docker/x86_64-unknown-linux-musl/Dockerfile
  • ubuntu 18.04
ci/docker/x86_64-unknown-netbsd/Dockerfile
github-actions
.github/workflows/centos-fmt-clippy-on-all.yaml
  • actions/checkout v3
  • actions/cache v3
  • actions/cache v3
.github/workflows/linux-builds-on-master.yaml
  • actions/checkout v3
  • actions/cache v3
  • actions/cache v3
  • actions/upload-artifact v3
.github/workflows/linux-builds-on-pr.yaml
  • actions/checkout v3
  • actions/cache v3
  • actions/cache v3
  • actions/upload-artifact v3
.github/workflows/linux-builds-on-stable.yaml
  • actions/checkout v3
  • actions/cache v3
  • actions/cache v3
  • actions/upload-artifact v3
.github/workflows/macos-builds-on-all.yaml
  • actions/checkout v3
  • actions/cache v3
  • actions/cache v3
  • actions/upload-artifact v3
.github/workflows/publish.yaml
  • actions/cache v3
.github/workflows/windows-builds-on-master.yaml
  • actions/checkout v3
  • actions/cache v3
  • actions/cache v3
  • actions/upload-artifact v3
.github/workflows/windows-builds-on-pr.yaml
  • actions/checkout v3
  • actions/cache v3
  • actions/cache v3
  • actions/upload-artifact v3
.github/workflows/windows-builds-on-stable.yaml
  • actions/checkout v3
  • actions/cache v3
  • actions/cache v3
  • actions/upload-artifact v3
ci/actions-templates/centos-fmt-clippy-template.yaml
  • actions/checkout v3
  • actions/cache v3
  • actions/cache v3
ci/actions-templates/linux-builds-template.yaml
  • actions/checkout v3
  • actions/cache v3
  • actions/cache v3
  • actions/upload-artifact v3
ci/actions-templates/macos-builds-template.yaml
  • actions/checkout v3
  • actions/cache v3
  • actions/cache v3
  • actions/upload-artifact v3
ci/actions-templates/windows-builds-template.yaml
  • actions/checkout v3
  • actions/cache v3
  • actions/cache v3
  • actions/upload-artifact v3

  • Check this box to trigger a request for Renovate to run again on this repository

OpenBSD Support

I'd like to build OpenBSD support for rustup (which has this crate as a dependency). However it doesn't compile at the moment since as noted in your libc comments OpenBSD doesn't have the RLIMIT_AS constant. I did a little bit of digging and it appears to me that OpenBSD doesn't have support at all for determining the limit of the virtual memory address space size. Thus I would propose to only request the RLIMIT_DATA (which is supported https://github.com/openbsd/src/blob/master/sys/sys/resource.h#L84) for OpenBSD and use that as a limit. If this seems reasonable I'd happily do a PR for it.

effective_limits::ErrorKind exposes sys-info implementation details

The ErrorKind enumeration includes a SysInfo variant, used when we cannot obtain the total memory via the sys-info crate. The sys-info crate is quite large, but does not support every platform that Rust supports. For other platforms, we could use conditional compilation to swap that crate out for another one -- except that including the sys_info::Error type in the ErrorKind enum prevents us from doing that.

Would you be OK with a small breaking change to the API, replacing the current SysInfo variant with a string-based variant for memory size detection failures? That way, on platforms where sys-info is not compiled in, we can still render an error about the failure to find the size of total memory without needing to use that crate or conditionally change the API.

[Bug] various arches fail compilation

Hi,
I packaged your crates for debian. It builds fine, but only for a few arches:
arm64 (aarch64), amd64 (x86-64), mips64el, ppc64el and s390x.

i386 (x86), armel, armhf and mipsel all fail to build:


Compiling effective-limits v0.5.5 (/<<PKGBUILDDIR>>)
     Running `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=effective_limits CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>> CARGO_PKG_AUTHORS='Robert Collins <[email protected]>' CARGO_PKG_DESCRIPTION='Estimate effective resource limits for a process e.g. how much RAM is available for use.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=Apache-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=effective-limits CARGO_PKG_REPOSITORY='https://github.com/rbtcollins/effective-limits.rs' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.5.5 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=5 CARGO_PKG_VERSION_PATCH=5 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/<<PKGBUILDDIR>>/target/debug/deps:/usr/lib' rustc --crate-name effective_limits --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=263c2e754137088a -C extra-filename=-263c2e754137088a --out-dir /<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps --target armv5te-unknown-linux-gnueabi -C incremental=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/incremental -L dependency=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps -L dependency=/<<PKGBUILDDIR>>/target/debug/deps --extern cfg_if=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libcfg_if-8c4955b915cf7a00.rmeta --extern libc=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/liblibc-b5f738817e952bc8.rmeta --extern sys_info=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libsys_info-00d91cb13fc01bb9.rmeta --extern thiserror=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libthiserror-0666c8194ad7abc4.rmeta -C debuginfo=2 --cap-lints warn -C linker=arm-linux-gnueabi-gcc -C link-arg=-Wl,-z,relro --remap-path-prefix /<<PKGBUILDDIR>>=/usr/share/cargo/registry/effective-limits-0.5.5 --remap-path-prefix /<<PKGBUILDDIR>>/debian/cargo_registry=/usr/share/cargo/registry -L native=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/build/sys-info-99a6b51ff8ec64b0/out`
     Running `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=effective_limits CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>> CARGO_PKG_AUTHORS='Robert Collins <[email protected]>' CARGO_PKG_DESCRIPTION='Estimate effective resource limits for a process e.g. how much RAM is available for use.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=Apache-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=effective-limits CARGO_PKG_REPOSITORY='https://github.com/rbtcollins/effective-limits.rs' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.5.5 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=5 CARGO_PKG_VERSION_PATCH=5 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/<<PKGBUILDDIR>>/target/debug/deps:/usr/lib' rustc --crate-name effective_limits --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --test -C metadata=dc26cd84d2421c51 -C extra-filename=-dc26cd84d2421c51 --out-dir /<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps --target armv5te-unknown-linux-gnueabi -C incremental=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/incremental -L dependency=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps -L dependency=/<<PKGBUILDDIR>>/target/debug/deps --extern cfg_if=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libcfg_if-8c4955b915cf7a00.rlib --extern libc=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/liblibc-b5f738817e952bc8.rlib --extern sys_info=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libsys_info-00d91cb13fc01bb9.rlib --extern thiserror=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libthiserror-0666c8194ad7abc4.rlib -C debuginfo=2 --cap-lints warn -C linker=arm-linux-gnueabi-gcc -C link-arg=-Wl,-z,relro --remap-path-prefix /<<PKGBUILDDIR>>=/usr/share/cargo/registry/effective-limits-0.5.5 --remap-path-prefix /<<PKGBUILDDIR>>/debian/cargo_registry=/usr/share/cargo/registry -L native=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/build/sys-info-99a6b51ff8ec64b0/out`
     Running `CARGO=/usr/bin/cargo CARGO_BIN_NAME=test-limited CARGO_CRATE_NAME=test_limited CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>> CARGO_PKG_AUTHORS='Robert Collins <[email protected]>' CARGO_PKG_DESCRIPTION='Estimate effective resource limits for a process e.g. how much RAM is available for use.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=Apache-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=effective-limits CARGO_PKG_REPOSITORY='https://github.com/rbtcollins/effective-limits.rs' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.5.5 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=5 CARGO_PKG_VERSION_PATCH=5 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/<<PKGBUILDDIR>>/target/debug/deps:/usr/lib' rustc --crate-name test_limited --edition=2018 src/bin/test-limited.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --test -C metadata=3cf1f99cb441efbf -C extra-filename=-3cf1f99cb441efbf --out-dir /<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps --target armv5te-unknown-linux-gnueabi -C incremental=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/incremental -L dependency=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps -L dependency=/<<PKGBUILDDIR>>/target/debug/deps --extern cfg_if=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libcfg_if-8c4955b915cf7a00.rlib --extern effective_limits=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libeffective_limits-263c2e754137088a.rlib --extern libc=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/liblibc-b5f738817e952bc8.rlib --extern sys_info=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libsys_info-00d91cb13fc01bb9.rlib --extern thiserror=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libthiserror-0666c8194ad7abc4.rlib -C debuginfo=2 --cap-lints warn -C linker=arm-linux-gnueabi-gcc -C link-arg=-Wl,-z,relro --remap-path-prefix /<<PKGBUILDDIR>>=/usr/share/cargo/registry/effective-limits-0.5.5 --remap-path-prefix /<<PKGBUILDDIR>>/debian/cargo_registry=/usr/share/cargo/registry -L native=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/build/sys-info-99a6b51ff8ec64b0/out`
     Running `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=memory CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>> CARGO_PKG_AUTHORS='Robert Collins <[email protected]>' CARGO_PKG_DESCRIPTION='Estimate effective resource limits for a process e.g. how much RAM is available for use.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=Apache-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=effective-limits CARGO_PKG_REPOSITORY='https://github.com/rbtcollins/effective-limits.rs' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.5.5 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=5 CARGO_PKG_VERSION_PATCH=5 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/<<PKGBUILDDIR>>/target/debug/deps:/usr/lib' rustc --crate-name memory --edition=2018 examples/memory.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=d9404f750f7f7978 -C extra-filename=-d9404f750f7f7978 --out-dir /<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/examples --target armv5te-unknown-linux-gnueabi -C incremental=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/incremental -L dependency=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps -L dependency=/<<PKGBUILDDIR>>/target/debug/deps --extern cfg_if=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libcfg_if-8c4955b915cf7a00.rlib --extern effective_limits=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libeffective_limits-263c2e754137088a.rlib --extern libc=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/liblibc-b5f738817e952bc8.rlib --extern sys_info=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libsys_info-00d91cb13fc01bb9.rlib --extern thiserror=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libthiserror-0666c8194ad7abc4.rlib -C debuginfo=2 --cap-lints warn -C linker=arm-linux-gnueabi-gcc -C link-arg=-Wl,-z,relro --remap-path-prefix /<<PKGBUILDDIR>>=/usr/share/cargo/registry/effective-limits-0.5.5 --remap-path-prefix /<<PKGBUILDDIR>>/debian/cargo_registry=/usr/share/cargo/registry -L native=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/build/sys-info-99a6b51ff8ec64b0/out`
error[E0308]: mismatched types
   --> src/lib.rs:380:43
    |
380 | ...                   rlim_cur: ulimit,
    |                                 ^^^^^^ expected `u32`, found `u64`

For more information about this error, try `rustc --explain E0308`.

This looks like an arch-related bug to me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.