Skip to content

Add rustc-dep-of-std feature #78

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

Merged
merged 4 commits into from
Aug 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ matrix:
- cargo test --examples
# remove cached documentation, otherwise files from previous PRs can get included
- rm -rf target/doc
- cargo doc --no-deps --all --all-features
- cargo doc --no-deps --all --features=std,log
- cargo deadlinks --dir target/doc
# also test minimum dependency versions are usable
- cargo generate-lockfile -Z minimal-versions
Expand All @@ -64,7 +64,7 @@ matrix:
- cargo test --examples
# remove cached documentation, otherwise files from previous PRs can get included
- rm -rf target/doc
- cargo doc --no-deps --all --all-features
- cargo doc --no-deps --all --features=std,log
- cargo deadlinks --dir target/doc
# also test minimum dependency versions are usable
- cargo generate-lockfile -Z minimal-versions
Expand Down Expand Up @@ -102,7 +102,7 @@ matrix:

- rust: nightly
env: DESCRIPTION="cross-platform build only"
# Redox: wait for https://github.com/rust-lang/rust/issues/60139
# libc on Redox is broken: see https://github.com/rust-lang/libc/pull/1450
install:
- rustup target add x86_64-sun-solaris
- rustup target add x86_64-unknown-cloudabi
Expand All @@ -115,25 +115,25 @@ matrix:
- rustup component add rust-src
- cargo install cargo-xbuild || true
script:
- cargo build --target=x86_64-sun-solaris --all-features
- cargo build --target=x86_64-unknown-cloudabi --all-features
- cargo build --target=x86_64-unknown-freebsd --all-features
- cargo build --target=x86_64-fuchsia --all-features
- cargo build --target=x86_64-unknown-netbsd --all-features
# - cargo build --target=x86_64-unknown-redox --all-features
- cargo build --target=x86_64-fortanix-unknown-sgx --all-features
- cargo build --target=x86_64-sun-solaris
- cargo build --target=x86_64-unknown-cloudabi
- cargo build --target=x86_64-unknown-freebsd
- cargo build --target=x86_64-fuchsia
- cargo build --target=x86_64-unknown-netbsd
# - cargo build --target=x86_64-unknown-redox
- cargo build --target=x86_64-fortanix-unknown-sgx
- cargo xbuild --target=x86_64-unknown-uefi
- cargo xbuild --target=x86_64-unknown-hermit
- cargo xbuild --target=x86_64-unknown-l4re-uclibc
# also test minimum dependency versions are usable
- cargo generate-lockfile -Z minimal-versions
- cargo build --target=x86_64-sun-solaris --all-features
- cargo build --target=x86_64-unknown-cloudabi --all-features
- cargo build --target=x86_64-unknown-freebsd --all-features
- cargo build --target=x86_64-fuchsia --all-features
- cargo build --target=x86_64-unknown-netbsd --all-features
# - cargo build --target=x86_64-unknown-redox --all-features
- cargo build --target=x86_64-fortanix-unknown-sgx --all-features
- cargo build --target=x86_64-sun-solaris
- cargo build --target=x86_64-unknown-cloudabi
- cargo build --target=x86_64-unknown-freebsd
- cargo build --target=x86_64-fuchsia
- cargo build --target=x86_64-unknown-netbsd
# - cargo build --target=x86_64-unknown-redox
- cargo build --target=x86_64-fortanix-unknown-sgx
- cargo xbuild --target=x86_64-unknown-uefi
- cargo xbuild --target=x86_64-unknown-hermit
- cargo xbuild --target=x86_64-unknown-l4re-uclibc
Expand Down
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ members = ["tests/wasm_bindgen"]
log = { version = "0.4", optional = true }
cfg-if = "0.1"

# When built as part of libstd
compiler_builtins = { version = "0.1", optional = true }
core = { version = "1.0", optional = true, package = "rustc-std-workspace-core" }

[target.'cfg(any(unix, target_os = "redox", target_os = "wasi"))'.dependencies]
libc = "0.2.60"

Expand All @@ -30,3 +34,5 @@ stdweb = { version = "0.4.18", optional = true }

[features]
std = []
# Unstable feature to support being a libstd dependancy
rustc-dep-of-std = ["compiler_builtins", "core"]