2019-01-03 02:05:46 +01:00
|
|
|
# $NetBSD: Makefile,v 1.71 2019/01/03 01:05:46 tnn Exp $
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
|
2018-12-22 00:12:34 +01:00
|
|
|
DISTNAME= rustc-1.31.1-src
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
|
|
|
|
CATEGORIES= lang
|
|
|
|
MASTER_SITES= http://static.rust-lang.org/dist/
|
|
|
|
|
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
2017-09-04 20:08:18 +02:00
|
|
|
HOMEPAGE= https://www.rust-lang.org/
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
COMMENT= Safe, concurrent, practical language
|
|
|
|
LICENSE= mit OR apache-2.0
|
|
|
|
|
|
|
|
USE_GCC_RUNTIME= yes
|
Update to 1.20.0
* Disable SunOS/Solaris support because newer bootstrap is not available
* Include Rust libraries and Cargo
Changelog:
Version 1.20.0 (2017-08-31)
Language
Associated constants are now stabilised.
A lot of macro bugs are now fixed.
Compiler
Struct fields are now properly coerced to the expected field type.
Enabled wasm LLVM backend WASM can now be built with the wasm32-experimental-emscripten target.
Changed some of the error messages to be more helpful.
Add support for RELRO(RELocation Read-Only) for platforms that support it.
rustc now reports the total number of errors on compilation failure previously this was only the number of errors in the pass that failed.
Expansion in rustc has been sped up 29x.
added msp430-none-elf target.
rustc will now suggest one-argument enum variant to fix type mismatch when applicable
Fixes backtraces on Redox
rustc now identifies different versions of same crate when absolute paths of different types match in an error message.
Libraries
Relaxed Debug constraints on {HashMap,BTreeMap}::{Keys,Values}.
Impl PartialEq, Eq, PartialOrd, Ord, Debug, Hash for unsized tuples.
Impl fmt::{Display, Debug} for Ref, RefMut, MutexGuard, RwLockReadGuard, RwLockWriteGuard
Impl Clone for DefaultHasher.
Impl Sync for SyncSender.
Impl FromStr for char
Fixed how {f32, f64}::{is_sign_negative, is_sign_positive} handles NaN.
allow messages in the unimplemented!() macro. ie. unimplemented!("Waiting for 1.21 to be stable")
pub(restricted) is now supported in the thread_local! macro.
Upgrade to Unicode 10.0.0
Reimplemented {f32, f64}::{min, max} in Rust instead of using CMath.
Skip the main thread's manual stack guard on Linux
Iterator::nth for ops::{Range, RangeFrom} is now done in O(1) time
#[repr(align(N))] attribute max number is now 2^31 - 1. This was previously 2^15.
{OsStr, Path}::Display now avoids allocations where possible
Stabilized APIs
CStr::into_c_string
CString::as_c_str
CString::into_boxed_c_str
Chain::get_mut
Chain::get_ref
Chain::into_inner
Option::get_or_insert_with
Option::get_or_insert
OsStr::into_os_string
OsString::into_boxed_os_str
Take::get_mut
Take::get_ref
Utf8Error::error_len
char::EscapeDebug
char::escape_debug
compile_error!
f32::from_bits
f32::to_bits
f64::from_bits
f64::to_bits
mem::ManuallyDrop
slice::sort_unstable_by_key
slice::sort_unstable_by
slice::sort_unstable
str::from_boxed_utf8_unchecked
str::as_bytes_mut
str::as_bytes_mut
str::from_utf8_mut
str::from_utf8_unchecked_mut
str::get_mut
str::get_unchecked_mut
str::get_unchecked
str::get
str::into_boxed_bytes
Cargo
Cargo API token location moved from ~/.cargo/config to ~/.cargo/credentials.
Cargo will now build main.rs binaries that are in sub-directories of src/bin. ie. Having src/bin/server/main.rs and src/bin/client/main.rs generates target/debug/server and target/debug/client
You can now specify version of a binary when installed through cargo install using --vers.
Added --no-fail-fast flag to cargo to run all benchmarks regardless of failure.
Changed the convention around which file is the crate root.
The include/exclude property in Cargo.toml now accepts gitignore paths instead of glob patterns. Glob patterns are now deprecated.
Compatibility Notes
Functions with 'static in their return types will now not be as usable as if they were using lifetime parameters instead.
The reimplementation of {f32, f64}::is_sign_{negative, positive} now takes the sign of NaN into account where previously didn't.
Version 1.19.0 (2017-07-20)
Language
Numeric fields can now be used for creating tuple structs. RFC 1506 For example struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };.
Macro recursion limit increased to 1024 from 64.
Added lint for detecting unused macros.
loop can now return a value with break. RFC 1624 For example: let x = loop { break 7; };
C compatible unions are now available. RFC 1444 They can only contain Copy types and cannot have a Drop implementation. Example: union Foo { bar: u8, baz: usize }
Non capturing closures can now be coerced into fns, RFC 1558 Example: let foo: fn(u8) -> u8 = |v: u8| { v };
Compiler
Add support for bootstrapping the Rust compiler toolchain on Android.
Change arm-linux-androideabi to correspond to the armeabi official ABI. If you wish to continue targeting the armeabi-v7a ABI you should use --target armv7-linux-androideabi.
Fixed ICE when removing a source file between compilation sessions.
Minor optimisation of string operations.
Compiler error message is now aborting due to previous error(s) instead of aborting due to N previous errors This was previously inaccurate and would only count certain kinds of errors.
The compiler now supports Visual Studio 2017
The compiler is now built against LLVM 4.0.1 by default
Added a lot of new error codes
Added target-feature=+crt-static option RFC 1721 Which allows libraries with C Run-time Libraries(CRT) to be statically linked.
Fixed various ARM codegen bugs
Libraries
String now implements FromIterator<Cow<'a, str>> and Extend<Cow<'a, str>>
Vec now implements From<&mut [T]>
Box<[u8]> now implements From<Box<str>>
SplitWhitespace now implements Clone
[u8]::reverse is now 5x faster and [u16]::reverse is now 1.5x faster
eprint! and eprintln! macros added to prelude. Same as the print! macros, but for printing to stderr.
Stabilized APIs
OsString::shrink_to_fit
cmp::Reverse
Command::envs
thread::ThreadId
Cargo
Build scripts can now add environment variables to the environment the crate is being compiled in. Example: println!("cargo:rustc-env=FOO=bar");
Subcommands now replace the current process rather than spawning a new child process
Workspace members can now accept glob file patterns
Added --all flag to the cargo bench subcommand to run benchmarks of all the members in a given workspace.
Updated libssh2-sys to 0.2.6
Target directory path is now in the cargmetadata
Cargo no longer checks out a local working directory for the crates.io index This should provide smaller file size for the registry, and improve cloning times, especially on Windows machines.
Added an --exclude option for excluding certai using the --all option
Cargo will now automatically retry when receiving a 5xx error from crates.io
The --features option now accepts multiple comma or space delimited values.
Added support for custom target specific runners
Misc
Added ow prefer to download rust packages with XZ compression over GZip packages.
Added the ability to escape # in rust documentation By adding additional #'s ie. ## is now #
Compatibility Notes
MutexGuard<T> may only be Sync if T is Sync.
-Z flagning for a year previous to this.
As a result of the -Z flag change, the cargo-check plugin no longer works. Users should migrate to the built-in check command, which has been available since 1.16.
Ending a float literal with ._ is now a hard erro use ::self::foo; is now a hard error. self paths are always relative while the :: prefix makes a path absolute, but was ignored and the path was relative regardless.
Floating point constants in match patterns is now a hard error This was previously ts that don't derive PartialEq & Eq used match patterns is now a hard error This was previously a warning.
Lifetimes named '_ are no longer allowed. This was previously a warning.
From the pound escape, lines consisting of multiple #s are now visible
It is an error to reexport private enum variants. This is known to break a number of crates that depend on an older version of mustache.
On Windows, if VCINSTALLDIR is set incorrectly, rustc will try to use it to find the linker, and the build will fail where it did not previously
Version 1.18.0 (2017-06-08)
Language
Stabilize pub(restricted) pub can now accept a module path to make the item visible to just that module tree. Also accepts the keyword crate to make something public to the whole crate but not users of the library. Example: pub(crate) mod utils;. RFC 1422.
Stabilize #![windows_subsystem] attribute conservative exposure of the /SUBSYSTEM linker flag on Windows platforms. RFC 1665.
Refactor of trait object type parsing Now ty in macros can accept types like Write + Send, trailing + are now supported in trait objects, and better error reporting for trait objects starting with ?Sized.
0e+10 is now a valid floating point literal
Now warns if you bind a lifetime parameter to 'static
Tuples, Enum variant fields, and structs with no repr attribute or with #[repr(Rust)] are reordered to minimize padding and produce a smaller representation in some cases.
Compiler
rustc can now emit mir with --emit mir
Improved LLVM IR for trivial functions
Added explanation for E0090(Wrong number of lifetimes are supplied)
rustc compilation is now 15%-20% faster Thanks to optimisation opportunities found through profiling
Improved backtrace formatting when panicking
Libraries
Specialized Vec::from_iter being passed vec::IntoIter if the iterator hasn't been advanced the original Vec is reassembled with no actual iteration or reallocation.
Simplified HashMap Bucket interface provides performance improvements for iterating and cloning.
Specialize Vec::from_elem to use calloc
Fixed Race condition in fs::create_dir_all
No longer caching stdio on Windows
Optimized insertion sort in slice insertion sort in some cases 2.50%~ faster and in one case now 12.50% faster.
Optimized AtomicBool::fetch_nand
Stabilized APIs
Child::try_wait
HashMap::retain
HashSet::retain
PeekMut::pop
TcpStream::peek
UdpSocket::peek
UdpSocket::peek_from
Cargo
Added partial Pijul support Pijul is a version control system in Rust. You can now create new cargo projects with Pijul using cargo new --vcs pijul
Now always emits build script warnings for crates that fail to build
Added Android build support
Added --bins and --tests flags now you can build all programs of a certain type, for example cargo build --bins will build all binaries.
Added support for haiku
Misc
rustdoc can now use pulldown-cmark with the --enable-commonmark flag
Added rust-winbg script for better debugging on Windows
Rust now uses the official cross compiler for NetBSD
rustdoc now accepts # at the start of files
Fixed jemalloc support for musl
Compatibility Notes
Changes to how the 0 flag works in format! Padding zeroes are now always placed after the sign if it exists and before the digits. With the # flag the zeroes are placed after the prefix and before the digits.
Due to the struct field optimisation, using transmute on structs that have no repr attribute or #[repr(Rust)] will no longer work. This has always been undefined behavior, but is now more likely to break in practice.
The refactor of trait object type parsing fixed a bug where + was receiving the wrong priority parsing things like &for<'a> Tr<'a> + Send as &(for<'a> Tr<'a> + Send) instead of (&for<'a> Tr<'a>) + Send
Overlapping inherent impls are now a hard error
PartialOrd and Ord must agree on the ordering.
rustc main.rs -o out --emit=asm,llvm-ir Now will output out.asm and out.ll instead of only one of the filetypes.
calling a function that returns Self will no longer work when the size of Self cannot be statically determined.
rustc now builds with a "pthreads" flavour of MinGW for Windows GNU this has caused a few regressions namely:
Changed the link order of local static/dynamic libraries (respecting the order on given rather than having the compiler reorder).
Changed how MinGW is linked, native code linked to dynamic libraries may require manually linking to the gcc support library (for the native code itself)
Version 1.17.0 (2017-04-27)
Language
The lifetime of statics and consts defaults to 'static. RFC 1623
Fields of structs may be initialized without duplicating the field/variable names. RFC 1682
Self may be included in the where clause of impls. RFC 1647
When coercing to an unsized type lifetimes must be equal. That is, there is no subtyping between T and U when T: Unsize<U>. For example, coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
Values passed to the indexing operator, [], automatically coerce
Static variables may contain references to other statics
Compiler
Exit quickly on only --emit dep-info
Make -C relocation-model more correctly determine whether the linker creates a position-independent executable
Add -C overflow-checks to directly control whether integer overflow panics
The rustc type checker now checks items on demand instead of in a single in-order pass. This is mostly an internal refactoring in support of future work, including incremental type checking, but also resolves RFC 1647, allowing Self to appear in impl where clauses.
Optimize vtable loads
Turn off vectorization for Emscripten targets
Provide suggestions for unknown macros imported with use
Fix ICEs in path resolution
Strip exception handling code on Emscripten when panic=abort
Add clearer error message using &str + &str
Stabilized APIs
Arc::into_raw
Arc::from_raw
Arc::ptr_eq
Rc::into_raw
Rc::from_raw
Rc::ptr_eq
Ordering::then
Ordering::then_with
BTreeMap::range
BTreeMap::range_mut
collections::Bound
process::abort
ptr::read_unaligned
ptr::write_unaligned
Result::expect_err
Cell::swap
Cell::replace
Cell::into_inner
Cell::take
Libraries
BTreeMap and BTreeSet can iterate over ranges
Cell can store non-Copy types. RFC 1651
String implements FromIterator<&char>
Box implements a number of new conversions: From<Box<str>> for String, From<Box<[T]>> for Vec<T>, From<Box<CStr>> for CString, From<Box<OsStr>> for OsString, From<Box<Path>> for PathBuf, Into<Box<str>> for String, Into<Box<[T]>> for Vec<T>, Into<Box<CStr>> for CString, Into<Box<OsStr>> for OsString, Into<Box<Path>> for PathBuf, Default for Box<str>, Default for Box<CStr>, Default for Box<OsStr>, From<&CStr> for Box<CStr>, From<&OsStr> for Box<OsStr>, From<&Path> for Box<Path>
ffi::FromBytesWithNulError implements Error and Display
Specialize PartialOrd<A> for [A] where A: Ord
Slightly optimize slice::sort
Add ToString trait specialization for Cow<'a, str> and String
Box<[T]> implements From<&[T]> where T: Copy, Box<str> implements From<&str>
IpAddr implements From for various arrays. SocketAddr implements From<(I, u16)> where I: Into<IpAddr>
format! estimates the needed capacity before writing a string
Support unprivileged symlink creation in Windows
PathBuf implements Default
Implement PartialEq<[A]> for VecDeque<A>
HashMap resizes adaptively to guard against DOS attacks and poor hash functions.
Cargo
Add cargo check --all
Add an option to ignore SSL revocation checking
Add cargo run --package
Add required_features
Assume build.rs is a build script
Find workspace via workspace_root link in containing member
Misc
Documentation is rendered with mdbook instead of the obsolete, in-tree rustbook
The "Unstable Book" documents nightly-only features
Improve the style of the sidebar in rustdoc output
Configure build correctly on 64-bit CPU's with the armhf ABI
Fix MSP430 breakage due to i128
Preliminary Solaris/SPARCv9 support
rustc is linked statically on Windows MSVC targets, allowing it to run without installing the MSVC runtime.
rustdoc --test includes file names in test names
This release includes builds of std for sparc64-unknown-linux-gnu, aarch64-unknown-linux-fuchsia, and x86_64-unknown-linux-fuchsia.
Initial support for aarch64-unknown-freebsd
Initial support for i686-unknown-netbsd
This release no longer includes the old makefile build system. Rust is built with a custom build system, written in Rust, and with Cargo.
Add Debug implementations for libcollection structs
TypeId implements PartialOrd and Ord
--test-threads=0 produces an error
rustup installs documentation by default
The Rust source includes NatVis visualizations. These can be used by WinDbg and Visual Studio to improve the debugging experience.
Compatibility Notes
Rust 1.17 does not correctly detect the MSVC 2017 linker. As a workaround, either use MSVC 2015 or run vcvars.bat.
When coercing to an unsized type lifetimes must be equal. That is, disallow subtyping between T and U when T: Unsize<U>, e.g. coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
format! and Display::to_string panic if an underlying formatting implementation returns an error. Previously the error was silently ignored. It is incorrect for write_fmt to return an error when writing to a string.
In-tree crates are verified to be unstable. Previously, some minor crates were marked stable and could be accessed from the stable toolchain.
Rust git source no longer includes vendored crates. Those that need to build with vendored crates should build from release tarballs.
Fix inert attributes from proc_macro_derives
During crate resolution, rustc prefers a crate in the sysroot if two crates are otherwise identical. Unlikely to be encountered outside the Rust build system.
Fixed bugs around how type inference interacts with dead-code. The existing code generally ignores the type of dead-code unless a type-hint is provided; this can cause surprising inference interactions particularly around defaulting. The new code uniformly ignores the result type of dead-code.
Tuple-struct constructors with private fields are no longer visible
Lifetime parameters that do not appear in the arguments are now considered early-bound, resolving a soundness bug (#32330). The hr_lifetime_in_assoc_type future-compatibility lint has been in effect since April of 2016.
rustdoc: fix doctests with non-feature crate attributes
Make transmuting from fn item types to pointer-sized types a hard error
2017-09-30 06:42:43 +02:00
|
|
|
USE_LANGUAGES= c c++11
|
2017-11-16 20:48:24 +01:00
|
|
|
USE_LIBTOOL= yes
|
2018-10-17 10:39:13 +02:00
|
|
|
USE_TOOLS+= bash ggrep gmake perl:build pkg-config
|
2017-12-04 15:49:53 +01:00
|
|
|
# For internal llvm
|
|
|
|
BUILD_DEPENDS+= cmake-[0-9]*:../../devel/cmake
|
2017-02-23 10:35:16 +01:00
|
|
|
|
2017-11-16 20:48:24 +01:00
|
|
|
HAS_CONFIGURE= yes
|
2018-11-27 16:45:23 +01:00
|
|
|
CONFIG_SHELL= ${PYTHONBIN}
|
|
|
|
CONFIGURE_SCRIPT= src/bootstrap/configure.py
|
2017-11-16 20:48:24 +01:00
|
|
|
CONFIGURE_ARGS+= --prefix=${PREFIX}
|
|
|
|
CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}
|
|
|
|
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
|
|
|
|
CONFIGURE_ARGS+= --python=${PYTHONBIN}
|
|
|
|
CONFIGURE_ARGS+= --release-channel=stable
|
2017-11-28 01:07:27 +01:00
|
|
|
#CONFIGURE_ARGS+= --enable-local-rust
|
2017-11-16 20:48:24 +01:00
|
|
|
CONFIGURE_ARGS+= --local-rust-root=${RUST_BOOTSTRAP_PATH}
|
|
|
|
CONFIGURE_ARGS+= --enable-extended # Build and install cargo too.
|
|
|
|
CONFIGURE_ARGS+= --enable-rpath
|
|
|
|
CONFIGURE_ARGS+= --disable-codegen-tests
|
|
|
|
CONFIGURE_ARGS+= --disable-dist-src
|
|
|
|
CONFIGURE_ARGS+= --disable-llvm-static-stdcpp
|
|
|
|
CONFIGURE_ARGS+= --disable-ninja
|
2018-11-27 16:45:23 +01:00
|
|
|
# XXX: to be enabled in the future
|
|
|
|
#CONFIGURE_ARGS+= --jemalloc-root=${BUILDLINK_PREFIX.jemalloc}/lib
|
|
|
|
#CONFIGURE_ARGS+= --enable-llvm-link-shared
|
|
|
|
#CONFIGURE_ARGS+= --llvm-root=${BUILDLINK_PREFIX.llvm}
|
2018-07-06 10:22:53 +02:00
|
|
|
CONFIGURE_ARGS.SunOS+= --disable-jemalloc
|
2017-11-16 20:48:24 +01:00
|
|
|
|
2018-12-22 00:12:34 +01:00
|
|
|
# Use "dist" build target for cross compile of bootstrap
|
|
|
|
#BUILD_TARGET= dist
|
|
|
|
BUILD_TARGET= build
|
|
|
|
|
2018-10-13 12:03:36 +02:00
|
|
|
# The gcc-wrap / c++-wrap script takes CROSS_ROOT environment variable
|
|
|
|
# to do a cross-build. The wrapper script assumes dest/ and tools/
|
|
|
|
# as a result of a cross-build as subdirectories of this root
|
2018-10-15 13:22:23 +02:00
|
|
|
#CROSS_ROOT= /u/evbarm-armv7hf
|
2018-10-28 14:21:36 +01:00
|
|
|
#CROSS_ROOT= /u/sparc64
|
|
|
|
#CROSS_ROOT= /u/macppc
|
2018-10-13 12:03:36 +02:00
|
|
|
#MAKE_ENV+= CROSS_ROOT=${CROSS_ROOT}
|
|
|
|
|
|
|
|
# The GNU cross target designation
|
2018-10-15 13:22:23 +02:00
|
|
|
#GNU_CROSS_TARGET= armv7--netbsdelf-eabihf
|
2018-10-28 14:21:36 +01:00
|
|
|
#GNU_CROSS_TARGET= sparc64--netbsd
|
|
|
|
#GNU_CROSS_TARGET= powerpc--netbsd
|
2018-12-22 00:12:34 +01:00
|
|
|
#MAKE_ENV+= GNU_CROSS_TARGET=${GNU_CROSS_TARGET}
|
2018-10-13 12:03:36 +02:00
|
|
|
|
|
|
|
# To cross-build rust, you need to specify
|
|
|
|
# the ultimate target to built for, as well as the
|
|
|
|
# host the compiler is supposed to run on.
|
|
|
|
# Rust's target designation
|
2018-12-22 00:12:34 +01:00
|
|
|
#TARGET= armv7-unknown-netbsd-eabihf
|
|
|
|
#TARGET= sparc64-unknown-netbsd
|
|
|
|
#TARGET= powerpc-unknown-netbsd
|
2018-10-18 17:35:49 +02:00
|
|
|
#SCRIPTS= ${WRKDIR}/scripts
|
2018-10-13 12:03:36 +02:00
|
|
|
#CONFIGURE_ARGS+= --host=${TARGET}
|
|
|
|
#CONFIGURE_ARGS+= --target=${TARGET}
|
2018-10-18 17:35:49 +02:00
|
|
|
#CONFIGURE_ARGS+= --set=target.${TARGET}.cc=${SCRIPTS}/gcc-wrap
|
|
|
|
#CONFIGURE_ARGS+= --set=target.${TARGET}.cxx=${SCRIPTS}/c++-wrap
|
|
|
|
#CONFIGURE_ARGS+= --set=target.${TARGET}.linker=${SCRIPTS}/gcc-wrap
|
2018-10-13 13:46:47 +02:00
|
|
|
#CONFIGURE_ARGS+= --set=target.${TARGET}.ar=${CROSS_ROOT}/tools/bin/${GNU_CROSS_TARGET}-ar
|
2018-10-13 12:03:36 +02:00
|
|
|
|
|
|
|
# May be required when cross-building on NetBSD
|
|
|
|
#MAKE_ENV+= OPENSSL_DIR=/usr
|
|
|
|
|
2018-11-27 16:45:23 +01:00
|
|
|
# Getting RPATH with $ORIGIN into bootstrap may be troublesome, so
|
2018-10-13 12:03:36 +02:00
|
|
|
# uncommenting the LD_LIBRARY_PATH setting may be required to run
|
|
|
|
# the bootstrap
|
2018-10-18 13:49:46 +02:00
|
|
|
MAKE_ENV+= LD_LIBRARY_PATH=${WRKDIR}/rust-bootstrap/lib
|
2018-10-13 12:03:36 +02:00
|
|
|
|
|
|
|
.if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc)
|
|
|
|
# Bootstrapping on NetBSD/powerpc requires no debug-info from rustc
|
|
|
|
# (both for amd64->powerpc built and powerpc->powerpc built bootstrap bits)
|
|
|
|
CONFIGURE_ARGS+= --disable-debug
|
|
|
|
CONFIGURE_ARGS+= --disable-debuginfo-tests
|
|
|
|
CONFIGURE_ARGS+= --disable-debug-assertions
|
|
|
|
CONFIGURE_ARGS+= --disable-debuginfo
|
|
|
|
CONFIGURE_ARGS+= --disable-debuginfo-lines
|
|
|
|
CONFIGURE_ARGS+= --disable-debuginfo-only-std
|
|
|
|
CONFIGURE_ARGS+= --disable-debuginfo-tools
|
|
|
|
.endif
|
|
|
|
|
2017-11-16 20:48:24 +01:00
|
|
|
# This should allow us to perform "offline" builds (so cargo doesn't fetch
|
|
|
|
# dependencies during the build stage) but this isn't hooked up yet.
|
|
|
|
CONFIGURE_ARGS+= --enable-vendor
|
|
|
|
|
2018-07-06 10:22:53 +02:00
|
|
|
# cargo defaults to using the number of available CPUs
|
|
|
|
MAKE_ENV+= CARGO_BUILD_JOBS=${MAKE_JOBS:U1}
|
|
|
|
|
2018-10-31 16:53:17 +01:00
|
|
|
CFLAGS.SunOS+= -D_POSIX_PTHREAD_SEMANTICS
|
|
|
|
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
UNLIMIT_RESOURCES+= cputime
|
|
|
|
|
|
|
|
TEST_TARGET= check
|
|
|
|
|
2017-10-07 15:08:37 +02:00
|
|
|
# bin/* lib/*, but names vary
|
|
|
|
CHECK_RELRO_SUPPORTED= no
|
2017-11-16 20:48:24 +01:00
|
|
|
CHECK_SSP_SUPPORTED= no
|
2017-10-07 15:08:37 +02:00
|
|
|
|
2018-09-14 12:04:43 +02:00
|
|
|
CHECK_PORTABILITY_SKIP+= src/vendor/openssl-src/openssl/.travis-create-release.sh
|
|
|
|
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
# Required for LLVM (-std=c++11)
|
|
|
|
GCC_REQD+= 4.8
|
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
2016-09-12 15:27:33 +02:00
|
|
|
#
|
|
|
|
# Under NetBSD, do not use DT_RUNPATH
|
|
|
|
#
|
2016-09-13 14:37:08 +02:00
|
|
|
BUILDLINK_TRANSFORM.NetBSD+= rm:-Wl,--enable-new-dtags
|
2016-09-12 15:27:33 +02:00
|
|
|
|
2018-10-08 01:12:49 +02:00
|
|
|
.PHONY: pre-build-fix
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
#
|
|
|
|
# Rust unfortunately requires itself to build. On platforms which aren't
|
2017-02-23 10:35:16 +01:00
|
|
|
# supported by upstream (where they offer binary bootstraps), or where we do
|
|
|
|
# not trust random binaries from the Internet, we need to build and provide our
|
|
|
|
# own bootstrap. See the stage0-bootstrap below for more details.
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
#
|
2017-02-23 10:35:16 +01:00
|
|
|
DISTFILES:= ${DEFAULT_DISTFILES}
|
2018-12-08 08:24:54 +01:00
|
|
|
RUST_STAGE0_VER= 1.30.1
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
#
|
2017-02-23 10:35:16 +01:00
|
|
|
.if !empty(MACHINE_PLATFORM:MDarwin-*-i386) || make(distinfo) || make (makesum) || make(mdi)
|
2018-12-08 08:24:54 +01:00
|
|
|
RUST_STAGE0_VER= 1.30.1
|
2017-02-23 10:35:16 +01:00
|
|
|
RUST_ARCH:= i686-apple-darwin
|
|
|
|
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
Update to 1.20.0
* Disable SunOS/Solaris support because newer bootstrap is not available
* Include Rust libraries and Cargo
Changelog:
Version 1.20.0 (2017-08-31)
Language
Associated constants are now stabilised.
A lot of macro bugs are now fixed.
Compiler
Struct fields are now properly coerced to the expected field type.
Enabled wasm LLVM backend WASM can now be built with the wasm32-experimental-emscripten target.
Changed some of the error messages to be more helpful.
Add support for RELRO(RELocation Read-Only) for platforms that support it.
rustc now reports the total number of errors on compilation failure previously this was only the number of errors in the pass that failed.
Expansion in rustc has been sped up 29x.
added msp430-none-elf target.
rustc will now suggest one-argument enum variant to fix type mismatch when applicable
Fixes backtraces on Redox
rustc now identifies different versions of same crate when absolute paths of different types match in an error message.
Libraries
Relaxed Debug constraints on {HashMap,BTreeMap}::{Keys,Values}.
Impl PartialEq, Eq, PartialOrd, Ord, Debug, Hash for unsized tuples.
Impl fmt::{Display, Debug} for Ref, RefMut, MutexGuard, RwLockReadGuard, RwLockWriteGuard
Impl Clone for DefaultHasher.
Impl Sync for SyncSender.
Impl FromStr for char
Fixed how {f32, f64}::{is_sign_negative, is_sign_positive} handles NaN.
allow messages in the unimplemented!() macro. ie. unimplemented!("Waiting for 1.21 to be stable")
pub(restricted) is now supported in the thread_local! macro.
Upgrade to Unicode 10.0.0
Reimplemented {f32, f64}::{min, max} in Rust instead of using CMath.
Skip the main thread's manual stack guard on Linux
Iterator::nth for ops::{Range, RangeFrom} is now done in O(1) time
#[repr(align(N))] attribute max number is now 2^31 - 1. This was previously 2^15.
{OsStr, Path}::Display now avoids allocations where possible
Stabilized APIs
CStr::into_c_string
CString::as_c_str
CString::into_boxed_c_str
Chain::get_mut
Chain::get_ref
Chain::into_inner
Option::get_or_insert_with
Option::get_or_insert
OsStr::into_os_string
OsString::into_boxed_os_str
Take::get_mut
Take::get_ref
Utf8Error::error_len
char::EscapeDebug
char::escape_debug
compile_error!
f32::from_bits
f32::to_bits
f64::from_bits
f64::to_bits
mem::ManuallyDrop
slice::sort_unstable_by_key
slice::sort_unstable_by
slice::sort_unstable
str::from_boxed_utf8_unchecked
str::as_bytes_mut
str::as_bytes_mut
str::from_utf8_mut
str::from_utf8_unchecked_mut
str::get_mut
str::get_unchecked_mut
str::get_unchecked
str::get
str::into_boxed_bytes
Cargo
Cargo API token location moved from ~/.cargo/config to ~/.cargo/credentials.
Cargo will now build main.rs binaries that are in sub-directories of src/bin. ie. Having src/bin/server/main.rs and src/bin/client/main.rs generates target/debug/server and target/debug/client
You can now specify version of a binary when installed through cargo install using --vers.
Added --no-fail-fast flag to cargo to run all benchmarks regardless of failure.
Changed the convention around which file is the crate root.
The include/exclude property in Cargo.toml now accepts gitignore paths instead of glob patterns. Glob patterns are now deprecated.
Compatibility Notes
Functions with 'static in their return types will now not be as usable as if they were using lifetime parameters instead.
The reimplementation of {f32, f64}::is_sign_{negative, positive} now takes the sign of NaN into account where previously didn't.
Version 1.19.0 (2017-07-20)
Language
Numeric fields can now be used for creating tuple structs. RFC 1506 For example struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };.
Macro recursion limit increased to 1024 from 64.
Added lint for detecting unused macros.
loop can now return a value with break. RFC 1624 For example: let x = loop { break 7; };
C compatible unions are now available. RFC 1444 They can only contain Copy types and cannot have a Drop implementation. Example: union Foo { bar: u8, baz: usize }
Non capturing closures can now be coerced into fns, RFC 1558 Example: let foo: fn(u8) -> u8 = |v: u8| { v };
Compiler
Add support for bootstrapping the Rust compiler toolchain on Android.
Change arm-linux-androideabi to correspond to the armeabi official ABI. If you wish to continue targeting the armeabi-v7a ABI you should use --target armv7-linux-androideabi.
Fixed ICE when removing a source file between compilation sessions.
Minor optimisation of string operations.
Compiler error message is now aborting due to previous error(s) instead of aborting due to N previous errors This was previously inaccurate and would only count certain kinds of errors.
The compiler now supports Visual Studio 2017
The compiler is now built against LLVM 4.0.1 by default
Added a lot of new error codes
Added target-feature=+crt-static option RFC 1721 Which allows libraries with C Run-time Libraries(CRT) to be statically linked.
Fixed various ARM codegen bugs
Libraries
String now implements FromIterator<Cow<'a, str>> and Extend<Cow<'a, str>>
Vec now implements From<&mut [T]>
Box<[u8]> now implements From<Box<str>>
SplitWhitespace now implements Clone
[u8]::reverse is now 5x faster and [u16]::reverse is now 1.5x faster
eprint! and eprintln! macros added to prelude. Same as the print! macros, but for printing to stderr.
Stabilized APIs
OsString::shrink_to_fit
cmp::Reverse
Command::envs
thread::ThreadId
Cargo
Build scripts can now add environment variables to the environment the crate is being compiled in. Example: println!("cargo:rustc-env=FOO=bar");
Subcommands now replace the current process rather than spawning a new child process
Workspace members can now accept glob file patterns
Added --all flag to the cargo bench subcommand to run benchmarks of all the members in a given workspace.
Updated libssh2-sys to 0.2.6
Target directory path is now in the cargmetadata
Cargo no longer checks out a local working directory for the crates.io index This should provide smaller file size for the registry, and improve cloning times, especially on Windows machines.
Added an --exclude option for excluding certai using the --all option
Cargo will now automatically retry when receiving a 5xx error from crates.io
The --features option now accepts multiple comma or space delimited values.
Added support for custom target specific runners
Misc
Added ow prefer to download rust packages with XZ compression over GZip packages.
Added the ability to escape # in rust documentation By adding additional #'s ie. ## is now #
Compatibility Notes
MutexGuard<T> may only be Sync if T is Sync.
-Z flagning for a year previous to this.
As a result of the -Z flag change, the cargo-check plugin no longer works. Users should migrate to the built-in check command, which has been available since 1.16.
Ending a float literal with ._ is now a hard erro use ::self::foo; is now a hard error. self paths are always relative while the :: prefix makes a path absolute, but was ignored and the path was relative regardless.
Floating point constants in match patterns is now a hard error This was previously ts that don't derive PartialEq & Eq used match patterns is now a hard error This was previously a warning.
Lifetimes named '_ are no longer allowed. This was previously a warning.
From the pound escape, lines consisting of multiple #s are now visible
It is an error to reexport private enum variants. This is known to break a number of crates that depend on an older version of mustache.
On Windows, if VCINSTALLDIR is set incorrectly, rustc will try to use it to find the linker, and the build will fail where it did not previously
Version 1.18.0 (2017-06-08)
Language
Stabilize pub(restricted) pub can now accept a module path to make the item visible to just that module tree. Also accepts the keyword crate to make something public to the whole crate but not users of the library. Example: pub(crate) mod utils;. RFC 1422.
Stabilize #![windows_subsystem] attribute conservative exposure of the /SUBSYSTEM linker flag on Windows platforms. RFC 1665.
Refactor of trait object type parsing Now ty in macros can accept types like Write + Send, trailing + are now supported in trait objects, and better error reporting for trait objects starting with ?Sized.
0e+10 is now a valid floating point literal
Now warns if you bind a lifetime parameter to 'static
Tuples, Enum variant fields, and structs with no repr attribute or with #[repr(Rust)] are reordered to minimize padding and produce a smaller representation in some cases.
Compiler
rustc can now emit mir with --emit mir
Improved LLVM IR for trivial functions
Added explanation for E0090(Wrong number of lifetimes are supplied)
rustc compilation is now 15%-20% faster Thanks to optimisation opportunities found through profiling
Improved backtrace formatting when panicking
Libraries
Specialized Vec::from_iter being passed vec::IntoIter if the iterator hasn't been advanced the original Vec is reassembled with no actual iteration or reallocation.
Simplified HashMap Bucket interface provides performance improvements for iterating and cloning.
Specialize Vec::from_elem to use calloc
Fixed Race condition in fs::create_dir_all
No longer caching stdio on Windows
Optimized insertion sort in slice insertion sort in some cases 2.50%~ faster and in one case now 12.50% faster.
Optimized AtomicBool::fetch_nand
Stabilized APIs
Child::try_wait
HashMap::retain
HashSet::retain
PeekMut::pop
TcpStream::peek
UdpSocket::peek
UdpSocket::peek_from
Cargo
Added partial Pijul support Pijul is a version control system in Rust. You can now create new cargo projects with Pijul using cargo new --vcs pijul
Now always emits build script warnings for crates that fail to build
Added Android build support
Added --bins and --tests flags now you can build all programs of a certain type, for example cargo build --bins will build all binaries.
Added support for haiku
Misc
rustdoc can now use pulldown-cmark with the --enable-commonmark flag
Added rust-winbg script for better debugging on Windows
Rust now uses the official cross compiler for NetBSD
rustdoc now accepts # at the start of files
Fixed jemalloc support for musl
Compatibility Notes
Changes to how the 0 flag works in format! Padding zeroes are now always placed after the sign if it exists and before the digits. With the # flag the zeroes are placed after the prefix and before the digits.
Due to the struct field optimisation, using transmute on structs that have no repr attribute or #[repr(Rust)] will no longer work. This has always been undefined behavior, but is now more likely to break in practice.
The refactor of trait object type parsing fixed a bug where + was receiving the wrong priority parsing things like &for<'a> Tr<'a> + Send as &(for<'a> Tr<'a> + Send) instead of (&for<'a> Tr<'a>) + Send
Overlapping inherent impls are now a hard error
PartialOrd and Ord must agree on the ordering.
rustc main.rs -o out --emit=asm,llvm-ir Now will output out.asm and out.ll instead of only one of the filetypes.
calling a function that returns Self will no longer work when the size of Self cannot be statically determined.
rustc now builds with a "pthreads" flavour of MinGW for Windows GNU this has caused a few regressions namely:
Changed the link order of local static/dynamic libraries (respecting the order on given rather than having the compiler reorder).
Changed how MinGW is linked, native code linked to dynamic libraries may require manually linking to the gcc support library (for the native code itself)
Version 1.17.0 (2017-04-27)
Language
The lifetime of statics and consts defaults to 'static. RFC 1623
Fields of structs may be initialized without duplicating the field/variable names. RFC 1682
Self may be included in the where clause of impls. RFC 1647
When coercing to an unsized type lifetimes must be equal. That is, there is no subtyping between T and U when T: Unsize<U>. For example, coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
Values passed to the indexing operator, [], automatically coerce
Static variables may contain references to other statics
Compiler
Exit quickly on only --emit dep-info
Make -C relocation-model more correctly determine whether the linker creates a position-independent executable
Add -C overflow-checks to directly control whether integer overflow panics
The rustc type checker now checks items on demand instead of in a single in-order pass. This is mostly an internal refactoring in support of future work, including incremental type checking, but also resolves RFC 1647, allowing Self to appear in impl where clauses.
Optimize vtable loads
Turn off vectorization for Emscripten targets
Provide suggestions for unknown macros imported with use
Fix ICEs in path resolution
Strip exception handling code on Emscripten when panic=abort
Add clearer error message using &str + &str
Stabilized APIs
Arc::into_raw
Arc::from_raw
Arc::ptr_eq
Rc::into_raw
Rc::from_raw
Rc::ptr_eq
Ordering::then
Ordering::then_with
BTreeMap::range
BTreeMap::range_mut
collections::Bound
process::abort
ptr::read_unaligned
ptr::write_unaligned
Result::expect_err
Cell::swap
Cell::replace
Cell::into_inner
Cell::take
Libraries
BTreeMap and BTreeSet can iterate over ranges
Cell can store non-Copy types. RFC 1651
String implements FromIterator<&char>
Box implements a number of new conversions: From<Box<str>> for String, From<Box<[T]>> for Vec<T>, From<Box<CStr>> for CString, From<Box<OsStr>> for OsString, From<Box<Path>> for PathBuf, Into<Box<str>> for String, Into<Box<[T]>> for Vec<T>, Into<Box<CStr>> for CString, Into<Box<OsStr>> for OsString, Into<Box<Path>> for PathBuf, Default for Box<str>, Default for Box<CStr>, Default for Box<OsStr>, From<&CStr> for Box<CStr>, From<&OsStr> for Box<OsStr>, From<&Path> for Box<Path>
ffi::FromBytesWithNulError implements Error and Display
Specialize PartialOrd<A> for [A] where A: Ord
Slightly optimize slice::sort
Add ToString trait specialization for Cow<'a, str> and String
Box<[T]> implements From<&[T]> where T: Copy, Box<str> implements From<&str>
IpAddr implements From for various arrays. SocketAddr implements From<(I, u16)> where I: Into<IpAddr>
format! estimates the needed capacity before writing a string
Support unprivileged symlink creation in Windows
PathBuf implements Default
Implement PartialEq<[A]> for VecDeque<A>
HashMap resizes adaptively to guard against DOS attacks and poor hash functions.
Cargo
Add cargo check --all
Add an option to ignore SSL revocation checking
Add cargo run --package
Add required_features
Assume build.rs is a build script
Find workspace via workspace_root link in containing member
Misc
Documentation is rendered with mdbook instead of the obsolete, in-tree rustbook
The "Unstable Book" documents nightly-only features
Improve the style of the sidebar in rustdoc output
Configure build correctly on 64-bit CPU's with the armhf ABI
Fix MSP430 breakage due to i128
Preliminary Solaris/SPARCv9 support
rustc is linked statically on Windows MSVC targets, allowing it to run without installing the MSVC runtime.
rustdoc --test includes file names in test names
This release includes builds of std for sparc64-unknown-linux-gnu, aarch64-unknown-linux-fuchsia, and x86_64-unknown-linux-fuchsia.
Initial support for aarch64-unknown-freebsd
Initial support for i686-unknown-netbsd
This release no longer includes the old makefile build system. Rust is built with a custom build system, written in Rust, and with Cargo.
Add Debug implementations for libcollection structs
TypeId implements PartialOrd and Ord
--test-threads=0 produces an error
rustup installs documentation by default
The Rust source includes NatVis visualizations. These can be used by WinDbg and Visual Studio to improve the debugging experience.
Compatibility Notes
Rust 1.17 does not correctly detect the MSVC 2017 linker. As a workaround, either use MSVC 2015 or run vcvars.bat.
When coercing to an unsized type lifetimes must be equal. That is, disallow subtyping between T and U when T: Unsize<U>, e.g. coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
format! and Display::to_string panic if an underlying formatting implementation returns an error. Previously the error was silently ignored. It is incorrect for write_fmt to return an error when writing to a string.
In-tree crates are verified to be unstable. Previously, some minor crates were marked stable and could be accessed from the stable toolchain.
Rust git source no longer includes vendored crates. Those that need to build with vendored crates should build from release tarballs.
Fix inert attributes from proc_macro_derives
During crate resolution, rustc prefers a crate in the sysroot if two crates are otherwise identical. Unlikely to be encountered outside the Rust build system.
Fixed bugs around how type inference interacts with dead-code. The existing code generally ignores the type of dead-code unless a type-hint is provided; this can cause surprising inference interactions particularly around defaulting. The new code uniformly ignores the result type of dead-code.
Tuple-struct constructors with private fields are no longer visible
Lifetime parameters that do not appear in the arguments are now considered early-bound, resolving a soundness bug (#32330). The hr_lifetime_in_assoc_type future-compatibility lint has been in effect since April of 2016.
rustdoc: fix doctests with non-feature crate attributes
Make transmuting from fn item types to pointer-sized types a hard error
2017-09-30 06:42:43 +02:00
|
|
|
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
|
|
|
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
|
2018-10-08 01:12:49 +02:00
|
|
|
pre-build-fix:
|
2017-02-23 10:35:16 +01:00
|
|
|
.endif
|
|
|
|
.if !empty(MACHINE_PLATFORM:MDarwin-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
|
2018-12-08 08:24:54 +01:00
|
|
|
RUST_STAGE0_VER= 1.30.1
|
2017-02-23 10:35:16 +01:00
|
|
|
RUST_ARCH:= x86_64-apple-darwin
|
|
|
|
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
Update to 1.20.0
* Disable SunOS/Solaris support because newer bootstrap is not available
* Include Rust libraries and Cargo
Changelog:
Version 1.20.0 (2017-08-31)
Language
Associated constants are now stabilised.
A lot of macro bugs are now fixed.
Compiler
Struct fields are now properly coerced to the expected field type.
Enabled wasm LLVM backend WASM can now be built with the wasm32-experimental-emscripten target.
Changed some of the error messages to be more helpful.
Add support for RELRO(RELocation Read-Only) for platforms that support it.
rustc now reports the total number of errors on compilation failure previously this was only the number of errors in the pass that failed.
Expansion in rustc has been sped up 29x.
added msp430-none-elf target.
rustc will now suggest one-argument enum variant to fix type mismatch when applicable
Fixes backtraces on Redox
rustc now identifies different versions of same crate when absolute paths of different types match in an error message.
Libraries
Relaxed Debug constraints on {HashMap,BTreeMap}::{Keys,Values}.
Impl PartialEq, Eq, PartialOrd, Ord, Debug, Hash for unsized tuples.
Impl fmt::{Display, Debug} for Ref, RefMut, MutexGuard, RwLockReadGuard, RwLockWriteGuard
Impl Clone for DefaultHasher.
Impl Sync for SyncSender.
Impl FromStr for char
Fixed how {f32, f64}::{is_sign_negative, is_sign_positive} handles NaN.
allow messages in the unimplemented!() macro. ie. unimplemented!("Waiting for 1.21 to be stable")
pub(restricted) is now supported in the thread_local! macro.
Upgrade to Unicode 10.0.0
Reimplemented {f32, f64}::{min, max} in Rust instead of using CMath.
Skip the main thread's manual stack guard on Linux
Iterator::nth for ops::{Range, RangeFrom} is now done in O(1) time
#[repr(align(N))] attribute max number is now 2^31 - 1. This was previously 2^15.
{OsStr, Path}::Display now avoids allocations where possible
Stabilized APIs
CStr::into_c_string
CString::as_c_str
CString::into_boxed_c_str
Chain::get_mut
Chain::get_ref
Chain::into_inner
Option::get_or_insert_with
Option::get_or_insert
OsStr::into_os_string
OsString::into_boxed_os_str
Take::get_mut
Take::get_ref
Utf8Error::error_len
char::EscapeDebug
char::escape_debug
compile_error!
f32::from_bits
f32::to_bits
f64::from_bits
f64::to_bits
mem::ManuallyDrop
slice::sort_unstable_by_key
slice::sort_unstable_by
slice::sort_unstable
str::from_boxed_utf8_unchecked
str::as_bytes_mut
str::as_bytes_mut
str::from_utf8_mut
str::from_utf8_unchecked_mut
str::get_mut
str::get_unchecked_mut
str::get_unchecked
str::get
str::into_boxed_bytes
Cargo
Cargo API token location moved from ~/.cargo/config to ~/.cargo/credentials.
Cargo will now build main.rs binaries that are in sub-directories of src/bin. ie. Having src/bin/server/main.rs and src/bin/client/main.rs generates target/debug/server and target/debug/client
You can now specify version of a binary when installed through cargo install using --vers.
Added --no-fail-fast flag to cargo to run all benchmarks regardless of failure.
Changed the convention around which file is the crate root.
The include/exclude property in Cargo.toml now accepts gitignore paths instead of glob patterns. Glob patterns are now deprecated.
Compatibility Notes
Functions with 'static in their return types will now not be as usable as if they were using lifetime parameters instead.
The reimplementation of {f32, f64}::is_sign_{negative, positive} now takes the sign of NaN into account where previously didn't.
Version 1.19.0 (2017-07-20)
Language
Numeric fields can now be used for creating tuple structs. RFC 1506 For example struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };.
Macro recursion limit increased to 1024 from 64.
Added lint for detecting unused macros.
loop can now return a value with break. RFC 1624 For example: let x = loop { break 7; };
C compatible unions are now available. RFC 1444 They can only contain Copy types and cannot have a Drop implementation. Example: union Foo { bar: u8, baz: usize }
Non capturing closures can now be coerced into fns, RFC 1558 Example: let foo: fn(u8) -> u8 = |v: u8| { v };
Compiler
Add support for bootstrapping the Rust compiler toolchain on Android.
Change arm-linux-androideabi to correspond to the armeabi official ABI. If you wish to continue targeting the armeabi-v7a ABI you should use --target armv7-linux-androideabi.
Fixed ICE when removing a source file between compilation sessions.
Minor optimisation of string operations.
Compiler error message is now aborting due to previous error(s) instead of aborting due to N previous errors This was previously inaccurate and would only count certain kinds of errors.
The compiler now supports Visual Studio 2017
The compiler is now built against LLVM 4.0.1 by default
Added a lot of new error codes
Added target-feature=+crt-static option RFC 1721 Which allows libraries with C Run-time Libraries(CRT) to be statically linked.
Fixed various ARM codegen bugs
Libraries
String now implements FromIterator<Cow<'a, str>> and Extend<Cow<'a, str>>
Vec now implements From<&mut [T]>
Box<[u8]> now implements From<Box<str>>
SplitWhitespace now implements Clone
[u8]::reverse is now 5x faster and [u16]::reverse is now 1.5x faster
eprint! and eprintln! macros added to prelude. Same as the print! macros, but for printing to stderr.
Stabilized APIs
OsString::shrink_to_fit
cmp::Reverse
Command::envs
thread::ThreadId
Cargo
Build scripts can now add environment variables to the environment the crate is being compiled in. Example: println!("cargo:rustc-env=FOO=bar");
Subcommands now replace the current process rather than spawning a new child process
Workspace members can now accept glob file patterns
Added --all flag to the cargo bench subcommand to run benchmarks of all the members in a given workspace.
Updated libssh2-sys to 0.2.6
Target directory path is now in the cargmetadata
Cargo no longer checks out a local working directory for the crates.io index This should provide smaller file size for the registry, and improve cloning times, especially on Windows machines.
Added an --exclude option for excluding certai using the --all option
Cargo will now automatically retry when receiving a 5xx error from crates.io
The --features option now accepts multiple comma or space delimited values.
Added support for custom target specific runners
Misc
Added ow prefer to download rust packages with XZ compression over GZip packages.
Added the ability to escape # in rust documentation By adding additional #'s ie. ## is now #
Compatibility Notes
MutexGuard<T> may only be Sync if T is Sync.
-Z flagning for a year previous to this.
As a result of the -Z flag change, the cargo-check plugin no longer works. Users should migrate to the built-in check command, which has been available since 1.16.
Ending a float literal with ._ is now a hard erro use ::self::foo; is now a hard error. self paths are always relative while the :: prefix makes a path absolute, but was ignored and the path was relative regardless.
Floating point constants in match patterns is now a hard error This was previously ts that don't derive PartialEq & Eq used match patterns is now a hard error This was previously a warning.
Lifetimes named '_ are no longer allowed. This was previously a warning.
From the pound escape, lines consisting of multiple #s are now visible
It is an error to reexport private enum variants. This is known to break a number of crates that depend on an older version of mustache.
On Windows, if VCINSTALLDIR is set incorrectly, rustc will try to use it to find the linker, and the build will fail where it did not previously
Version 1.18.0 (2017-06-08)
Language
Stabilize pub(restricted) pub can now accept a module path to make the item visible to just that module tree. Also accepts the keyword crate to make something public to the whole crate but not users of the library. Example: pub(crate) mod utils;. RFC 1422.
Stabilize #![windows_subsystem] attribute conservative exposure of the /SUBSYSTEM linker flag on Windows platforms. RFC 1665.
Refactor of trait object type parsing Now ty in macros can accept types like Write + Send, trailing + are now supported in trait objects, and better error reporting for trait objects starting with ?Sized.
0e+10 is now a valid floating point literal
Now warns if you bind a lifetime parameter to 'static
Tuples, Enum variant fields, and structs with no repr attribute or with #[repr(Rust)] are reordered to minimize padding and produce a smaller representation in some cases.
Compiler
rustc can now emit mir with --emit mir
Improved LLVM IR for trivial functions
Added explanation for E0090(Wrong number of lifetimes are supplied)
rustc compilation is now 15%-20% faster Thanks to optimisation opportunities found through profiling
Improved backtrace formatting when panicking
Libraries
Specialized Vec::from_iter being passed vec::IntoIter if the iterator hasn't been advanced the original Vec is reassembled with no actual iteration or reallocation.
Simplified HashMap Bucket interface provides performance improvements for iterating and cloning.
Specialize Vec::from_elem to use calloc
Fixed Race condition in fs::create_dir_all
No longer caching stdio on Windows
Optimized insertion sort in slice insertion sort in some cases 2.50%~ faster and in one case now 12.50% faster.
Optimized AtomicBool::fetch_nand
Stabilized APIs
Child::try_wait
HashMap::retain
HashSet::retain
PeekMut::pop
TcpStream::peek
UdpSocket::peek
UdpSocket::peek_from
Cargo
Added partial Pijul support Pijul is a version control system in Rust. You can now create new cargo projects with Pijul using cargo new --vcs pijul
Now always emits build script warnings for crates that fail to build
Added Android build support
Added --bins and --tests flags now you can build all programs of a certain type, for example cargo build --bins will build all binaries.
Added support for haiku
Misc
rustdoc can now use pulldown-cmark with the --enable-commonmark flag
Added rust-winbg script for better debugging on Windows
Rust now uses the official cross compiler for NetBSD
rustdoc now accepts # at the start of files
Fixed jemalloc support for musl
Compatibility Notes
Changes to how the 0 flag works in format! Padding zeroes are now always placed after the sign if it exists and before the digits. With the # flag the zeroes are placed after the prefix and before the digits.
Due to the struct field optimisation, using transmute on structs that have no repr attribute or #[repr(Rust)] will no longer work. This has always been undefined behavior, but is now more likely to break in practice.
The refactor of trait object type parsing fixed a bug where + was receiving the wrong priority parsing things like &for<'a> Tr<'a> + Send as &(for<'a> Tr<'a> + Send) instead of (&for<'a> Tr<'a>) + Send
Overlapping inherent impls are now a hard error
PartialOrd and Ord must agree on the ordering.
rustc main.rs -o out --emit=asm,llvm-ir Now will output out.asm and out.ll instead of only one of the filetypes.
calling a function that returns Self will no longer work when the size of Self cannot be statically determined.
rustc now builds with a "pthreads" flavour of MinGW for Windows GNU this has caused a few regressions namely:
Changed the link order of local static/dynamic libraries (respecting the order on given rather than having the compiler reorder).
Changed how MinGW is linked, native code linked to dynamic libraries may require manually linking to the gcc support library (for the native code itself)
Version 1.17.0 (2017-04-27)
Language
The lifetime of statics and consts defaults to 'static. RFC 1623
Fields of structs may be initialized without duplicating the field/variable names. RFC 1682
Self may be included in the where clause of impls. RFC 1647
When coercing to an unsized type lifetimes must be equal. That is, there is no subtyping between T and U when T: Unsize<U>. For example, coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
Values passed to the indexing operator, [], automatically coerce
Static variables may contain references to other statics
Compiler
Exit quickly on only --emit dep-info
Make -C relocation-model more correctly determine whether the linker creates a position-independent executable
Add -C overflow-checks to directly control whether integer overflow panics
The rustc type checker now checks items on demand instead of in a single in-order pass. This is mostly an internal refactoring in support of future work, including incremental type checking, but also resolves RFC 1647, allowing Self to appear in impl where clauses.
Optimize vtable loads
Turn off vectorization for Emscripten targets
Provide suggestions for unknown macros imported with use
Fix ICEs in path resolution
Strip exception handling code on Emscripten when panic=abort
Add clearer error message using &str + &str
Stabilized APIs
Arc::into_raw
Arc::from_raw
Arc::ptr_eq
Rc::into_raw
Rc::from_raw
Rc::ptr_eq
Ordering::then
Ordering::then_with
BTreeMap::range
BTreeMap::range_mut
collections::Bound
process::abort
ptr::read_unaligned
ptr::write_unaligned
Result::expect_err
Cell::swap
Cell::replace
Cell::into_inner
Cell::take
Libraries
BTreeMap and BTreeSet can iterate over ranges
Cell can store non-Copy types. RFC 1651
String implements FromIterator<&char>
Box implements a number of new conversions: From<Box<str>> for String, From<Box<[T]>> for Vec<T>, From<Box<CStr>> for CString, From<Box<OsStr>> for OsString, From<Box<Path>> for PathBuf, Into<Box<str>> for String, Into<Box<[T]>> for Vec<T>, Into<Box<CStr>> for CString, Into<Box<OsStr>> for OsString, Into<Box<Path>> for PathBuf, Default for Box<str>, Default for Box<CStr>, Default for Box<OsStr>, From<&CStr> for Box<CStr>, From<&OsStr> for Box<OsStr>, From<&Path> for Box<Path>
ffi::FromBytesWithNulError implements Error and Display
Specialize PartialOrd<A> for [A] where A: Ord
Slightly optimize slice::sort
Add ToString trait specialization for Cow<'a, str> and String
Box<[T]> implements From<&[T]> where T: Copy, Box<str> implements From<&str>
IpAddr implements From for various arrays. SocketAddr implements From<(I, u16)> where I: Into<IpAddr>
format! estimates the needed capacity before writing a string
Support unprivileged symlink creation in Windows
PathBuf implements Default
Implement PartialEq<[A]> for VecDeque<A>
HashMap resizes adaptively to guard against DOS attacks and poor hash functions.
Cargo
Add cargo check --all
Add an option to ignore SSL revocation checking
Add cargo run --package
Add required_features
Assume build.rs is a build script
Find workspace via workspace_root link in containing member
Misc
Documentation is rendered with mdbook instead of the obsolete, in-tree rustbook
The "Unstable Book" documents nightly-only features
Improve the style of the sidebar in rustdoc output
Configure build correctly on 64-bit CPU's with the armhf ABI
Fix MSP430 breakage due to i128
Preliminary Solaris/SPARCv9 support
rustc is linked statically on Windows MSVC targets, allowing it to run without installing the MSVC runtime.
rustdoc --test includes file names in test names
This release includes builds of std for sparc64-unknown-linux-gnu, aarch64-unknown-linux-fuchsia, and x86_64-unknown-linux-fuchsia.
Initial support for aarch64-unknown-freebsd
Initial support for i686-unknown-netbsd
This release no longer includes the old makefile build system. Rust is built with a custom build system, written in Rust, and with Cargo.
Add Debug implementations for libcollection structs
TypeId implements PartialOrd and Ord
--test-threads=0 produces an error
rustup installs documentation by default
The Rust source includes NatVis visualizations. These can be used by WinDbg and Visual Studio to improve the debugging experience.
Compatibility Notes
Rust 1.17 does not correctly detect the MSVC 2017 linker. As a workaround, either use MSVC 2015 or run vcvars.bat.
When coercing to an unsized type lifetimes must be equal. That is, disallow subtyping between T and U when T: Unsize<U>, e.g. coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
format! and Display::to_string panic if an underlying formatting implementation returns an error. Previously the error was silently ignored. It is incorrect for write_fmt to return an error when writing to a string.
In-tree crates are verified to be unstable. Previously, some minor crates were marked stable and could be accessed from the stable toolchain.
Rust git source no longer includes vendored crates. Those that need to build with vendored crates should build from release tarballs.
Fix inert attributes from proc_macro_derives
During crate resolution, rustc prefers a crate in the sysroot if two crates are otherwise identical. Unlikely to be encountered outside the Rust build system.
Fixed bugs around how type inference interacts with dead-code. The existing code generally ignores the type of dead-code unless a type-hint is provided; this can cause surprising inference interactions particularly around defaulting. The new code uniformly ignores the result type of dead-code.
Tuple-struct constructors with private fields are no longer visible
Lifetime parameters that do not appear in the arguments are now considered early-bound, resolving a soundness bug (#32330). The hr_lifetime_in_assoc_type future-compatibility lint has been in effect since April of 2016.
rustdoc: fix doctests with non-feature crate attributes
Make transmuting from fn item types to pointer-sized types a hard error
2017-09-30 06:42:43 +02:00
|
|
|
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
|
|
|
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
|
2018-10-08 01:12:49 +02:00
|
|
|
pre-build-fix:
|
2017-02-23 10:35:16 +01:00
|
|
|
.endif
|
|
|
|
.if !empty(MACHINE_PLATFORM:MLinux-*-i386) || make(distinfo) || make (makesum) || make(mdi)
|
2018-12-08 08:24:54 +01:00
|
|
|
RUST_STAGE0_VER= 1.30.1
|
2017-02-23 10:35:16 +01:00
|
|
|
RUST_ARCH:= i686-unknown-linux-gnu
|
|
|
|
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
Update to 1.20.0
* Disable SunOS/Solaris support because newer bootstrap is not available
* Include Rust libraries and Cargo
Changelog:
Version 1.20.0 (2017-08-31)
Language
Associated constants are now stabilised.
A lot of macro bugs are now fixed.
Compiler
Struct fields are now properly coerced to the expected field type.
Enabled wasm LLVM backend WASM can now be built with the wasm32-experimental-emscripten target.
Changed some of the error messages to be more helpful.
Add support for RELRO(RELocation Read-Only) for platforms that support it.
rustc now reports the total number of errors on compilation failure previously this was only the number of errors in the pass that failed.
Expansion in rustc has been sped up 29x.
added msp430-none-elf target.
rustc will now suggest one-argument enum variant to fix type mismatch when applicable
Fixes backtraces on Redox
rustc now identifies different versions of same crate when absolute paths of different types match in an error message.
Libraries
Relaxed Debug constraints on {HashMap,BTreeMap}::{Keys,Values}.
Impl PartialEq, Eq, PartialOrd, Ord, Debug, Hash for unsized tuples.
Impl fmt::{Display, Debug} for Ref, RefMut, MutexGuard, RwLockReadGuard, RwLockWriteGuard
Impl Clone for DefaultHasher.
Impl Sync for SyncSender.
Impl FromStr for char
Fixed how {f32, f64}::{is_sign_negative, is_sign_positive} handles NaN.
allow messages in the unimplemented!() macro. ie. unimplemented!("Waiting for 1.21 to be stable")
pub(restricted) is now supported in the thread_local! macro.
Upgrade to Unicode 10.0.0
Reimplemented {f32, f64}::{min, max} in Rust instead of using CMath.
Skip the main thread's manual stack guard on Linux
Iterator::nth for ops::{Range, RangeFrom} is now done in O(1) time
#[repr(align(N))] attribute max number is now 2^31 - 1. This was previously 2^15.
{OsStr, Path}::Display now avoids allocations where possible
Stabilized APIs
CStr::into_c_string
CString::as_c_str
CString::into_boxed_c_str
Chain::get_mut
Chain::get_ref
Chain::into_inner
Option::get_or_insert_with
Option::get_or_insert
OsStr::into_os_string
OsString::into_boxed_os_str
Take::get_mut
Take::get_ref
Utf8Error::error_len
char::EscapeDebug
char::escape_debug
compile_error!
f32::from_bits
f32::to_bits
f64::from_bits
f64::to_bits
mem::ManuallyDrop
slice::sort_unstable_by_key
slice::sort_unstable_by
slice::sort_unstable
str::from_boxed_utf8_unchecked
str::as_bytes_mut
str::as_bytes_mut
str::from_utf8_mut
str::from_utf8_unchecked_mut
str::get_mut
str::get_unchecked_mut
str::get_unchecked
str::get
str::into_boxed_bytes
Cargo
Cargo API token location moved from ~/.cargo/config to ~/.cargo/credentials.
Cargo will now build main.rs binaries that are in sub-directories of src/bin. ie. Having src/bin/server/main.rs and src/bin/client/main.rs generates target/debug/server and target/debug/client
You can now specify version of a binary when installed through cargo install using --vers.
Added --no-fail-fast flag to cargo to run all benchmarks regardless of failure.
Changed the convention around which file is the crate root.
The include/exclude property in Cargo.toml now accepts gitignore paths instead of glob patterns. Glob patterns are now deprecated.
Compatibility Notes
Functions with 'static in their return types will now not be as usable as if they were using lifetime parameters instead.
The reimplementation of {f32, f64}::is_sign_{negative, positive} now takes the sign of NaN into account where previously didn't.
Version 1.19.0 (2017-07-20)
Language
Numeric fields can now be used for creating tuple structs. RFC 1506 For example struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };.
Macro recursion limit increased to 1024 from 64.
Added lint for detecting unused macros.
loop can now return a value with break. RFC 1624 For example: let x = loop { break 7; };
C compatible unions are now available. RFC 1444 They can only contain Copy types and cannot have a Drop implementation. Example: union Foo { bar: u8, baz: usize }
Non capturing closures can now be coerced into fns, RFC 1558 Example: let foo: fn(u8) -> u8 = |v: u8| { v };
Compiler
Add support for bootstrapping the Rust compiler toolchain on Android.
Change arm-linux-androideabi to correspond to the armeabi official ABI. If you wish to continue targeting the armeabi-v7a ABI you should use --target armv7-linux-androideabi.
Fixed ICE when removing a source file between compilation sessions.
Minor optimisation of string operations.
Compiler error message is now aborting due to previous error(s) instead of aborting due to N previous errors This was previously inaccurate and would only count certain kinds of errors.
The compiler now supports Visual Studio 2017
The compiler is now built against LLVM 4.0.1 by default
Added a lot of new error codes
Added target-feature=+crt-static option RFC 1721 Which allows libraries with C Run-time Libraries(CRT) to be statically linked.
Fixed various ARM codegen bugs
Libraries
String now implements FromIterator<Cow<'a, str>> and Extend<Cow<'a, str>>
Vec now implements From<&mut [T]>
Box<[u8]> now implements From<Box<str>>
SplitWhitespace now implements Clone
[u8]::reverse is now 5x faster and [u16]::reverse is now 1.5x faster
eprint! and eprintln! macros added to prelude. Same as the print! macros, but for printing to stderr.
Stabilized APIs
OsString::shrink_to_fit
cmp::Reverse
Command::envs
thread::ThreadId
Cargo
Build scripts can now add environment variables to the environment the crate is being compiled in. Example: println!("cargo:rustc-env=FOO=bar");
Subcommands now replace the current process rather than spawning a new child process
Workspace members can now accept glob file patterns
Added --all flag to the cargo bench subcommand to run benchmarks of all the members in a given workspace.
Updated libssh2-sys to 0.2.6
Target directory path is now in the cargmetadata
Cargo no longer checks out a local working directory for the crates.io index This should provide smaller file size for the registry, and improve cloning times, especially on Windows machines.
Added an --exclude option for excluding certai using the --all option
Cargo will now automatically retry when receiving a 5xx error from crates.io
The --features option now accepts multiple comma or space delimited values.
Added support for custom target specific runners
Misc
Added ow prefer to download rust packages with XZ compression over GZip packages.
Added the ability to escape # in rust documentation By adding additional #'s ie. ## is now #
Compatibility Notes
MutexGuard<T> may only be Sync if T is Sync.
-Z flagning for a year previous to this.
As a result of the -Z flag change, the cargo-check plugin no longer works. Users should migrate to the built-in check command, which has been available since 1.16.
Ending a float literal with ._ is now a hard erro use ::self::foo; is now a hard error. self paths are always relative while the :: prefix makes a path absolute, but was ignored and the path was relative regardless.
Floating point constants in match patterns is now a hard error This was previously ts that don't derive PartialEq & Eq used match patterns is now a hard error This was previously a warning.
Lifetimes named '_ are no longer allowed. This was previously a warning.
From the pound escape, lines consisting of multiple #s are now visible
It is an error to reexport private enum variants. This is known to break a number of crates that depend on an older version of mustache.
On Windows, if VCINSTALLDIR is set incorrectly, rustc will try to use it to find the linker, and the build will fail where it did not previously
Version 1.18.0 (2017-06-08)
Language
Stabilize pub(restricted) pub can now accept a module path to make the item visible to just that module tree. Also accepts the keyword crate to make something public to the whole crate but not users of the library. Example: pub(crate) mod utils;. RFC 1422.
Stabilize #![windows_subsystem] attribute conservative exposure of the /SUBSYSTEM linker flag on Windows platforms. RFC 1665.
Refactor of trait object type parsing Now ty in macros can accept types like Write + Send, trailing + are now supported in trait objects, and better error reporting for trait objects starting with ?Sized.
0e+10 is now a valid floating point literal
Now warns if you bind a lifetime parameter to 'static
Tuples, Enum variant fields, and structs with no repr attribute or with #[repr(Rust)] are reordered to minimize padding and produce a smaller representation in some cases.
Compiler
rustc can now emit mir with --emit mir
Improved LLVM IR for trivial functions
Added explanation for E0090(Wrong number of lifetimes are supplied)
rustc compilation is now 15%-20% faster Thanks to optimisation opportunities found through profiling
Improved backtrace formatting when panicking
Libraries
Specialized Vec::from_iter being passed vec::IntoIter if the iterator hasn't been advanced the original Vec is reassembled with no actual iteration or reallocation.
Simplified HashMap Bucket interface provides performance improvements for iterating and cloning.
Specialize Vec::from_elem to use calloc
Fixed Race condition in fs::create_dir_all
No longer caching stdio on Windows
Optimized insertion sort in slice insertion sort in some cases 2.50%~ faster and in one case now 12.50% faster.
Optimized AtomicBool::fetch_nand
Stabilized APIs
Child::try_wait
HashMap::retain
HashSet::retain
PeekMut::pop
TcpStream::peek
UdpSocket::peek
UdpSocket::peek_from
Cargo
Added partial Pijul support Pijul is a version control system in Rust. You can now create new cargo projects with Pijul using cargo new --vcs pijul
Now always emits build script warnings for crates that fail to build
Added Android build support
Added --bins and --tests flags now you can build all programs of a certain type, for example cargo build --bins will build all binaries.
Added support for haiku
Misc
rustdoc can now use pulldown-cmark with the --enable-commonmark flag
Added rust-winbg script for better debugging on Windows
Rust now uses the official cross compiler for NetBSD
rustdoc now accepts # at the start of files
Fixed jemalloc support for musl
Compatibility Notes
Changes to how the 0 flag works in format! Padding zeroes are now always placed after the sign if it exists and before the digits. With the # flag the zeroes are placed after the prefix and before the digits.
Due to the struct field optimisation, using transmute on structs that have no repr attribute or #[repr(Rust)] will no longer work. This has always been undefined behavior, but is now more likely to break in practice.
The refactor of trait object type parsing fixed a bug where + was receiving the wrong priority parsing things like &for<'a> Tr<'a> + Send as &(for<'a> Tr<'a> + Send) instead of (&for<'a> Tr<'a>) + Send
Overlapping inherent impls are now a hard error
PartialOrd and Ord must agree on the ordering.
rustc main.rs -o out --emit=asm,llvm-ir Now will output out.asm and out.ll instead of only one of the filetypes.
calling a function that returns Self will no longer work when the size of Self cannot be statically determined.
rustc now builds with a "pthreads" flavour of MinGW for Windows GNU this has caused a few regressions namely:
Changed the link order of local static/dynamic libraries (respecting the order on given rather than having the compiler reorder).
Changed how MinGW is linked, native code linked to dynamic libraries may require manually linking to the gcc support library (for the native code itself)
Version 1.17.0 (2017-04-27)
Language
The lifetime of statics and consts defaults to 'static. RFC 1623
Fields of structs may be initialized without duplicating the field/variable names. RFC 1682
Self may be included in the where clause of impls. RFC 1647
When coercing to an unsized type lifetimes must be equal. That is, there is no subtyping between T and U when T: Unsize<U>. For example, coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
Values passed to the indexing operator, [], automatically coerce
Static variables may contain references to other statics
Compiler
Exit quickly on only --emit dep-info
Make -C relocation-model more correctly determine whether the linker creates a position-independent executable
Add -C overflow-checks to directly control whether integer overflow panics
The rustc type checker now checks items on demand instead of in a single in-order pass. This is mostly an internal refactoring in support of future work, including incremental type checking, but also resolves RFC 1647, allowing Self to appear in impl where clauses.
Optimize vtable loads
Turn off vectorization for Emscripten targets
Provide suggestions for unknown macros imported with use
Fix ICEs in path resolution
Strip exception handling code on Emscripten when panic=abort
Add clearer error message using &str + &str
Stabilized APIs
Arc::into_raw
Arc::from_raw
Arc::ptr_eq
Rc::into_raw
Rc::from_raw
Rc::ptr_eq
Ordering::then
Ordering::then_with
BTreeMap::range
BTreeMap::range_mut
collections::Bound
process::abort
ptr::read_unaligned
ptr::write_unaligned
Result::expect_err
Cell::swap
Cell::replace
Cell::into_inner
Cell::take
Libraries
BTreeMap and BTreeSet can iterate over ranges
Cell can store non-Copy types. RFC 1651
String implements FromIterator<&char>
Box implements a number of new conversions: From<Box<str>> for String, From<Box<[T]>> for Vec<T>, From<Box<CStr>> for CString, From<Box<OsStr>> for OsString, From<Box<Path>> for PathBuf, Into<Box<str>> for String, Into<Box<[T]>> for Vec<T>, Into<Box<CStr>> for CString, Into<Box<OsStr>> for OsString, Into<Box<Path>> for PathBuf, Default for Box<str>, Default for Box<CStr>, Default for Box<OsStr>, From<&CStr> for Box<CStr>, From<&OsStr> for Box<OsStr>, From<&Path> for Box<Path>
ffi::FromBytesWithNulError implements Error and Display
Specialize PartialOrd<A> for [A] where A: Ord
Slightly optimize slice::sort
Add ToString trait specialization for Cow<'a, str> and String
Box<[T]> implements From<&[T]> where T: Copy, Box<str> implements From<&str>
IpAddr implements From for various arrays. SocketAddr implements From<(I, u16)> where I: Into<IpAddr>
format! estimates the needed capacity before writing a string
Support unprivileged symlink creation in Windows
PathBuf implements Default
Implement PartialEq<[A]> for VecDeque<A>
HashMap resizes adaptively to guard against DOS attacks and poor hash functions.
Cargo
Add cargo check --all
Add an option to ignore SSL revocation checking
Add cargo run --package
Add required_features
Assume build.rs is a build script
Find workspace via workspace_root link in containing member
Misc
Documentation is rendered with mdbook instead of the obsolete, in-tree rustbook
The "Unstable Book" documents nightly-only features
Improve the style of the sidebar in rustdoc output
Configure build correctly on 64-bit CPU's with the armhf ABI
Fix MSP430 breakage due to i128
Preliminary Solaris/SPARCv9 support
rustc is linked statically on Windows MSVC targets, allowing it to run without installing the MSVC runtime.
rustdoc --test includes file names in test names
This release includes builds of std for sparc64-unknown-linux-gnu, aarch64-unknown-linux-fuchsia, and x86_64-unknown-linux-fuchsia.
Initial support for aarch64-unknown-freebsd
Initial support for i686-unknown-netbsd
This release no longer includes the old makefile build system. Rust is built with a custom build system, written in Rust, and with Cargo.
Add Debug implementations for libcollection structs
TypeId implements PartialOrd and Ord
--test-threads=0 produces an error
rustup installs documentation by default
The Rust source includes NatVis visualizations. These can be used by WinDbg and Visual Studio to improve the debugging experience.
Compatibility Notes
Rust 1.17 does not correctly detect the MSVC 2017 linker. As a workaround, either use MSVC 2015 or run vcvars.bat.
When coercing to an unsized type lifetimes must be equal. That is, disallow subtyping between T and U when T: Unsize<U>, e.g. coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
format! and Display::to_string panic if an underlying formatting implementation returns an error. Previously the error was silently ignored. It is incorrect for write_fmt to return an error when writing to a string.
In-tree crates are verified to be unstable. Previously, some minor crates were marked stable and could be accessed from the stable toolchain.
Rust git source no longer includes vendored crates. Those that need to build with vendored crates should build from release tarballs.
Fix inert attributes from proc_macro_derives
During crate resolution, rustc prefers a crate in the sysroot if two crates are otherwise identical. Unlikely to be encountered outside the Rust build system.
Fixed bugs around how type inference interacts with dead-code. The existing code generally ignores the type of dead-code unless a type-hint is provided; this can cause surprising inference interactions particularly around defaulting. The new code uniformly ignores the result type of dead-code.
Tuple-struct constructors with private fields are no longer visible
Lifetime parameters that do not appear in the arguments are now considered early-bound, resolving a soundness bug (#32330). The hr_lifetime_in_assoc_type future-compatibility lint has been in effect since April of 2016.
rustdoc: fix doctests with non-feature crate attributes
Make transmuting from fn item types to pointer-sized types a hard error
2017-09-30 06:42:43 +02:00
|
|
|
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
|
|
|
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
|
2018-10-08 01:12:49 +02:00
|
|
|
pre-build-fix:
|
2017-02-23 10:35:16 +01:00
|
|
|
.endif
|
|
|
|
.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
|
2018-12-08 08:24:54 +01:00
|
|
|
RUST_STAGE0_VER= 1.30.1
|
2017-02-23 10:35:16 +01:00
|
|
|
RUST_ARCH:= x86_64-unknown-linux-gnu
|
|
|
|
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
Update to 1.20.0
* Disable SunOS/Solaris support because newer bootstrap is not available
* Include Rust libraries and Cargo
Changelog:
Version 1.20.0 (2017-08-31)
Language
Associated constants are now stabilised.
A lot of macro bugs are now fixed.
Compiler
Struct fields are now properly coerced to the expected field type.
Enabled wasm LLVM backend WASM can now be built with the wasm32-experimental-emscripten target.
Changed some of the error messages to be more helpful.
Add support for RELRO(RELocation Read-Only) for platforms that support it.
rustc now reports the total number of errors on compilation failure previously this was only the number of errors in the pass that failed.
Expansion in rustc has been sped up 29x.
added msp430-none-elf target.
rustc will now suggest one-argument enum variant to fix type mismatch when applicable
Fixes backtraces on Redox
rustc now identifies different versions of same crate when absolute paths of different types match in an error message.
Libraries
Relaxed Debug constraints on {HashMap,BTreeMap}::{Keys,Values}.
Impl PartialEq, Eq, PartialOrd, Ord, Debug, Hash for unsized tuples.
Impl fmt::{Display, Debug} for Ref, RefMut, MutexGuard, RwLockReadGuard, RwLockWriteGuard
Impl Clone for DefaultHasher.
Impl Sync for SyncSender.
Impl FromStr for char
Fixed how {f32, f64}::{is_sign_negative, is_sign_positive} handles NaN.
allow messages in the unimplemented!() macro. ie. unimplemented!("Waiting for 1.21 to be stable")
pub(restricted) is now supported in the thread_local! macro.
Upgrade to Unicode 10.0.0
Reimplemented {f32, f64}::{min, max} in Rust instead of using CMath.
Skip the main thread's manual stack guard on Linux
Iterator::nth for ops::{Range, RangeFrom} is now done in O(1) time
#[repr(align(N))] attribute max number is now 2^31 - 1. This was previously 2^15.
{OsStr, Path}::Display now avoids allocations where possible
Stabilized APIs
CStr::into_c_string
CString::as_c_str
CString::into_boxed_c_str
Chain::get_mut
Chain::get_ref
Chain::into_inner
Option::get_or_insert_with
Option::get_or_insert
OsStr::into_os_string
OsString::into_boxed_os_str
Take::get_mut
Take::get_ref
Utf8Error::error_len
char::EscapeDebug
char::escape_debug
compile_error!
f32::from_bits
f32::to_bits
f64::from_bits
f64::to_bits
mem::ManuallyDrop
slice::sort_unstable_by_key
slice::sort_unstable_by
slice::sort_unstable
str::from_boxed_utf8_unchecked
str::as_bytes_mut
str::as_bytes_mut
str::from_utf8_mut
str::from_utf8_unchecked_mut
str::get_mut
str::get_unchecked_mut
str::get_unchecked
str::get
str::into_boxed_bytes
Cargo
Cargo API token location moved from ~/.cargo/config to ~/.cargo/credentials.
Cargo will now build main.rs binaries that are in sub-directories of src/bin. ie. Having src/bin/server/main.rs and src/bin/client/main.rs generates target/debug/server and target/debug/client
You can now specify version of a binary when installed through cargo install using --vers.
Added --no-fail-fast flag to cargo to run all benchmarks regardless of failure.
Changed the convention around which file is the crate root.
The include/exclude property in Cargo.toml now accepts gitignore paths instead of glob patterns. Glob patterns are now deprecated.
Compatibility Notes
Functions with 'static in their return types will now not be as usable as if they were using lifetime parameters instead.
The reimplementation of {f32, f64}::is_sign_{negative, positive} now takes the sign of NaN into account where previously didn't.
Version 1.19.0 (2017-07-20)
Language
Numeric fields can now be used for creating tuple structs. RFC 1506 For example struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };.
Macro recursion limit increased to 1024 from 64.
Added lint for detecting unused macros.
loop can now return a value with break. RFC 1624 For example: let x = loop { break 7; };
C compatible unions are now available. RFC 1444 They can only contain Copy types and cannot have a Drop implementation. Example: union Foo { bar: u8, baz: usize }
Non capturing closures can now be coerced into fns, RFC 1558 Example: let foo: fn(u8) -> u8 = |v: u8| { v };
Compiler
Add support for bootstrapping the Rust compiler toolchain on Android.
Change arm-linux-androideabi to correspond to the armeabi official ABI. If you wish to continue targeting the armeabi-v7a ABI you should use --target armv7-linux-androideabi.
Fixed ICE when removing a source file between compilation sessions.
Minor optimisation of string operations.
Compiler error message is now aborting due to previous error(s) instead of aborting due to N previous errors This was previously inaccurate and would only count certain kinds of errors.
The compiler now supports Visual Studio 2017
The compiler is now built against LLVM 4.0.1 by default
Added a lot of new error codes
Added target-feature=+crt-static option RFC 1721 Which allows libraries with C Run-time Libraries(CRT) to be statically linked.
Fixed various ARM codegen bugs
Libraries
String now implements FromIterator<Cow<'a, str>> and Extend<Cow<'a, str>>
Vec now implements From<&mut [T]>
Box<[u8]> now implements From<Box<str>>
SplitWhitespace now implements Clone
[u8]::reverse is now 5x faster and [u16]::reverse is now 1.5x faster
eprint! and eprintln! macros added to prelude. Same as the print! macros, but for printing to stderr.
Stabilized APIs
OsString::shrink_to_fit
cmp::Reverse
Command::envs
thread::ThreadId
Cargo
Build scripts can now add environment variables to the environment the crate is being compiled in. Example: println!("cargo:rustc-env=FOO=bar");
Subcommands now replace the current process rather than spawning a new child process
Workspace members can now accept glob file patterns
Added --all flag to the cargo bench subcommand to run benchmarks of all the members in a given workspace.
Updated libssh2-sys to 0.2.6
Target directory path is now in the cargmetadata
Cargo no longer checks out a local working directory for the crates.io index This should provide smaller file size for the registry, and improve cloning times, especially on Windows machines.
Added an --exclude option for excluding certai using the --all option
Cargo will now automatically retry when receiving a 5xx error from crates.io
The --features option now accepts multiple comma or space delimited values.
Added support for custom target specific runners
Misc
Added ow prefer to download rust packages with XZ compression over GZip packages.
Added the ability to escape # in rust documentation By adding additional #'s ie. ## is now #
Compatibility Notes
MutexGuard<T> may only be Sync if T is Sync.
-Z flagning for a year previous to this.
As a result of the -Z flag change, the cargo-check plugin no longer works. Users should migrate to the built-in check command, which has been available since 1.16.
Ending a float literal with ._ is now a hard erro use ::self::foo; is now a hard error. self paths are always relative while the :: prefix makes a path absolute, but was ignored and the path was relative regardless.
Floating point constants in match patterns is now a hard error This was previously ts that don't derive PartialEq & Eq used match patterns is now a hard error This was previously a warning.
Lifetimes named '_ are no longer allowed. This was previously a warning.
From the pound escape, lines consisting of multiple #s are now visible
It is an error to reexport private enum variants. This is known to break a number of crates that depend on an older version of mustache.
On Windows, if VCINSTALLDIR is set incorrectly, rustc will try to use it to find the linker, and the build will fail where it did not previously
Version 1.18.0 (2017-06-08)
Language
Stabilize pub(restricted) pub can now accept a module path to make the item visible to just that module tree. Also accepts the keyword crate to make something public to the whole crate but not users of the library. Example: pub(crate) mod utils;. RFC 1422.
Stabilize #![windows_subsystem] attribute conservative exposure of the /SUBSYSTEM linker flag on Windows platforms. RFC 1665.
Refactor of trait object type parsing Now ty in macros can accept types like Write + Send, trailing + are now supported in trait objects, and better error reporting for trait objects starting with ?Sized.
0e+10 is now a valid floating point literal
Now warns if you bind a lifetime parameter to 'static
Tuples, Enum variant fields, and structs with no repr attribute or with #[repr(Rust)] are reordered to minimize padding and produce a smaller representation in some cases.
Compiler
rustc can now emit mir with --emit mir
Improved LLVM IR for trivial functions
Added explanation for E0090(Wrong number of lifetimes are supplied)
rustc compilation is now 15%-20% faster Thanks to optimisation opportunities found through profiling
Improved backtrace formatting when panicking
Libraries
Specialized Vec::from_iter being passed vec::IntoIter if the iterator hasn't been advanced the original Vec is reassembled with no actual iteration or reallocation.
Simplified HashMap Bucket interface provides performance improvements for iterating and cloning.
Specialize Vec::from_elem to use calloc
Fixed Race condition in fs::create_dir_all
No longer caching stdio on Windows
Optimized insertion sort in slice insertion sort in some cases 2.50%~ faster and in one case now 12.50% faster.
Optimized AtomicBool::fetch_nand
Stabilized APIs
Child::try_wait
HashMap::retain
HashSet::retain
PeekMut::pop
TcpStream::peek
UdpSocket::peek
UdpSocket::peek_from
Cargo
Added partial Pijul support Pijul is a version control system in Rust. You can now create new cargo projects with Pijul using cargo new --vcs pijul
Now always emits build script warnings for crates that fail to build
Added Android build support
Added --bins and --tests flags now you can build all programs of a certain type, for example cargo build --bins will build all binaries.
Added support for haiku
Misc
rustdoc can now use pulldown-cmark with the --enable-commonmark flag
Added rust-winbg script for better debugging on Windows
Rust now uses the official cross compiler for NetBSD
rustdoc now accepts # at the start of files
Fixed jemalloc support for musl
Compatibility Notes
Changes to how the 0 flag works in format! Padding zeroes are now always placed after the sign if it exists and before the digits. With the # flag the zeroes are placed after the prefix and before the digits.
Due to the struct field optimisation, using transmute on structs that have no repr attribute or #[repr(Rust)] will no longer work. This has always been undefined behavior, but is now more likely to break in practice.
The refactor of trait object type parsing fixed a bug where + was receiving the wrong priority parsing things like &for<'a> Tr<'a> + Send as &(for<'a> Tr<'a> + Send) instead of (&for<'a> Tr<'a>) + Send
Overlapping inherent impls are now a hard error
PartialOrd and Ord must agree on the ordering.
rustc main.rs -o out --emit=asm,llvm-ir Now will output out.asm and out.ll instead of only one of the filetypes.
calling a function that returns Self will no longer work when the size of Self cannot be statically determined.
rustc now builds with a "pthreads" flavour of MinGW for Windows GNU this has caused a few regressions namely:
Changed the link order of local static/dynamic libraries (respecting the order on given rather than having the compiler reorder).
Changed how MinGW is linked, native code linked to dynamic libraries may require manually linking to the gcc support library (for the native code itself)
Version 1.17.0 (2017-04-27)
Language
The lifetime of statics and consts defaults to 'static. RFC 1623
Fields of structs may be initialized without duplicating the field/variable names. RFC 1682
Self may be included in the where clause of impls. RFC 1647
When coercing to an unsized type lifetimes must be equal. That is, there is no subtyping between T and U when T: Unsize<U>. For example, coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
Values passed to the indexing operator, [], automatically coerce
Static variables may contain references to other statics
Compiler
Exit quickly on only --emit dep-info
Make -C relocation-model more correctly determine whether the linker creates a position-independent executable
Add -C overflow-checks to directly control whether integer overflow panics
The rustc type checker now checks items on demand instead of in a single in-order pass. This is mostly an internal refactoring in support of future work, including incremental type checking, but also resolves RFC 1647, allowing Self to appear in impl where clauses.
Optimize vtable loads
Turn off vectorization for Emscripten targets
Provide suggestions for unknown macros imported with use
Fix ICEs in path resolution
Strip exception handling code on Emscripten when panic=abort
Add clearer error message using &str + &str
Stabilized APIs
Arc::into_raw
Arc::from_raw
Arc::ptr_eq
Rc::into_raw
Rc::from_raw
Rc::ptr_eq
Ordering::then
Ordering::then_with
BTreeMap::range
BTreeMap::range_mut
collections::Bound
process::abort
ptr::read_unaligned
ptr::write_unaligned
Result::expect_err
Cell::swap
Cell::replace
Cell::into_inner
Cell::take
Libraries
BTreeMap and BTreeSet can iterate over ranges
Cell can store non-Copy types. RFC 1651
String implements FromIterator<&char>
Box implements a number of new conversions: From<Box<str>> for String, From<Box<[T]>> for Vec<T>, From<Box<CStr>> for CString, From<Box<OsStr>> for OsString, From<Box<Path>> for PathBuf, Into<Box<str>> for String, Into<Box<[T]>> for Vec<T>, Into<Box<CStr>> for CString, Into<Box<OsStr>> for OsString, Into<Box<Path>> for PathBuf, Default for Box<str>, Default for Box<CStr>, Default for Box<OsStr>, From<&CStr> for Box<CStr>, From<&OsStr> for Box<OsStr>, From<&Path> for Box<Path>
ffi::FromBytesWithNulError implements Error and Display
Specialize PartialOrd<A> for [A] where A: Ord
Slightly optimize slice::sort
Add ToString trait specialization for Cow<'a, str> and String
Box<[T]> implements From<&[T]> where T: Copy, Box<str> implements From<&str>
IpAddr implements From for various arrays. SocketAddr implements From<(I, u16)> where I: Into<IpAddr>
format! estimates the needed capacity before writing a string
Support unprivileged symlink creation in Windows
PathBuf implements Default
Implement PartialEq<[A]> for VecDeque<A>
HashMap resizes adaptively to guard against DOS attacks and poor hash functions.
Cargo
Add cargo check --all
Add an option to ignore SSL revocation checking
Add cargo run --package
Add required_features
Assume build.rs is a build script
Find workspace via workspace_root link in containing member
Misc
Documentation is rendered with mdbook instead of the obsolete, in-tree rustbook
The "Unstable Book" documents nightly-only features
Improve the style of the sidebar in rustdoc output
Configure build correctly on 64-bit CPU's with the armhf ABI
Fix MSP430 breakage due to i128
Preliminary Solaris/SPARCv9 support
rustc is linked statically on Windows MSVC targets, allowing it to run without installing the MSVC runtime.
rustdoc --test includes file names in test names
This release includes builds of std for sparc64-unknown-linux-gnu, aarch64-unknown-linux-fuchsia, and x86_64-unknown-linux-fuchsia.
Initial support for aarch64-unknown-freebsd
Initial support for i686-unknown-netbsd
This release no longer includes the old makefile build system. Rust is built with a custom build system, written in Rust, and with Cargo.
Add Debug implementations for libcollection structs
TypeId implements PartialOrd and Ord
--test-threads=0 produces an error
rustup installs documentation by default
The Rust source includes NatVis visualizations. These can be used by WinDbg and Visual Studio to improve the debugging experience.
Compatibility Notes
Rust 1.17 does not correctly detect the MSVC 2017 linker. As a workaround, either use MSVC 2015 or run vcvars.bat.
When coercing to an unsized type lifetimes must be equal. That is, disallow subtyping between T and U when T: Unsize<U>, e.g. coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
format! and Display::to_string panic if an underlying formatting implementation returns an error. Previously the error was silently ignored. It is incorrect for write_fmt to return an error when writing to a string.
In-tree crates are verified to be unstable. Previously, some minor crates were marked stable and could be accessed from the stable toolchain.
Rust git source no longer includes vendored crates. Those that need to build with vendored crates should build from release tarballs.
Fix inert attributes from proc_macro_derives
During crate resolution, rustc prefers a crate in the sysroot if two crates are otherwise identical. Unlikely to be encountered outside the Rust build system.
Fixed bugs around how type inference interacts with dead-code. The existing code generally ignores the type of dead-code unless a type-hint is provided; this can cause surprising inference interactions particularly around defaulting. The new code uniformly ignores the result type of dead-code.
Tuple-struct constructors with private fields are no longer visible
Lifetime parameters that do not appear in the arguments are now considered early-bound, resolving a soundness bug (#32330). The hr_lifetime_in_assoc_type future-compatibility lint has been in effect since April of 2016.
rustdoc: fix doctests with non-feature crate attributes
Make transmuting from fn item types to pointer-sized types a hard error
2017-09-30 06:42:43 +02:00
|
|
|
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
|
|
|
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
|
2018-10-08 01:12:49 +02:00
|
|
|
pre-build-fix:
|
2017-02-23 10:35:16 +01:00
|
|
|
.endif
|
2018-12-15 13:41:43 +01:00
|
|
|
.if !empty(MACHINE_PLATFORM:MSunOS-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
|
|
|
|
RUST_STAGE0_VER= 1.30.0
|
|
|
|
RUST_ARCH:= x86_64-sun-solaris
|
|
|
|
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
|
|
|
SITES.${RUST_STAGE0}= https://us-east.manta.joyent.com/pkgsrc/public/pkg-bootstraps/
|
|
|
|
DISTFILES:= ${DISTFILES} ${RUST_STAGE0}
|
|
|
|
RUST_BOOTSTRAP_PATH?= ${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}
|
|
|
|
pre-build-fix:
|
|
|
|
.endif
|
2018-03-02 06:59:18 +01:00
|
|
|
.if !empty(MACHINE_PLATFORM:MFreeBSD-*-i386) || make(distinfo) || make (makesum) || make(mdi)
|
2018-12-08 08:24:54 +01:00
|
|
|
RUST_STAGE0_VER= 1.30.1
|
2018-03-02 06:59:18 +01:00
|
|
|
RUST_ARCH:= i686-unknown-freebsd
|
|
|
|
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
|
|
|
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
|
|
|
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
|
2018-10-08 01:12:49 +02:00
|
|
|
pre-build-fix:
|
2018-03-02 06:59:18 +01:00
|
|
|
.endif
|
|
|
|
.if !empty(MACHINE_PLATFORM:MFreeBSD-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
|
2018-12-08 08:24:54 +01:00
|
|
|
RUST_STAGE0_VER= 1.30.1
|
2018-03-02 06:59:18 +01:00
|
|
|
RUST_ARCH:= x86_64-unknown-freebsd
|
|
|
|
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
|
|
|
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
|
|
|
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
|
2018-10-08 01:12:49 +02:00
|
|
|
pre-build-fix:
|
2018-03-02 06:59:18 +01:00
|
|
|
.endif
|
2017-10-21 14:15:56 +02:00
|
|
|
.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || make(distinfo) || make (makesum) || make(mdi)
|
2018-12-08 08:24:54 +01:00
|
|
|
RUST_STAGE0_VER= 1.30.1
|
2017-10-21 14:15:56 +02:00
|
|
|
RUST_ARCH= i686-unknown-netbsd
|
|
|
|
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
|
|
|
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
|
|
|
# Do not trust ryoon@.
|
2018-10-09 14:40:05 +02:00
|
|
|
SITES.${RUST_STAGE0}= https://www.ryoon.net/pub/rust/
|
|
|
|
SITES.${RUST_STD_STAGE0}= https://www.ryoon.net/pub/rust/
|
2018-09-03 18:56:24 +02:00
|
|
|
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
|
2018-01-04 16:18:50 +01:00
|
|
|
# Setting this changes it for every distfile, which doesn't match what is
|
|
|
|
# currently in distinfo.
|
|
|
|
#DIST_SUBDIR= ${PKGNAME}
|
2017-10-21 14:15:56 +02:00
|
|
|
# For atomic ops
|
|
|
|
CFLAGS+= -march=i586
|
2018-10-08 01:12:49 +02:00
|
|
|
pre-build-fix:
|
2017-12-17 02:00:02 +01:00
|
|
|
${TOOLS_PLATFORM.paxctl} +am ${WRKDIR}/rust-bootstrap/bin/cargo
|
2017-10-21 14:15:56 +02:00
|
|
|
.endif
|
2017-02-23 10:35:16 +01:00
|
|
|
.if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
|
2018-12-08 08:24:54 +01:00
|
|
|
RUST_STAGE0_VER= 1.30.1
|
2016-09-12 15:27:33 +02:00
|
|
|
RUST_ARCH= x86_64-unknown-netbsd
|
2017-02-23 10:35:16 +01:00
|
|
|
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
Update to 1.20.0
* Disable SunOS/Solaris support because newer bootstrap is not available
* Include Rust libraries and Cargo
Changelog:
Version 1.20.0 (2017-08-31)
Language
Associated constants are now stabilised.
A lot of macro bugs are now fixed.
Compiler
Struct fields are now properly coerced to the expected field type.
Enabled wasm LLVM backend WASM can now be built with the wasm32-experimental-emscripten target.
Changed some of the error messages to be more helpful.
Add support for RELRO(RELocation Read-Only) for platforms that support it.
rustc now reports the total number of errors on compilation failure previously this was only the number of errors in the pass that failed.
Expansion in rustc has been sped up 29x.
added msp430-none-elf target.
rustc will now suggest one-argument enum variant to fix type mismatch when applicable
Fixes backtraces on Redox
rustc now identifies different versions of same crate when absolute paths of different types match in an error message.
Libraries
Relaxed Debug constraints on {HashMap,BTreeMap}::{Keys,Values}.
Impl PartialEq, Eq, PartialOrd, Ord, Debug, Hash for unsized tuples.
Impl fmt::{Display, Debug} for Ref, RefMut, MutexGuard, RwLockReadGuard, RwLockWriteGuard
Impl Clone for DefaultHasher.
Impl Sync for SyncSender.
Impl FromStr for char
Fixed how {f32, f64}::{is_sign_negative, is_sign_positive} handles NaN.
allow messages in the unimplemented!() macro. ie. unimplemented!("Waiting for 1.21 to be stable")
pub(restricted) is now supported in the thread_local! macro.
Upgrade to Unicode 10.0.0
Reimplemented {f32, f64}::{min, max} in Rust instead of using CMath.
Skip the main thread's manual stack guard on Linux
Iterator::nth for ops::{Range, RangeFrom} is now done in O(1) time
#[repr(align(N))] attribute max number is now 2^31 - 1. This was previously 2^15.
{OsStr, Path}::Display now avoids allocations where possible
Stabilized APIs
CStr::into_c_string
CString::as_c_str
CString::into_boxed_c_str
Chain::get_mut
Chain::get_ref
Chain::into_inner
Option::get_or_insert_with
Option::get_or_insert
OsStr::into_os_string
OsString::into_boxed_os_str
Take::get_mut
Take::get_ref
Utf8Error::error_len
char::EscapeDebug
char::escape_debug
compile_error!
f32::from_bits
f32::to_bits
f64::from_bits
f64::to_bits
mem::ManuallyDrop
slice::sort_unstable_by_key
slice::sort_unstable_by
slice::sort_unstable
str::from_boxed_utf8_unchecked
str::as_bytes_mut
str::as_bytes_mut
str::from_utf8_mut
str::from_utf8_unchecked_mut
str::get_mut
str::get_unchecked_mut
str::get_unchecked
str::get
str::into_boxed_bytes
Cargo
Cargo API token location moved from ~/.cargo/config to ~/.cargo/credentials.
Cargo will now build main.rs binaries that are in sub-directories of src/bin. ie. Having src/bin/server/main.rs and src/bin/client/main.rs generates target/debug/server and target/debug/client
You can now specify version of a binary when installed through cargo install using --vers.
Added --no-fail-fast flag to cargo to run all benchmarks regardless of failure.
Changed the convention around which file is the crate root.
The include/exclude property in Cargo.toml now accepts gitignore paths instead of glob patterns. Glob patterns are now deprecated.
Compatibility Notes
Functions with 'static in their return types will now not be as usable as if they were using lifetime parameters instead.
The reimplementation of {f32, f64}::is_sign_{negative, positive} now takes the sign of NaN into account where previously didn't.
Version 1.19.0 (2017-07-20)
Language
Numeric fields can now be used for creating tuple structs. RFC 1506 For example struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };.
Macro recursion limit increased to 1024 from 64.
Added lint for detecting unused macros.
loop can now return a value with break. RFC 1624 For example: let x = loop { break 7; };
C compatible unions are now available. RFC 1444 They can only contain Copy types and cannot have a Drop implementation. Example: union Foo { bar: u8, baz: usize }
Non capturing closures can now be coerced into fns, RFC 1558 Example: let foo: fn(u8) -> u8 = |v: u8| { v };
Compiler
Add support for bootstrapping the Rust compiler toolchain on Android.
Change arm-linux-androideabi to correspond to the armeabi official ABI. If you wish to continue targeting the armeabi-v7a ABI you should use --target armv7-linux-androideabi.
Fixed ICE when removing a source file between compilation sessions.
Minor optimisation of string operations.
Compiler error message is now aborting due to previous error(s) instead of aborting due to N previous errors This was previously inaccurate and would only count certain kinds of errors.
The compiler now supports Visual Studio 2017
The compiler is now built against LLVM 4.0.1 by default
Added a lot of new error codes
Added target-feature=+crt-static option RFC 1721 Which allows libraries with C Run-time Libraries(CRT) to be statically linked.
Fixed various ARM codegen bugs
Libraries
String now implements FromIterator<Cow<'a, str>> and Extend<Cow<'a, str>>
Vec now implements From<&mut [T]>
Box<[u8]> now implements From<Box<str>>
SplitWhitespace now implements Clone
[u8]::reverse is now 5x faster and [u16]::reverse is now 1.5x faster
eprint! and eprintln! macros added to prelude. Same as the print! macros, but for printing to stderr.
Stabilized APIs
OsString::shrink_to_fit
cmp::Reverse
Command::envs
thread::ThreadId
Cargo
Build scripts can now add environment variables to the environment the crate is being compiled in. Example: println!("cargo:rustc-env=FOO=bar");
Subcommands now replace the current process rather than spawning a new child process
Workspace members can now accept glob file patterns
Added --all flag to the cargo bench subcommand to run benchmarks of all the members in a given workspace.
Updated libssh2-sys to 0.2.6
Target directory path is now in the cargmetadata
Cargo no longer checks out a local working directory for the crates.io index This should provide smaller file size for the registry, and improve cloning times, especially on Windows machines.
Added an --exclude option for excluding certai using the --all option
Cargo will now automatically retry when receiving a 5xx error from crates.io
The --features option now accepts multiple comma or space delimited values.
Added support for custom target specific runners
Misc
Added ow prefer to download rust packages with XZ compression over GZip packages.
Added the ability to escape # in rust documentation By adding additional #'s ie. ## is now #
Compatibility Notes
MutexGuard<T> may only be Sync if T is Sync.
-Z flagning for a year previous to this.
As a result of the -Z flag change, the cargo-check plugin no longer works. Users should migrate to the built-in check command, which has been available since 1.16.
Ending a float literal with ._ is now a hard erro use ::self::foo; is now a hard error. self paths are always relative while the :: prefix makes a path absolute, but was ignored and the path was relative regardless.
Floating point constants in match patterns is now a hard error This was previously ts that don't derive PartialEq & Eq used match patterns is now a hard error This was previously a warning.
Lifetimes named '_ are no longer allowed. This was previously a warning.
From the pound escape, lines consisting of multiple #s are now visible
It is an error to reexport private enum variants. This is known to break a number of crates that depend on an older version of mustache.
On Windows, if VCINSTALLDIR is set incorrectly, rustc will try to use it to find the linker, and the build will fail where it did not previously
Version 1.18.0 (2017-06-08)
Language
Stabilize pub(restricted) pub can now accept a module path to make the item visible to just that module tree. Also accepts the keyword crate to make something public to the whole crate but not users of the library. Example: pub(crate) mod utils;. RFC 1422.
Stabilize #![windows_subsystem] attribute conservative exposure of the /SUBSYSTEM linker flag on Windows platforms. RFC 1665.
Refactor of trait object type parsing Now ty in macros can accept types like Write + Send, trailing + are now supported in trait objects, and better error reporting for trait objects starting with ?Sized.
0e+10 is now a valid floating point literal
Now warns if you bind a lifetime parameter to 'static
Tuples, Enum variant fields, and structs with no repr attribute or with #[repr(Rust)] are reordered to minimize padding and produce a smaller representation in some cases.
Compiler
rustc can now emit mir with --emit mir
Improved LLVM IR for trivial functions
Added explanation for E0090(Wrong number of lifetimes are supplied)
rustc compilation is now 15%-20% faster Thanks to optimisation opportunities found through profiling
Improved backtrace formatting when panicking
Libraries
Specialized Vec::from_iter being passed vec::IntoIter if the iterator hasn't been advanced the original Vec is reassembled with no actual iteration or reallocation.
Simplified HashMap Bucket interface provides performance improvements for iterating and cloning.
Specialize Vec::from_elem to use calloc
Fixed Race condition in fs::create_dir_all
No longer caching stdio on Windows
Optimized insertion sort in slice insertion sort in some cases 2.50%~ faster and in one case now 12.50% faster.
Optimized AtomicBool::fetch_nand
Stabilized APIs
Child::try_wait
HashMap::retain
HashSet::retain
PeekMut::pop
TcpStream::peek
UdpSocket::peek
UdpSocket::peek_from
Cargo
Added partial Pijul support Pijul is a version control system in Rust. You can now create new cargo projects with Pijul using cargo new --vcs pijul
Now always emits build script warnings for crates that fail to build
Added Android build support
Added --bins and --tests flags now you can build all programs of a certain type, for example cargo build --bins will build all binaries.
Added support for haiku
Misc
rustdoc can now use pulldown-cmark with the --enable-commonmark flag
Added rust-winbg script for better debugging on Windows
Rust now uses the official cross compiler for NetBSD
rustdoc now accepts # at the start of files
Fixed jemalloc support for musl
Compatibility Notes
Changes to how the 0 flag works in format! Padding zeroes are now always placed after the sign if it exists and before the digits. With the # flag the zeroes are placed after the prefix and before the digits.
Due to the struct field optimisation, using transmute on structs that have no repr attribute or #[repr(Rust)] will no longer work. This has always been undefined behavior, but is now more likely to break in practice.
The refactor of trait object type parsing fixed a bug where + was receiving the wrong priority parsing things like &for<'a> Tr<'a> + Send as &(for<'a> Tr<'a> + Send) instead of (&for<'a> Tr<'a>) + Send
Overlapping inherent impls are now a hard error
PartialOrd and Ord must agree on the ordering.
rustc main.rs -o out --emit=asm,llvm-ir Now will output out.asm and out.ll instead of only one of the filetypes.
calling a function that returns Self will no longer work when the size of Self cannot be statically determined.
rustc now builds with a "pthreads" flavour of MinGW for Windows GNU this has caused a few regressions namely:
Changed the link order of local static/dynamic libraries (respecting the order on given rather than having the compiler reorder).
Changed how MinGW is linked, native code linked to dynamic libraries may require manually linking to the gcc support library (for the native code itself)
Version 1.17.0 (2017-04-27)
Language
The lifetime of statics and consts defaults to 'static. RFC 1623
Fields of structs may be initialized without duplicating the field/variable names. RFC 1682
Self may be included in the where clause of impls. RFC 1647
When coercing to an unsized type lifetimes must be equal. That is, there is no subtyping between T and U when T: Unsize<U>. For example, coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
Values passed to the indexing operator, [], automatically coerce
Static variables may contain references to other statics
Compiler
Exit quickly on only --emit dep-info
Make -C relocation-model more correctly determine whether the linker creates a position-independent executable
Add -C overflow-checks to directly control whether integer overflow panics
The rustc type checker now checks items on demand instead of in a single in-order pass. This is mostly an internal refactoring in support of future work, including incremental type checking, but also resolves RFC 1647, allowing Self to appear in impl where clauses.
Optimize vtable loads
Turn off vectorization for Emscripten targets
Provide suggestions for unknown macros imported with use
Fix ICEs in path resolution
Strip exception handling code on Emscripten when panic=abort
Add clearer error message using &str + &str
Stabilized APIs
Arc::into_raw
Arc::from_raw
Arc::ptr_eq
Rc::into_raw
Rc::from_raw
Rc::ptr_eq
Ordering::then
Ordering::then_with
BTreeMap::range
BTreeMap::range_mut
collections::Bound
process::abort
ptr::read_unaligned
ptr::write_unaligned
Result::expect_err
Cell::swap
Cell::replace
Cell::into_inner
Cell::take
Libraries
BTreeMap and BTreeSet can iterate over ranges
Cell can store non-Copy types. RFC 1651
String implements FromIterator<&char>
Box implements a number of new conversions: From<Box<str>> for String, From<Box<[T]>> for Vec<T>, From<Box<CStr>> for CString, From<Box<OsStr>> for OsString, From<Box<Path>> for PathBuf, Into<Box<str>> for String, Into<Box<[T]>> for Vec<T>, Into<Box<CStr>> for CString, Into<Box<OsStr>> for OsString, Into<Box<Path>> for PathBuf, Default for Box<str>, Default for Box<CStr>, Default for Box<OsStr>, From<&CStr> for Box<CStr>, From<&OsStr> for Box<OsStr>, From<&Path> for Box<Path>
ffi::FromBytesWithNulError implements Error and Display
Specialize PartialOrd<A> for [A] where A: Ord
Slightly optimize slice::sort
Add ToString trait specialization for Cow<'a, str> and String
Box<[T]> implements From<&[T]> where T: Copy, Box<str> implements From<&str>
IpAddr implements From for various arrays. SocketAddr implements From<(I, u16)> where I: Into<IpAddr>
format! estimates the needed capacity before writing a string
Support unprivileged symlink creation in Windows
PathBuf implements Default
Implement PartialEq<[A]> for VecDeque<A>
HashMap resizes adaptively to guard against DOS attacks and poor hash functions.
Cargo
Add cargo check --all
Add an option to ignore SSL revocation checking
Add cargo run --package
Add required_features
Assume build.rs is a build script
Find workspace via workspace_root link in containing member
Misc
Documentation is rendered with mdbook instead of the obsolete, in-tree rustbook
The "Unstable Book" documents nightly-only features
Improve the style of the sidebar in rustdoc output
Configure build correctly on 64-bit CPU's with the armhf ABI
Fix MSP430 breakage due to i128
Preliminary Solaris/SPARCv9 support
rustc is linked statically on Windows MSVC targets, allowing it to run without installing the MSVC runtime.
rustdoc --test includes file names in test names
This release includes builds of std for sparc64-unknown-linux-gnu, aarch64-unknown-linux-fuchsia, and x86_64-unknown-linux-fuchsia.
Initial support for aarch64-unknown-freebsd
Initial support for i686-unknown-netbsd
This release no longer includes the old makefile build system. Rust is built with a custom build system, written in Rust, and with Cargo.
Add Debug implementations for libcollection structs
TypeId implements PartialOrd and Ord
--test-threads=0 produces an error
rustup installs documentation by default
The Rust source includes NatVis visualizations. These can be used by WinDbg and Visual Studio to improve the debugging experience.
Compatibility Notes
Rust 1.17 does not correctly detect the MSVC 2017 linker. As a workaround, either use MSVC 2015 or run vcvars.bat.
When coercing to an unsized type lifetimes must be equal. That is, disallow subtyping between T and U when T: Unsize<U>, e.g. coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
format! and Display::to_string panic if an underlying formatting implementation returns an error. Previously the error was silently ignored. It is incorrect for write_fmt to return an error when writing to a string.
In-tree crates are verified to be unstable. Previously, some minor crates were marked stable and could be accessed from the stable toolchain.
Rust git source no longer includes vendored crates. Those that need to build with vendored crates should build from release tarballs.
Fix inert attributes from proc_macro_derives
During crate resolution, rustc prefers a crate in the sysroot if two crates are otherwise identical. Unlikely to be encountered outside the Rust build system.
Fixed bugs around how type inference interacts with dead-code. The existing code generally ignores the type of dead-code unless a type-hint is provided; this can cause surprising inference interactions particularly around defaulting. The new code uniformly ignores the result type of dead-code.
Tuple-struct constructors with private fields are no longer visible
Lifetime parameters that do not appear in the arguments are now considered early-bound, resolving a soundness bug (#32330). The hr_lifetime_in_assoc_type future-compatibility lint has been in effect since April of 2016.
rustdoc: fix doctests with non-feature crate attributes
Make transmuting from fn item types to pointer-sized types a hard error
2017-09-30 06:42:43 +02:00
|
|
|
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
|
|
|
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
|
2018-10-08 01:12:49 +02:00
|
|
|
pre-build-fix:
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
.endif
|
2018-12-22 00:12:34 +01:00
|
|
|
.if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) || make(distinfo) || make (makesum) || make(mdi)
|
|
|
|
RUST_STAGE0_VER= 1.31.1
|
|
|
|
RUST_ARCH= powerpc-unknown-netbsd
|
|
|
|
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
|
|
|
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
|
|
|
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
|
|
|
|
# Do not trust he@.
|
|
|
|
SITES.${RUST_STAGE0}= ftp://golden-delicious.urc.uninett.no/pub/rust/
|
|
|
|
SITES.${RUST_STD_STAGE0}= ftp://golden-delicious.urc.uninett.no/pub/rust/
|
|
|
|
pre-build-fix:
|
|
|
|
.endif
|
|
|
|
.if !empty(MACHINE_PLATFORM:MNetBSD-*-sparc64) || make(distinfo) || make (makesum) || make(mdi)
|
|
|
|
RUST_STAGE0_VER= 1.31.1
|
|
|
|
RUST_ARCH= sparc64-unknown-netbsd
|
|
|
|
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
|
|
|
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
|
|
|
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
|
2018-12-08 08:24:54 +01:00
|
|
|
## Do not trust he@.
|
2018-12-22 00:12:34 +01:00
|
|
|
SITES.${RUST_STAGE0}= ftp://golden-delicious.urc.uninett.no/pub/rust/
|
|
|
|
SITES.${RUST_STD_STAGE0}= ftp://golden-delicious.urc.uninett.no/pub/rust/
|
|
|
|
pre-build-fix:
|
|
|
|
.endif
|
|
|
|
.if !empty(MACHINE_PLATFORM:MNetBSD-*-earmv7hf) || make(distinfo) || make (makesum) || make(mdi)
|
|
|
|
RUST_ARCH= armv7-unknown-netbsd-eabihf
|
|
|
|
RUST_STAGE0_VER= 1.31.1
|
|
|
|
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
|
|
|
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
|
|
|
|
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
|
|
|
|
# Do not trust he@.
|
|
|
|
SITES.${RUST_STAGE0}= ftp://golden-delicious.urc.uninett.no/pub/rust/
|
|
|
|
SITES.${RUST_STD_STAGE0}= ftp://golden-delicious.urc.uninett.no/pub/rust/
|
|
|
|
pre-build-fix:
|
|
|
|
.endif
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
|
2017-11-04 16:51:43 +01:00
|
|
|
# You may override RUST_BOOTSTRAP_PATH and RUST_ARCH in mk.conf if you have a local bootstrap compiler.
|
|
|
|
.if !defined(RUST_ARCH) && !defined(RUST_BOOTSTRAP_PATH)
|
2017-02-23 10:35:16 +01:00
|
|
|
NOT_FOR_PLATFORM+= ${MACHINE_PLATFORM}
|
2017-11-04 16:51:43 +01:00
|
|
|
.else
|
|
|
|
RUST_BOOTSTRAP_PATH?= ${WRKDIR}/rust-bootstrap
|
2016-09-11 20:19:54 +02:00
|
|
|
.endif
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
|
|
|
|
.if ${OPSYS} == "SunOS"
|
|
|
|
BUILD_DEPENDS+= coreutils>=0:../../sysutils/coreutils
|
|
|
|
TOOLS_CREATE+= md5sum
|
|
|
|
TOOLS_PATH.md5sum= ${PREFIX}/bin/gmd5sum
|
2018-11-27 16:45:23 +01:00
|
|
|
.else
|
|
|
|
LD_LIBRARY_PATH= ${RUST_BOOTSTRAP_PATH}/lib
|
|
|
|
PKGSRC_MAKE_ENV+= LD_LIBRARY_PATH=${LD_LIBRARY_PATH:Q}
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
.endif
|
|
|
|
|
Update to 1.20.0
* Disable SunOS/Solaris support because newer bootstrap is not available
* Include Rust libraries and Cargo
Changelog:
Version 1.20.0 (2017-08-31)
Language
Associated constants are now stabilised.
A lot of macro bugs are now fixed.
Compiler
Struct fields are now properly coerced to the expected field type.
Enabled wasm LLVM backend WASM can now be built with the wasm32-experimental-emscripten target.
Changed some of the error messages to be more helpful.
Add support for RELRO(RELocation Read-Only) for platforms that support it.
rustc now reports the total number of errors on compilation failure previously this was only the number of errors in the pass that failed.
Expansion in rustc has been sped up 29x.
added msp430-none-elf target.
rustc will now suggest one-argument enum variant to fix type mismatch when applicable
Fixes backtraces on Redox
rustc now identifies different versions of same crate when absolute paths of different types match in an error message.
Libraries
Relaxed Debug constraints on {HashMap,BTreeMap}::{Keys,Values}.
Impl PartialEq, Eq, PartialOrd, Ord, Debug, Hash for unsized tuples.
Impl fmt::{Display, Debug} for Ref, RefMut, MutexGuard, RwLockReadGuard, RwLockWriteGuard
Impl Clone for DefaultHasher.
Impl Sync for SyncSender.
Impl FromStr for char
Fixed how {f32, f64}::{is_sign_negative, is_sign_positive} handles NaN.
allow messages in the unimplemented!() macro. ie. unimplemented!("Waiting for 1.21 to be stable")
pub(restricted) is now supported in the thread_local! macro.
Upgrade to Unicode 10.0.0
Reimplemented {f32, f64}::{min, max} in Rust instead of using CMath.
Skip the main thread's manual stack guard on Linux
Iterator::nth for ops::{Range, RangeFrom} is now done in O(1) time
#[repr(align(N))] attribute max number is now 2^31 - 1. This was previously 2^15.
{OsStr, Path}::Display now avoids allocations where possible
Stabilized APIs
CStr::into_c_string
CString::as_c_str
CString::into_boxed_c_str
Chain::get_mut
Chain::get_ref
Chain::into_inner
Option::get_or_insert_with
Option::get_or_insert
OsStr::into_os_string
OsString::into_boxed_os_str
Take::get_mut
Take::get_ref
Utf8Error::error_len
char::EscapeDebug
char::escape_debug
compile_error!
f32::from_bits
f32::to_bits
f64::from_bits
f64::to_bits
mem::ManuallyDrop
slice::sort_unstable_by_key
slice::sort_unstable_by
slice::sort_unstable
str::from_boxed_utf8_unchecked
str::as_bytes_mut
str::as_bytes_mut
str::from_utf8_mut
str::from_utf8_unchecked_mut
str::get_mut
str::get_unchecked_mut
str::get_unchecked
str::get
str::into_boxed_bytes
Cargo
Cargo API token location moved from ~/.cargo/config to ~/.cargo/credentials.
Cargo will now build main.rs binaries that are in sub-directories of src/bin. ie. Having src/bin/server/main.rs and src/bin/client/main.rs generates target/debug/server and target/debug/client
You can now specify version of a binary when installed through cargo install using --vers.
Added --no-fail-fast flag to cargo to run all benchmarks regardless of failure.
Changed the convention around which file is the crate root.
The include/exclude property in Cargo.toml now accepts gitignore paths instead of glob patterns. Glob patterns are now deprecated.
Compatibility Notes
Functions with 'static in their return types will now not be as usable as if they were using lifetime parameters instead.
The reimplementation of {f32, f64}::is_sign_{negative, positive} now takes the sign of NaN into account where previously didn't.
Version 1.19.0 (2017-07-20)
Language
Numeric fields can now be used for creating tuple structs. RFC 1506 For example struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };.
Macro recursion limit increased to 1024 from 64.
Added lint for detecting unused macros.
loop can now return a value with break. RFC 1624 For example: let x = loop { break 7; };
C compatible unions are now available. RFC 1444 They can only contain Copy types and cannot have a Drop implementation. Example: union Foo { bar: u8, baz: usize }
Non capturing closures can now be coerced into fns, RFC 1558 Example: let foo: fn(u8) -> u8 = |v: u8| { v };
Compiler
Add support for bootstrapping the Rust compiler toolchain on Android.
Change arm-linux-androideabi to correspond to the armeabi official ABI. If you wish to continue targeting the armeabi-v7a ABI you should use --target armv7-linux-androideabi.
Fixed ICE when removing a source file between compilation sessions.
Minor optimisation of string operations.
Compiler error message is now aborting due to previous error(s) instead of aborting due to N previous errors This was previously inaccurate and would only count certain kinds of errors.
The compiler now supports Visual Studio 2017
The compiler is now built against LLVM 4.0.1 by default
Added a lot of new error codes
Added target-feature=+crt-static option RFC 1721 Which allows libraries with C Run-time Libraries(CRT) to be statically linked.
Fixed various ARM codegen bugs
Libraries
String now implements FromIterator<Cow<'a, str>> and Extend<Cow<'a, str>>
Vec now implements From<&mut [T]>
Box<[u8]> now implements From<Box<str>>
SplitWhitespace now implements Clone
[u8]::reverse is now 5x faster and [u16]::reverse is now 1.5x faster
eprint! and eprintln! macros added to prelude. Same as the print! macros, but for printing to stderr.
Stabilized APIs
OsString::shrink_to_fit
cmp::Reverse
Command::envs
thread::ThreadId
Cargo
Build scripts can now add environment variables to the environment the crate is being compiled in. Example: println!("cargo:rustc-env=FOO=bar");
Subcommands now replace the current process rather than spawning a new child process
Workspace members can now accept glob file patterns
Added --all flag to the cargo bench subcommand to run benchmarks of all the members in a given workspace.
Updated libssh2-sys to 0.2.6
Target directory path is now in the cargmetadata
Cargo no longer checks out a local working directory for the crates.io index This should provide smaller file size for the registry, and improve cloning times, especially on Windows machines.
Added an --exclude option for excluding certai using the --all option
Cargo will now automatically retry when receiving a 5xx error from crates.io
The --features option now accepts multiple comma or space delimited values.
Added support for custom target specific runners
Misc
Added ow prefer to download rust packages with XZ compression over GZip packages.
Added the ability to escape # in rust documentation By adding additional #'s ie. ## is now #
Compatibility Notes
MutexGuard<T> may only be Sync if T is Sync.
-Z flagning for a year previous to this.
As a result of the -Z flag change, the cargo-check plugin no longer works. Users should migrate to the built-in check command, which has been available since 1.16.
Ending a float literal with ._ is now a hard erro use ::self::foo; is now a hard error. self paths are always relative while the :: prefix makes a path absolute, but was ignored and the path was relative regardless.
Floating point constants in match patterns is now a hard error This was previously ts that don't derive PartialEq & Eq used match patterns is now a hard error This was previously a warning.
Lifetimes named '_ are no longer allowed. This was previously a warning.
From the pound escape, lines consisting of multiple #s are now visible
It is an error to reexport private enum variants. This is known to break a number of crates that depend on an older version of mustache.
On Windows, if VCINSTALLDIR is set incorrectly, rustc will try to use it to find the linker, and the build will fail where it did not previously
Version 1.18.0 (2017-06-08)
Language
Stabilize pub(restricted) pub can now accept a module path to make the item visible to just that module tree. Also accepts the keyword crate to make something public to the whole crate but not users of the library. Example: pub(crate) mod utils;. RFC 1422.
Stabilize #![windows_subsystem] attribute conservative exposure of the /SUBSYSTEM linker flag on Windows platforms. RFC 1665.
Refactor of trait object type parsing Now ty in macros can accept types like Write + Send, trailing + are now supported in trait objects, and better error reporting for trait objects starting with ?Sized.
0e+10 is now a valid floating point literal
Now warns if you bind a lifetime parameter to 'static
Tuples, Enum variant fields, and structs with no repr attribute or with #[repr(Rust)] are reordered to minimize padding and produce a smaller representation in some cases.
Compiler
rustc can now emit mir with --emit mir
Improved LLVM IR for trivial functions
Added explanation for E0090(Wrong number of lifetimes are supplied)
rustc compilation is now 15%-20% faster Thanks to optimisation opportunities found through profiling
Improved backtrace formatting when panicking
Libraries
Specialized Vec::from_iter being passed vec::IntoIter if the iterator hasn't been advanced the original Vec is reassembled with no actual iteration or reallocation.
Simplified HashMap Bucket interface provides performance improvements for iterating and cloning.
Specialize Vec::from_elem to use calloc
Fixed Race condition in fs::create_dir_all
No longer caching stdio on Windows
Optimized insertion sort in slice insertion sort in some cases 2.50%~ faster and in one case now 12.50% faster.
Optimized AtomicBool::fetch_nand
Stabilized APIs
Child::try_wait
HashMap::retain
HashSet::retain
PeekMut::pop
TcpStream::peek
UdpSocket::peek
UdpSocket::peek_from
Cargo
Added partial Pijul support Pijul is a version control system in Rust. You can now create new cargo projects with Pijul using cargo new --vcs pijul
Now always emits build script warnings for crates that fail to build
Added Android build support
Added --bins and --tests flags now you can build all programs of a certain type, for example cargo build --bins will build all binaries.
Added support for haiku
Misc
rustdoc can now use pulldown-cmark with the --enable-commonmark flag
Added rust-winbg script for better debugging on Windows
Rust now uses the official cross compiler for NetBSD
rustdoc now accepts # at the start of files
Fixed jemalloc support for musl
Compatibility Notes
Changes to how the 0 flag works in format! Padding zeroes are now always placed after the sign if it exists and before the digits. With the # flag the zeroes are placed after the prefix and before the digits.
Due to the struct field optimisation, using transmute on structs that have no repr attribute or #[repr(Rust)] will no longer work. This has always been undefined behavior, but is now more likely to break in practice.
The refactor of trait object type parsing fixed a bug where + was receiving the wrong priority parsing things like &for<'a> Tr<'a> + Send as &(for<'a> Tr<'a> + Send) instead of (&for<'a> Tr<'a>) + Send
Overlapping inherent impls are now a hard error
PartialOrd and Ord must agree on the ordering.
rustc main.rs -o out --emit=asm,llvm-ir Now will output out.asm and out.ll instead of only one of the filetypes.
calling a function that returns Self will no longer work when the size of Self cannot be statically determined.
rustc now builds with a "pthreads" flavour of MinGW for Windows GNU this has caused a few regressions namely:
Changed the link order of local static/dynamic libraries (respecting the order on given rather than having the compiler reorder).
Changed how MinGW is linked, native code linked to dynamic libraries may require manually linking to the gcc support library (for the native code itself)
Version 1.17.0 (2017-04-27)
Language
The lifetime of statics and consts defaults to 'static. RFC 1623
Fields of structs may be initialized without duplicating the field/variable names. RFC 1682
Self may be included in the where clause of impls. RFC 1647
When coercing to an unsized type lifetimes must be equal. That is, there is no subtyping between T and U when T: Unsize<U>. For example, coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
Values passed to the indexing operator, [], automatically coerce
Static variables may contain references to other statics
Compiler
Exit quickly on only --emit dep-info
Make -C relocation-model more correctly determine whether the linker creates a position-independent executable
Add -C overflow-checks to directly control whether integer overflow panics
The rustc type checker now checks items on demand instead of in a single in-order pass. This is mostly an internal refactoring in support of future work, including incremental type checking, but also resolves RFC 1647, allowing Self to appear in impl where clauses.
Optimize vtable loads
Turn off vectorization for Emscripten targets
Provide suggestions for unknown macros imported with use
Fix ICEs in path resolution
Strip exception handling code on Emscripten when panic=abort
Add clearer error message using &str + &str
Stabilized APIs
Arc::into_raw
Arc::from_raw
Arc::ptr_eq
Rc::into_raw
Rc::from_raw
Rc::ptr_eq
Ordering::then
Ordering::then_with
BTreeMap::range
BTreeMap::range_mut
collections::Bound
process::abort
ptr::read_unaligned
ptr::write_unaligned
Result::expect_err
Cell::swap
Cell::replace
Cell::into_inner
Cell::take
Libraries
BTreeMap and BTreeSet can iterate over ranges
Cell can store non-Copy types. RFC 1651
String implements FromIterator<&char>
Box implements a number of new conversions: From<Box<str>> for String, From<Box<[T]>> for Vec<T>, From<Box<CStr>> for CString, From<Box<OsStr>> for OsString, From<Box<Path>> for PathBuf, Into<Box<str>> for String, Into<Box<[T]>> for Vec<T>, Into<Box<CStr>> for CString, Into<Box<OsStr>> for OsString, Into<Box<Path>> for PathBuf, Default for Box<str>, Default for Box<CStr>, Default for Box<OsStr>, From<&CStr> for Box<CStr>, From<&OsStr> for Box<OsStr>, From<&Path> for Box<Path>
ffi::FromBytesWithNulError implements Error and Display
Specialize PartialOrd<A> for [A] where A: Ord
Slightly optimize slice::sort
Add ToString trait specialization for Cow<'a, str> and String
Box<[T]> implements From<&[T]> where T: Copy, Box<str> implements From<&str>
IpAddr implements From for various arrays. SocketAddr implements From<(I, u16)> where I: Into<IpAddr>
format! estimates the needed capacity before writing a string
Support unprivileged symlink creation in Windows
PathBuf implements Default
Implement PartialEq<[A]> for VecDeque<A>
HashMap resizes adaptively to guard against DOS attacks and poor hash functions.
Cargo
Add cargo check --all
Add an option to ignore SSL revocation checking
Add cargo run --package
Add required_features
Assume build.rs is a build script
Find workspace via workspace_root link in containing member
Misc
Documentation is rendered with mdbook instead of the obsolete, in-tree rustbook
The "Unstable Book" documents nightly-only features
Improve the style of the sidebar in rustdoc output
Configure build correctly on 64-bit CPU's with the armhf ABI
Fix MSP430 breakage due to i128
Preliminary Solaris/SPARCv9 support
rustc is linked statically on Windows MSVC targets, allowing it to run without installing the MSVC runtime.
rustdoc --test includes file names in test names
This release includes builds of std for sparc64-unknown-linux-gnu, aarch64-unknown-linux-fuchsia, and x86_64-unknown-linux-fuchsia.
Initial support for aarch64-unknown-freebsd
Initial support for i686-unknown-netbsd
This release no longer includes the old makefile build system. Rust is built with a custom build system, written in Rust, and with Cargo.
Add Debug implementations for libcollection structs
TypeId implements PartialOrd and Ord
--test-threads=0 produces an error
rustup installs documentation by default
The Rust source includes NatVis visualizations. These can be used by WinDbg and Visual Studio to improve the debugging experience.
Compatibility Notes
Rust 1.17 does not correctly detect the MSVC 2017 linker. As a workaround, either use MSVC 2015 or run vcvars.bat.
When coercing to an unsized type lifetimes must be equal. That is, disallow subtyping between T and U when T: Unsize<U>, e.g. coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
format! and Display::to_string panic if an underlying formatting implementation returns an error. Previously the error was silently ignored. It is incorrect for write_fmt to return an error when writing to a string.
In-tree crates are verified to be unstable. Previously, some minor crates were marked stable and could be accessed from the stable toolchain.
Rust git source no longer includes vendored crates. Those that need to build with vendored crates should build from release tarballs.
Fix inert attributes from proc_macro_derives
During crate resolution, rustc prefers a crate in the sysroot if two crates are otherwise identical. Unlikely to be encountered outside the Rust build system.
Fixed bugs around how type inference interacts with dead-code. The existing code generally ignores the type of dead-code unless a type-hint is provided; this can cause surprising inference interactions particularly around defaulting. The new code uniformly ignores the result type of dead-code.
Tuple-struct constructors with private fields are no longer visible
Lifetime parameters that do not appear in the arguments are now considered early-bound, resolving a soundness bug (#32330). The hr_lifetime_in_assoc_type future-compatibility lint has been in effect since April of 2016.
rustdoc: fix doctests with non-feature crate attributes
Make transmuting from fn item types to pointer-sized types a hard error
2017-09-30 06:42:43 +02:00
|
|
|
SUBST_CLASSES+= rpath
|
2018-07-04 15:40:07 +02:00
|
|
|
SUBST_STAGE.rpath= pre-configure
|
Update to 1.20.0
* Disable SunOS/Solaris support because newer bootstrap is not available
* Include Rust libraries and Cargo
Changelog:
Version 1.20.0 (2017-08-31)
Language
Associated constants are now stabilised.
A lot of macro bugs are now fixed.
Compiler
Struct fields are now properly coerced to the expected field type.
Enabled wasm LLVM backend WASM can now be built with the wasm32-experimental-emscripten target.
Changed some of the error messages to be more helpful.
Add support for RELRO(RELocation Read-Only) for platforms that support it.
rustc now reports the total number of errors on compilation failure previously this was only the number of errors in the pass that failed.
Expansion in rustc has been sped up 29x.
added msp430-none-elf target.
rustc will now suggest one-argument enum variant to fix type mismatch when applicable
Fixes backtraces on Redox
rustc now identifies different versions of same crate when absolute paths of different types match in an error message.
Libraries
Relaxed Debug constraints on {HashMap,BTreeMap}::{Keys,Values}.
Impl PartialEq, Eq, PartialOrd, Ord, Debug, Hash for unsized tuples.
Impl fmt::{Display, Debug} for Ref, RefMut, MutexGuard, RwLockReadGuard, RwLockWriteGuard
Impl Clone for DefaultHasher.
Impl Sync for SyncSender.
Impl FromStr for char
Fixed how {f32, f64}::{is_sign_negative, is_sign_positive} handles NaN.
allow messages in the unimplemented!() macro. ie. unimplemented!("Waiting for 1.21 to be stable")
pub(restricted) is now supported in the thread_local! macro.
Upgrade to Unicode 10.0.0
Reimplemented {f32, f64}::{min, max} in Rust instead of using CMath.
Skip the main thread's manual stack guard on Linux
Iterator::nth for ops::{Range, RangeFrom} is now done in O(1) time
#[repr(align(N))] attribute max number is now 2^31 - 1. This was previously 2^15.
{OsStr, Path}::Display now avoids allocations where possible
Stabilized APIs
CStr::into_c_string
CString::as_c_str
CString::into_boxed_c_str
Chain::get_mut
Chain::get_ref
Chain::into_inner
Option::get_or_insert_with
Option::get_or_insert
OsStr::into_os_string
OsString::into_boxed_os_str
Take::get_mut
Take::get_ref
Utf8Error::error_len
char::EscapeDebug
char::escape_debug
compile_error!
f32::from_bits
f32::to_bits
f64::from_bits
f64::to_bits
mem::ManuallyDrop
slice::sort_unstable_by_key
slice::sort_unstable_by
slice::sort_unstable
str::from_boxed_utf8_unchecked
str::as_bytes_mut
str::as_bytes_mut
str::from_utf8_mut
str::from_utf8_unchecked_mut
str::get_mut
str::get_unchecked_mut
str::get_unchecked
str::get
str::into_boxed_bytes
Cargo
Cargo API token location moved from ~/.cargo/config to ~/.cargo/credentials.
Cargo will now build main.rs binaries that are in sub-directories of src/bin. ie. Having src/bin/server/main.rs and src/bin/client/main.rs generates target/debug/server and target/debug/client
You can now specify version of a binary when installed through cargo install using --vers.
Added --no-fail-fast flag to cargo to run all benchmarks regardless of failure.
Changed the convention around which file is the crate root.
The include/exclude property in Cargo.toml now accepts gitignore paths instead of glob patterns. Glob patterns are now deprecated.
Compatibility Notes
Functions with 'static in their return types will now not be as usable as if they were using lifetime parameters instead.
The reimplementation of {f32, f64}::is_sign_{negative, positive} now takes the sign of NaN into account where previously didn't.
Version 1.19.0 (2017-07-20)
Language
Numeric fields can now be used for creating tuple structs. RFC 1506 For example struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };.
Macro recursion limit increased to 1024 from 64.
Added lint for detecting unused macros.
loop can now return a value with break. RFC 1624 For example: let x = loop { break 7; };
C compatible unions are now available. RFC 1444 They can only contain Copy types and cannot have a Drop implementation. Example: union Foo { bar: u8, baz: usize }
Non capturing closures can now be coerced into fns, RFC 1558 Example: let foo: fn(u8) -> u8 = |v: u8| { v };
Compiler
Add support for bootstrapping the Rust compiler toolchain on Android.
Change arm-linux-androideabi to correspond to the armeabi official ABI. If you wish to continue targeting the armeabi-v7a ABI you should use --target armv7-linux-androideabi.
Fixed ICE when removing a source file between compilation sessions.
Minor optimisation of string operations.
Compiler error message is now aborting due to previous error(s) instead of aborting due to N previous errors This was previously inaccurate and would only count certain kinds of errors.
The compiler now supports Visual Studio 2017
The compiler is now built against LLVM 4.0.1 by default
Added a lot of new error codes
Added target-feature=+crt-static option RFC 1721 Which allows libraries with C Run-time Libraries(CRT) to be statically linked.
Fixed various ARM codegen bugs
Libraries
String now implements FromIterator<Cow<'a, str>> and Extend<Cow<'a, str>>
Vec now implements From<&mut [T]>
Box<[u8]> now implements From<Box<str>>
SplitWhitespace now implements Clone
[u8]::reverse is now 5x faster and [u16]::reverse is now 1.5x faster
eprint! and eprintln! macros added to prelude. Same as the print! macros, but for printing to stderr.
Stabilized APIs
OsString::shrink_to_fit
cmp::Reverse
Command::envs
thread::ThreadId
Cargo
Build scripts can now add environment variables to the environment the crate is being compiled in. Example: println!("cargo:rustc-env=FOO=bar");
Subcommands now replace the current process rather than spawning a new child process
Workspace members can now accept glob file patterns
Added --all flag to the cargo bench subcommand to run benchmarks of all the members in a given workspace.
Updated libssh2-sys to 0.2.6
Target directory path is now in the cargmetadata
Cargo no longer checks out a local working directory for the crates.io index This should provide smaller file size for the registry, and improve cloning times, especially on Windows machines.
Added an --exclude option for excluding certai using the --all option
Cargo will now automatically retry when receiving a 5xx error from crates.io
The --features option now accepts multiple comma or space delimited values.
Added support for custom target specific runners
Misc
Added ow prefer to download rust packages with XZ compression over GZip packages.
Added the ability to escape # in rust documentation By adding additional #'s ie. ## is now #
Compatibility Notes
MutexGuard<T> may only be Sync if T is Sync.
-Z flagning for a year previous to this.
As a result of the -Z flag change, the cargo-check plugin no longer works. Users should migrate to the built-in check command, which has been available since 1.16.
Ending a float literal with ._ is now a hard erro use ::self::foo; is now a hard error. self paths are always relative while the :: prefix makes a path absolute, but was ignored and the path was relative regardless.
Floating point constants in match patterns is now a hard error This was previously ts that don't derive PartialEq & Eq used match patterns is now a hard error This was previously a warning.
Lifetimes named '_ are no longer allowed. This was previously a warning.
From the pound escape, lines consisting of multiple #s are now visible
It is an error to reexport private enum variants. This is known to break a number of crates that depend on an older version of mustache.
On Windows, if VCINSTALLDIR is set incorrectly, rustc will try to use it to find the linker, and the build will fail where it did not previously
Version 1.18.0 (2017-06-08)
Language
Stabilize pub(restricted) pub can now accept a module path to make the item visible to just that module tree. Also accepts the keyword crate to make something public to the whole crate but not users of the library. Example: pub(crate) mod utils;. RFC 1422.
Stabilize #![windows_subsystem] attribute conservative exposure of the /SUBSYSTEM linker flag on Windows platforms. RFC 1665.
Refactor of trait object type parsing Now ty in macros can accept types like Write + Send, trailing + are now supported in trait objects, and better error reporting for trait objects starting with ?Sized.
0e+10 is now a valid floating point literal
Now warns if you bind a lifetime parameter to 'static
Tuples, Enum variant fields, and structs with no repr attribute or with #[repr(Rust)] are reordered to minimize padding and produce a smaller representation in some cases.
Compiler
rustc can now emit mir with --emit mir
Improved LLVM IR for trivial functions
Added explanation for E0090(Wrong number of lifetimes are supplied)
rustc compilation is now 15%-20% faster Thanks to optimisation opportunities found through profiling
Improved backtrace formatting when panicking
Libraries
Specialized Vec::from_iter being passed vec::IntoIter if the iterator hasn't been advanced the original Vec is reassembled with no actual iteration or reallocation.
Simplified HashMap Bucket interface provides performance improvements for iterating and cloning.
Specialize Vec::from_elem to use calloc
Fixed Race condition in fs::create_dir_all
No longer caching stdio on Windows
Optimized insertion sort in slice insertion sort in some cases 2.50%~ faster and in one case now 12.50% faster.
Optimized AtomicBool::fetch_nand
Stabilized APIs
Child::try_wait
HashMap::retain
HashSet::retain
PeekMut::pop
TcpStream::peek
UdpSocket::peek
UdpSocket::peek_from
Cargo
Added partial Pijul support Pijul is a version control system in Rust. You can now create new cargo projects with Pijul using cargo new --vcs pijul
Now always emits build script warnings for crates that fail to build
Added Android build support
Added --bins and --tests flags now you can build all programs of a certain type, for example cargo build --bins will build all binaries.
Added support for haiku
Misc
rustdoc can now use pulldown-cmark with the --enable-commonmark flag
Added rust-winbg script for better debugging on Windows
Rust now uses the official cross compiler for NetBSD
rustdoc now accepts # at the start of files
Fixed jemalloc support for musl
Compatibility Notes
Changes to how the 0 flag works in format! Padding zeroes are now always placed after the sign if it exists and before the digits. With the # flag the zeroes are placed after the prefix and before the digits.
Due to the struct field optimisation, using transmute on structs that have no repr attribute or #[repr(Rust)] will no longer work. This has always been undefined behavior, but is now more likely to break in practice.
The refactor of trait object type parsing fixed a bug where + was receiving the wrong priority parsing things like &for<'a> Tr<'a> + Send as &(for<'a> Tr<'a> + Send) instead of (&for<'a> Tr<'a>) + Send
Overlapping inherent impls are now a hard error
PartialOrd and Ord must agree on the ordering.
rustc main.rs -o out --emit=asm,llvm-ir Now will output out.asm and out.ll instead of only one of the filetypes.
calling a function that returns Self will no longer work when the size of Self cannot be statically determined.
rustc now builds with a "pthreads" flavour of MinGW for Windows GNU this has caused a few regressions namely:
Changed the link order of local static/dynamic libraries (respecting the order on given rather than having the compiler reorder).
Changed how MinGW is linked, native code linked to dynamic libraries may require manually linking to the gcc support library (for the native code itself)
Version 1.17.0 (2017-04-27)
Language
The lifetime of statics and consts defaults to 'static. RFC 1623
Fields of structs may be initialized without duplicating the field/variable names. RFC 1682
Self may be included in the where clause of impls. RFC 1647
When coercing to an unsized type lifetimes must be equal. That is, there is no subtyping between T and U when T: Unsize<U>. For example, coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
Values passed to the indexing operator, [], automatically coerce
Static variables may contain references to other statics
Compiler
Exit quickly on only --emit dep-info
Make -C relocation-model more correctly determine whether the linker creates a position-independent executable
Add -C overflow-checks to directly control whether integer overflow panics
The rustc type checker now checks items on demand instead of in a single in-order pass. This is mostly an internal refactoring in support of future work, including incremental type checking, but also resolves RFC 1647, allowing Self to appear in impl where clauses.
Optimize vtable loads
Turn off vectorization for Emscripten targets
Provide suggestions for unknown macros imported with use
Fix ICEs in path resolution
Strip exception handling code on Emscripten when panic=abort
Add clearer error message using &str + &str
Stabilized APIs
Arc::into_raw
Arc::from_raw
Arc::ptr_eq
Rc::into_raw
Rc::from_raw
Rc::ptr_eq
Ordering::then
Ordering::then_with
BTreeMap::range
BTreeMap::range_mut
collections::Bound
process::abort
ptr::read_unaligned
ptr::write_unaligned
Result::expect_err
Cell::swap
Cell::replace
Cell::into_inner
Cell::take
Libraries
BTreeMap and BTreeSet can iterate over ranges
Cell can store non-Copy types. RFC 1651
String implements FromIterator<&char>
Box implements a number of new conversions: From<Box<str>> for String, From<Box<[T]>> for Vec<T>, From<Box<CStr>> for CString, From<Box<OsStr>> for OsString, From<Box<Path>> for PathBuf, Into<Box<str>> for String, Into<Box<[T]>> for Vec<T>, Into<Box<CStr>> for CString, Into<Box<OsStr>> for OsString, Into<Box<Path>> for PathBuf, Default for Box<str>, Default for Box<CStr>, Default for Box<OsStr>, From<&CStr> for Box<CStr>, From<&OsStr> for Box<OsStr>, From<&Path> for Box<Path>
ffi::FromBytesWithNulError implements Error and Display
Specialize PartialOrd<A> for [A] where A: Ord
Slightly optimize slice::sort
Add ToString trait specialization for Cow<'a, str> and String
Box<[T]> implements From<&[T]> where T: Copy, Box<str> implements From<&str>
IpAddr implements From for various arrays. SocketAddr implements From<(I, u16)> where I: Into<IpAddr>
format! estimates the needed capacity before writing a string
Support unprivileged symlink creation in Windows
PathBuf implements Default
Implement PartialEq<[A]> for VecDeque<A>
HashMap resizes adaptively to guard against DOS attacks and poor hash functions.
Cargo
Add cargo check --all
Add an option to ignore SSL revocation checking
Add cargo run --package
Add required_features
Assume build.rs is a build script
Find workspace via workspace_root link in containing member
Misc
Documentation is rendered with mdbook instead of the obsolete, in-tree rustbook
The "Unstable Book" documents nightly-only features
Improve the style of the sidebar in rustdoc output
Configure build correctly on 64-bit CPU's with the armhf ABI
Fix MSP430 breakage due to i128
Preliminary Solaris/SPARCv9 support
rustc is linked statically on Windows MSVC targets, allowing it to run without installing the MSVC runtime.
rustdoc --test includes file names in test names
This release includes builds of std for sparc64-unknown-linux-gnu, aarch64-unknown-linux-fuchsia, and x86_64-unknown-linux-fuchsia.
Initial support for aarch64-unknown-freebsd
Initial support for i686-unknown-netbsd
This release no longer includes the old makefile build system. Rust is built with a custom build system, written in Rust, and with Cargo.
Add Debug implementations for libcollection structs
TypeId implements PartialOrd and Ord
--test-threads=0 produces an error
rustup installs documentation by default
The Rust source includes NatVis visualizations. These can be used by WinDbg and Visual Studio to improve the debugging experience.
Compatibility Notes
Rust 1.17 does not correctly detect the MSVC 2017 linker. As a workaround, either use MSVC 2015 or run vcvars.bat.
When coercing to an unsized type lifetimes must be equal. That is, disallow subtyping between T and U when T: Unsize<U>, e.g. coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
format! and Display::to_string panic if an underlying formatting implementation returns an error. Previously the error was silently ignored. It is incorrect for write_fmt to return an error when writing to a string.
In-tree crates are verified to be unstable. Previously, some minor crates were marked stable and could be accessed from the stable toolchain.
Rust git source no longer includes vendored crates. Those that need to build with vendored crates should build from release tarballs.
Fix inert attributes from proc_macro_derives
During crate resolution, rustc prefers a crate in the sysroot if two crates are otherwise identical. Unlikely to be encountered outside the Rust build system.
Fixed bugs around how type inference interacts with dead-code. The existing code generally ignores the type of dead-code unless a type-hint is provided; this can cause surprising inference interactions particularly around defaulting. The new code uniformly ignores the result type of dead-code.
Tuple-struct constructors with private fields are no longer visible
Lifetime parameters that do not appear in the arguments are now considered early-bound, resolving a soundness bug (#32330). The hr_lifetime_in_assoc_type future-compatibility lint has been in effect since April of 2016.
rustdoc: fix doctests with non-feature crate attributes
Make transmuting from fn item types to pointer-sized types a hard error
2017-09-30 06:42:43 +02:00
|
|
|
SUBST_FILES.rpath= src/bootstrap/bin/rustc.rs
|
|
|
|
SUBST_VARS.rpath= PREFIX
|
|
|
|
|
|
|
|
post-extract:
|
2017-11-04 16:51:43 +01:00
|
|
|
set -e; \
|
2018-09-14 12:04:43 +02:00
|
|
|
if ${TEST} -e ${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}/install.sh \
|
2017-11-04 16:51:43 +01:00
|
|
|
-a ! -e ${RUST_BOOTSTRAP_PATH}/bin/rustc; then \
|
|
|
|
cd ${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}; \
|
|
|
|
${TOOLS_BASH} ./install.sh --prefix=${RUST_BOOTSTRAP_PATH}; \
|
|
|
|
cd ${WRKDIR}/rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}; \
|
|
|
|
${TOOLS_BASH} ./install.sh --prefix=${RUST_BOOTSTRAP_PATH}; \
|
|
|
|
fi
|
Update to 1.27.0
* SunOS parts are from jperkin@.
Changelog:
Version 1.27.0 (2018-06-21)
Language
Removed 'proc' from the reserved keywords list. This allows proc to be used as an identifer.
The dyn syntax is now available. This syntax is equivalent to the bare Trait syntax, and should make it clearer when being used in tandem with impl Trait. Since it is equivalent to the following syntax: &Trait == &dyn Trait, &mut Trait == &mut dyn Trait, and Box<Trait> == Box<dyn Trait>.
Attributes on generic parameters such as types and lifetimes are now stable. e.g. fn foo<#[lifetime_attr] 'a, #[type_attr] T: 'a>() {}
The #[must_use] attribute can now also be used on functions as well as types. It provides a lint that by default warns users when the value returned by a function has not been used.
Compiler
Added the armv5te-unknown-linux-musl target.
Libraries
SIMD (Single Instruction Multiple Data) on x86/x86_64 is now stable. This includes arch::x86 & arch::x86_64 modules which contain SIMD intrinsics, a new macro called is_x86_feature_detected!, the #[target_feature(enable="")] attribute, and adding target_feature = "" to the cfg attribute.
A lot of methods for [u8], f32, and f64 previously only available in std are now available in core.
The generic Rhs type parameter on ops::{Shl, ShlAssign, Shr} now defaults to Self.
std::str::replace now has the #[must_use] attribute to clarify that the operation isn't done in place.
Clone::clone, Iterator::collect, and ToOwned::to_owned now have the #[must_use] attribute to warn about unused potentially expensive allocations.
Stabilized APIs
DoubleEndedIterator::rfind
DoubleEndedIterator::rfold
DoubleEndedIterator::try_rfold
Duration::from_micros
Duration::from_nanos
Duration::subsec_micros
Duration::subsec_millis
HashMap::remove_entry
Iterator::try_fold
Iterator::try_for_each
NonNull::cast
Option::filter
String::replace_range
Take::set_limit
hint::unreachable_unchecked
os::unix::process::parent_id
process::id
ptr::swap_nonoverlapping
slice::rsplit_mut
slice::rsplit
slice::swap_with_slice
Cargo
cargo-metadata now includes authors, categories, keywords, readme, and repository fields.
Added the --target-dir optional argument. This allows you to specify a different directory than target for placing compilation artifacts.
Cargo will be adding automatic target inference for binaries, benchmarks, examples, and tests in the Rust 2018 edition. If your project specifies specific targets e.g. using [[bin]] and have other binaries in locations where cargo would infer a binary, Cargo will produce a warning. You can disable this feature ahead of time by setting any of the following autobins, autobenches, autoexamples, autotests to false.
Cargo will now cache compiler information. This can be disabled by setting CARGO_CACHE_RUSTC_INFO=0 in your environment.
Misc
Added "The Rustc book" into the official documentation. "The Rustc book" documents and teaches how to use the rustc compiler.
All books available on doc.rust-lang.org are now searchable.
Compatibility Notes
Calling a CharExt or StrExt method directly on core will no longer work. e.g. ::core::prelude::v1::StrExt::is_empty("") will not compile, "".is_empty() will still compile.
Debug output on atomic::{AtomicBool, AtomicIsize, AtomicPtr, AtomicUsize} will only print the inner type. e.g. print!("{:?}", AtomicBool::new(true)) will print true not AtomicBool(true).
The maximum number for repr(align(N)) is now 2^29. Previously you could enter higher numbers but they were not supported by LLVM. Up to 512MB alignment should cover all use cases.
2018-06-24 10:05:25 +02:00
|
|
|
# patch(1) in NetBSD does not handle .cargo-checksum.json like long width file.
|
|
|
|
cat ${WRKSRC}/src/vendor/libc/.cargo-checksum.json | \
|
2018-09-14 12:04:43 +02:00
|
|
|
${SED} -e 's/9c6af198a2f80da827054784faf70bc404673d9568fb45664b4f73c46245fdbd/c3851969a854d6ccaa8a94369f1288025149d1ebdc74b36f224423f35b18f7a7/' > \
|
Update to 1.27.0
* SunOS parts are from jperkin@.
Changelog:
Version 1.27.0 (2018-06-21)
Language
Removed 'proc' from the reserved keywords list. This allows proc to be used as an identifer.
The dyn syntax is now available. This syntax is equivalent to the bare Trait syntax, and should make it clearer when being used in tandem with impl Trait. Since it is equivalent to the following syntax: &Trait == &dyn Trait, &mut Trait == &mut dyn Trait, and Box<Trait> == Box<dyn Trait>.
Attributes on generic parameters such as types and lifetimes are now stable. e.g. fn foo<#[lifetime_attr] 'a, #[type_attr] T: 'a>() {}
The #[must_use] attribute can now also be used on functions as well as types. It provides a lint that by default warns users when the value returned by a function has not been used.
Compiler
Added the armv5te-unknown-linux-musl target.
Libraries
SIMD (Single Instruction Multiple Data) on x86/x86_64 is now stable. This includes arch::x86 & arch::x86_64 modules which contain SIMD intrinsics, a new macro called is_x86_feature_detected!, the #[target_feature(enable="")] attribute, and adding target_feature = "" to the cfg attribute.
A lot of methods for [u8], f32, and f64 previously only available in std are now available in core.
The generic Rhs type parameter on ops::{Shl, ShlAssign, Shr} now defaults to Self.
std::str::replace now has the #[must_use] attribute to clarify that the operation isn't done in place.
Clone::clone, Iterator::collect, and ToOwned::to_owned now have the #[must_use] attribute to warn about unused potentially expensive allocations.
Stabilized APIs
DoubleEndedIterator::rfind
DoubleEndedIterator::rfold
DoubleEndedIterator::try_rfold
Duration::from_micros
Duration::from_nanos
Duration::subsec_micros
Duration::subsec_millis
HashMap::remove_entry
Iterator::try_fold
Iterator::try_for_each
NonNull::cast
Option::filter
String::replace_range
Take::set_limit
hint::unreachable_unchecked
os::unix::process::parent_id
process::id
ptr::swap_nonoverlapping
slice::rsplit_mut
slice::rsplit
slice::swap_with_slice
Cargo
cargo-metadata now includes authors, categories, keywords, readme, and repository fields.
Added the --target-dir optional argument. This allows you to specify a different directory than target for placing compilation artifacts.
Cargo will be adding automatic target inference for binaries, benchmarks, examples, and tests in the Rust 2018 edition. If your project specifies specific targets e.g. using [[bin]] and have other binaries in locations where cargo would infer a binary, Cargo will produce a warning. You can disable this feature ahead of time by setting any of the following autobins, autobenches, autoexamples, autotests to false.
Cargo will now cache compiler information. This can be disabled by setting CARGO_CACHE_RUSTC_INFO=0 in your environment.
Misc
Added "The Rustc book" into the official documentation. "The Rustc book" documents and teaches how to use the rustc compiler.
All books available on doc.rust-lang.org are now searchable.
Compatibility Notes
Calling a CharExt or StrExt method directly on core will no longer work. e.g. ::core::prelude::v1::StrExt::is_empty("") will not compile, "".is_empty() will still compile.
Debug output on atomic::{AtomicBool, AtomicIsize, AtomicPtr, AtomicUsize} will only print the inner type. e.g. print!("{:?}", AtomicBool::new(true)) will print true not AtomicBool(true).
The maximum number for repr(align(N)) is now 2^29. Previously you could enter higher numbers but they were not supported by LLVM. Up to 512MB alignment should cover all use cases.
2018-06-24 10:05:25 +02:00
|
|
|
${WRKSRC}/src/vendor/libc/.cargo-checksum.json.patched
|
2018-10-31 16:53:17 +01:00
|
|
|
cat ${WRKSRC}/src/vendor/rand/.cargo-checksum.json | \
|
|
|
|
${SED} -e 's/cb94a0b54e47022b2e9b58b45e0196785c61d083760333276226da435cc040d9/bcb195562cf830c9e2078757e6d0976f86ede59816ff305e21a2764a4a4cf43e/' > \
|
|
|
|
${WRKSRC}/src/vendor/rand/.cargo-checksum.json.patched
|
Update to 1.27.0
* SunOS parts are from jperkin@.
Changelog:
Version 1.27.0 (2018-06-21)
Language
Removed 'proc' from the reserved keywords list. This allows proc to be used as an identifer.
The dyn syntax is now available. This syntax is equivalent to the bare Trait syntax, and should make it clearer when being used in tandem with impl Trait. Since it is equivalent to the following syntax: &Trait == &dyn Trait, &mut Trait == &mut dyn Trait, and Box<Trait> == Box<dyn Trait>.
Attributes on generic parameters such as types and lifetimes are now stable. e.g. fn foo<#[lifetime_attr] 'a, #[type_attr] T: 'a>() {}
The #[must_use] attribute can now also be used on functions as well as types. It provides a lint that by default warns users when the value returned by a function has not been used.
Compiler
Added the armv5te-unknown-linux-musl target.
Libraries
SIMD (Single Instruction Multiple Data) on x86/x86_64 is now stable. This includes arch::x86 & arch::x86_64 modules which contain SIMD intrinsics, a new macro called is_x86_feature_detected!, the #[target_feature(enable="")] attribute, and adding target_feature = "" to the cfg attribute.
A lot of methods for [u8], f32, and f64 previously only available in std are now available in core.
The generic Rhs type parameter on ops::{Shl, ShlAssign, Shr} now defaults to Self.
std::str::replace now has the #[must_use] attribute to clarify that the operation isn't done in place.
Clone::clone, Iterator::collect, and ToOwned::to_owned now have the #[must_use] attribute to warn about unused potentially expensive allocations.
Stabilized APIs
DoubleEndedIterator::rfind
DoubleEndedIterator::rfold
DoubleEndedIterator::try_rfold
Duration::from_micros
Duration::from_nanos
Duration::subsec_micros
Duration::subsec_millis
HashMap::remove_entry
Iterator::try_fold
Iterator::try_for_each
NonNull::cast
Option::filter
String::replace_range
Take::set_limit
hint::unreachable_unchecked
os::unix::process::parent_id
process::id
ptr::swap_nonoverlapping
slice::rsplit_mut
slice::rsplit
slice::swap_with_slice
Cargo
cargo-metadata now includes authors, categories, keywords, readme, and repository fields.
Added the --target-dir optional argument. This allows you to specify a different directory than target for placing compilation artifacts.
Cargo will be adding automatic target inference for binaries, benchmarks, examples, and tests in the Rust 2018 edition. If your project specifies specific targets e.g. using [[bin]] and have other binaries in locations where cargo would infer a binary, Cargo will produce a warning. You can disable this feature ahead of time by setting any of the following autobins, autobenches, autoexamples, autotests to false.
Cargo will now cache compiler information. This can be disabled by setting CARGO_CACHE_RUSTC_INFO=0 in your environment.
Misc
Added "The Rustc book" into the official documentation. "The Rustc book" documents and teaches how to use the rustc compiler.
All books available on doc.rust-lang.org are now searchable.
Compatibility Notes
Calling a CharExt or StrExt method directly on core will no longer work. e.g. ::core::prelude::v1::StrExt::is_empty("") will not compile, "".is_empty() will still compile.
Debug output on atomic::{AtomicBool, AtomicIsize, AtomicPtr, AtomicUsize} will only print the inner type. e.g. print!("{:?}", AtomicBool::new(true)) will print true not AtomicBool(true).
The maximum number for repr(align(N)) is now 2^29. Previously you could enter higher numbers but they were not supported by LLVM. Up to 512MB alignment should cover all use cases.
2018-06-24 10:05:25 +02:00
|
|
|
${CP} -f ${WRKSRC}/src/vendor/libc/.cargo-checksum.json.patched \
|
|
|
|
${WRKSRC}/src/vendor/libc/.cargo-checksum.json
|
2018-10-31 16:53:17 +01:00
|
|
|
${CP} -f ${WRKSRC}/src/vendor/rand/.cargo-checksum.json.patched \
|
|
|
|
${WRKSRC}/src/vendor/rand/.cargo-checksum.json
|
2018-10-13 12:03:36 +02:00
|
|
|
.if ${OPSYS} == "NetBSD"
|
2018-10-18 17:35:49 +02:00
|
|
|
SDIR=${WRKDIR}/scripts; \
|
|
|
|
${MKDIR} $${SDIR}; \
|
|
|
|
cd $${SDIR}; \
|
|
|
|
${RM} -f c++-wrap; \
|
|
|
|
${RM} -f clang++-wrap; \
|
|
|
|
${RM} -f clang-wrap; \
|
|
|
|
${CP} ${.CURDIR}/files/gcc-wrap .; \
|
|
|
|
${CHMOD} +x gcc-wrap; \
|
|
|
|
${LN} -s gcc-wrap c++-wrap; \
|
|
|
|
${LN} -s gcc-wrap clang++-wrap; \
|
|
|
|
${LN} -s gcc-wrap clang-wrap
|
2018-10-13 12:03:36 +02:00
|
|
|
.endif
|
2017-11-04 16:51:43 +01:00
|
|
|
|
2018-03-02 06:59:18 +01:00
|
|
|
.if ${OPSYS} == "FreeBSD"
|
|
|
|
MAKE_ENV+= OPENSSL_DIR=${SSLBASE}
|
|
|
|
.endif
|
|
|
|
|
2018-10-08 01:12:49 +02:00
|
|
|
pre-build: pre-build-fix
|
2018-09-14 12:04:43 +02:00
|
|
|
# Requires libssh2 defines only available in master.
|
|
|
|
${CP} -f ${WRKSRC}/src/vendor/libssh2-sys/libssh2/include/libssh2.h \
|
|
|
|
${BUILDLINK_DIR}/include/
|
|
|
|
|
Update to 1.20.0
* Disable SunOS/Solaris support because newer bootstrap is not available
* Include Rust libraries and Cargo
Changelog:
Version 1.20.0 (2017-08-31)
Language
Associated constants are now stabilised.
A lot of macro bugs are now fixed.
Compiler
Struct fields are now properly coerced to the expected field type.
Enabled wasm LLVM backend WASM can now be built with the wasm32-experimental-emscripten target.
Changed some of the error messages to be more helpful.
Add support for RELRO(RELocation Read-Only) for platforms that support it.
rustc now reports the total number of errors on compilation failure previously this was only the number of errors in the pass that failed.
Expansion in rustc has been sped up 29x.
added msp430-none-elf target.
rustc will now suggest one-argument enum variant to fix type mismatch when applicable
Fixes backtraces on Redox
rustc now identifies different versions of same crate when absolute paths of different types match in an error message.
Libraries
Relaxed Debug constraints on {HashMap,BTreeMap}::{Keys,Values}.
Impl PartialEq, Eq, PartialOrd, Ord, Debug, Hash for unsized tuples.
Impl fmt::{Display, Debug} for Ref, RefMut, MutexGuard, RwLockReadGuard, RwLockWriteGuard
Impl Clone for DefaultHasher.
Impl Sync for SyncSender.
Impl FromStr for char
Fixed how {f32, f64}::{is_sign_negative, is_sign_positive} handles NaN.
allow messages in the unimplemented!() macro. ie. unimplemented!("Waiting for 1.21 to be stable")
pub(restricted) is now supported in the thread_local! macro.
Upgrade to Unicode 10.0.0
Reimplemented {f32, f64}::{min, max} in Rust instead of using CMath.
Skip the main thread's manual stack guard on Linux
Iterator::nth for ops::{Range, RangeFrom} is now done in O(1) time
#[repr(align(N))] attribute max number is now 2^31 - 1. This was previously 2^15.
{OsStr, Path}::Display now avoids allocations where possible
Stabilized APIs
CStr::into_c_string
CString::as_c_str
CString::into_boxed_c_str
Chain::get_mut
Chain::get_ref
Chain::into_inner
Option::get_or_insert_with
Option::get_or_insert
OsStr::into_os_string
OsString::into_boxed_os_str
Take::get_mut
Take::get_ref
Utf8Error::error_len
char::EscapeDebug
char::escape_debug
compile_error!
f32::from_bits
f32::to_bits
f64::from_bits
f64::to_bits
mem::ManuallyDrop
slice::sort_unstable_by_key
slice::sort_unstable_by
slice::sort_unstable
str::from_boxed_utf8_unchecked
str::as_bytes_mut
str::as_bytes_mut
str::from_utf8_mut
str::from_utf8_unchecked_mut
str::get_mut
str::get_unchecked_mut
str::get_unchecked
str::get
str::into_boxed_bytes
Cargo
Cargo API token location moved from ~/.cargo/config to ~/.cargo/credentials.
Cargo will now build main.rs binaries that are in sub-directories of src/bin. ie. Having src/bin/server/main.rs and src/bin/client/main.rs generates target/debug/server and target/debug/client
You can now specify version of a binary when installed through cargo install using --vers.
Added --no-fail-fast flag to cargo to run all benchmarks regardless of failure.
Changed the convention around which file is the crate root.
The include/exclude property in Cargo.toml now accepts gitignore paths instead of glob patterns. Glob patterns are now deprecated.
Compatibility Notes
Functions with 'static in their return types will now not be as usable as if they were using lifetime parameters instead.
The reimplementation of {f32, f64}::is_sign_{negative, positive} now takes the sign of NaN into account where previously didn't.
Version 1.19.0 (2017-07-20)
Language
Numeric fields can now be used for creating tuple structs. RFC 1506 For example struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };.
Macro recursion limit increased to 1024 from 64.
Added lint for detecting unused macros.
loop can now return a value with break. RFC 1624 For example: let x = loop { break 7; };
C compatible unions are now available. RFC 1444 They can only contain Copy types and cannot have a Drop implementation. Example: union Foo { bar: u8, baz: usize }
Non capturing closures can now be coerced into fns, RFC 1558 Example: let foo: fn(u8) -> u8 = |v: u8| { v };
Compiler
Add support for bootstrapping the Rust compiler toolchain on Android.
Change arm-linux-androideabi to correspond to the armeabi official ABI. If you wish to continue targeting the armeabi-v7a ABI you should use --target armv7-linux-androideabi.
Fixed ICE when removing a source file between compilation sessions.
Minor optimisation of string operations.
Compiler error message is now aborting due to previous error(s) instead of aborting due to N previous errors This was previously inaccurate and would only count certain kinds of errors.
The compiler now supports Visual Studio 2017
The compiler is now built against LLVM 4.0.1 by default
Added a lot of new error codes
Added target-feature=+crt-static option RFC 1721 Which allows libraries with C Run-time Libraries(CRT) to be statically linked.
Fixed various ARM codegen bugs
Libraries
String now implements FromIterator<Cow<'a, str>> and Extend<Cow<'a, str>>
Vec now implements From<&mut [T]>
Box<[u8]> now implements From<Box<str>>
SplitWhitespace now implements Clone
[u8]::reverse is now 5x faster and [u16]::reverse is now 1.5x faster
eprint! and eprintln! macros added to prelude. Same as the print! macros, but for printing to stderr.
Stabilized APIs
OsString::shrink_to_fit
cmp::Reverse
Command::envs
thread::ThreadId
Cargo
Build scripts can now add environment variables to the environment the crate is being compiled in. Example: println!("cargo:rustc-env=FOO=bar");
Subcommands now replace the current process rather than spawning a new child process
Workspace members can now accept glob file patterns
Added --all flag to the cargo bench subcommand to run benchmarks of all the members in a given workspace.
Updated libssh2-sys to 0.2.6
Target directory path is now in the cargmetadata
Cargo no longer checks out a local working directory for the crates.io index This should provide smaller file size for the registry, and improve cloning times, especially on Windows machines.
Added an --exclude option for excluding certai using the --all option
Cargo will now automatically retry when receiving a 5xx error from crates.io
The --features option now accepts multiple comma or space delimited values.
Added support for custom target specific runners
Misc
Added ow prefer to download rust packages with XZ compression over GZip packages.
Added the ability to escape # in rust documentation By adding additional #'s ie. ## is now #
Compatibility Notes
MutexGuard<T> may only be Sync if T is Sync.
-Z flagning for a year previous to this.
As a result of the -Z flag change, the cargo-check plugin no longer works. Users should migrate to the built-in check command, which has been available since 1.16.
Ending a float literal with ._ is now a hard erro use ::self::foo; is now a hard error. self paths are always relative while the :: prefix makes a path absolute, but was ignored and the path was relative regardless.
Floating point constants in match patterns is now a hard error This was previously ts that don't derive PartialEq & Eq used match patterns is now a hard error This was previously a warning.
Lifetimes named '_ are no longer allowed. This was previously a warning.
From the pound escape, lines consisting of multiple #s are now visible
It is an error to reexport private enum variants. This is known to break a number of crates that depend on an older version of mustache.
On Windows, if VCINSTALLDIR is set incorrectly, rustc will try to use it to find the linker, and the build will fail where it did not previously
Version 1.18.0 (2017-06-08)
Language
Stabilize pub(restricted) pub can now accept a module path to make the item visible to just that module tree. Also accepts the keyword crate to make something public to the whole crate but not users of the library. Example: pub(crate) mod utils;. RFC 1422.
Stabilize #![windows_subsystem] attribute conservative exposure of the /SUBSYSTEM linker flag on Windows platforms. RFC 1665.
Refactor of trait object type parsing Now ty in macros can accept types like Write + Send, trailing + are now supported in trait objects, and better error reporting for trait objects starting with ?Sized.
0e+10 is now a valid floating point literal
Now warns if you bind a lifetime parameter to 'static
Tuples, Enum variant fields, and structs with no repr attribute or with #[repr(Rust)] are reordered to minimize padding and produce a smaller representation in some cases.
Compiler
rustc can now emit mir with --emit mir
Improved LLVM IR for trivial functions
Added explanation for E0090(Wrong number of lifetimes are supplied)
rustc compilation is now 15%-20% faster Thanks to optimisation opportunities found through profiling
Improved backtrace formatting when panicking
Libraries
Specialized Vec::from_iter being passed vec::IntoIter if the iterator hasn't been advanced the original Vec is reassembled with no actual iteration or reallocation.
Simplified HashMap Bucket interface provides performance improvements for iterating and cloning.
Specialize Vec::from_elem to use calloc
Fixed Race condition in fs::create_dir_all
No longer caching stdio on Windows
Optimized insertion sort in slice insertion sort in some cases 2.50%~ faster and in one case now 12.50% faster.
Optimized AtomicBool::fetch_nand
Stabilized APIs
Child::try_wait
HashMap::retain
HashSet::retain
PeekMut::pop
TcpStream::peek
UdpSocket::peek
UdpSocket::peek_from
Cargo
Added partial Pijul support Pijul is a version control system in Rust. You can now create new cargo projects with Pijul using cargo new --vcs pijul
Now always emits build script warnings for crates that fail to build
Added Android build support
Added --bins and --tests flags now you can build all programs of a certain type, for example cargo build --bins will build all binaries.
Added support for haiku
Misc
rustdoc can now use pulldown-cmark with the --enable-commonmark flag
Added rust-winbg script for better debugging on Windows
Rust now uses the official cross compiler for NetBSD
rustdoc now accepts # at the start of files
Fixed jemalloc support for musl
Compatibility Notes
Changes to how the 0 flag works in format! Padding zeroes are now always placed after the sign if it exists and before the digits. With the # flag the zeroes are placed after the prefix and before the digits.
Due to the struct field optimisation, using transmute on structs that have no repr attribute or #[repr(Rust)] will no longer work. This has always been undefined behavior, but is now more likely to break in practice.
The refactor of trait object type parsing fixed a bug where + was receiving the wrong priority parsing things like &for<'a> Tr<'a> + Send as &(for<'a> Tr<'a> + Send) instead of (&for<'a> Tr<'a>) + Send
Overlapping inherent impls are now a hard error
PartialOrd and Ord must agree on the ordering.
rustc main.rs -o out --emit=asm,llvm-ir Now will output out.asm and out.ll instead of only one of the filetypes.
calling a function that returns Self will no longer work when the size of Self cannot be statically determined.
rustc now builds with a "pthreads" flavour of MinGW for Windows GNU this has caused a few regressions namely:
Changed the link order of local static/dynamic libraries (respecting the order on given rather than having the compiler reorder).
Changed how MinGW is linked, native code linked to dynamic libraries may require manually linking to the gcc support library (for the native code itself)
Version 1.17.0 (2017-04-27)
Language
The lifetime of statics and consts defaults to 'static. RFC 1623
Fields of structs may be initialized without duplicating the field/variable names. RFC 1682
Self may be included in the where clause of impls. RFC 1647
When coercing to an unsized type lifetimes must be equal. That is, there is no subtyping between T and U when T: Unsize<U>. For example, coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
Values passed to the indexing operator, [], automatically coerce
Static variables may contain references to other statics
Compiler
Exit quickly on only --emit dep-info
Make -C relocation-model more correctly determine whether the linker creates a position-independent executable
Add -C overflow-checks to directly control whether integer overflow panics
The rustc type checker now checks items on demand instead of in a single in-order pass. This is mostly an internal refactoring in support of future work, including incremental type checking, but also resolves RFC 1647, allowing Self to appear in impl where clauses.
Optimize vtable loads
Turn off vectorization for Emscripten targets
Provide suggestions for unknown macros imported with use
Fix ICEs in path resolution
Strip exception handling code on Emscripten when panic=abort
Add clearer error message using &str + &str
Stabilized APIs
Arc::into_raw
Arc::from_raw
Arc::ptr_eq
Rc::into_raw
Rc::from_raw
Rc::ptr_eq
Ordering::then
Ordering::then_with
BTreeMap::range
BTreeMap::range_mut
collections::Bound
process::abort
ptr::read_unaligned
ptr::write_unaligned
Result::expect_err
Cell::swap
Cell::replace
Cell::into_inner
Cell::take
Libraries
BTreeMap and BTreeSet can iterate over ranges
Cell can store non-Copy types. RFC 1651
String implements FromIterator<&char>
Box implements a number of new conversions: From<Box<str>> for String, From<Box<[T]>> for Vec<T>, From<Box<CStr>> for CString, From<Box<OsStr>> for OsString, From<Box<Path>> for PathBuf, Into<Box<str>> for String, Into<Box<[T]>> for Vec<T>, Into<Box<CStr>> for CString, Into<Box<OsStr>> for OsString, Into<Box<Path>> for PathBuf, Default for Box<str>, Default for Box<CStr>, Default for Box<OsStr>, From<&CStr> for Box<CStr>, From<&OsStr> for Box<OsStr>, From<&Path> for Box<Path>
ffi::FromBytesWithNulError implements Error and Display
Specialize PartialOrd<A> for [A] where A: Ord
Slightly optimize slice::sort
Add ToString trait specialization for Cow<'a, str> and String
Box<[T]> implements From<&[T]> where T: Copy, Box<str> implements From<&str>
IpAddr implements From for various arrays. SocketAddr implements From<(I, u16)> where I: Into<IpAddr>
format! estimates the needed capacity before writing a string
Support unprivileged symlink creation in Windows
PathBuf implements Default
Implement PartialEq<[A]> for VecDeque<A>
HashMap resizes adaptively to guard against DOS attacks and poor hash functions.
Cargo
Add cargo check --all
Add an option to ignore SSL revocation checking
Add cargo run --package
Add required_features
Assume build.rs is a build script
Find workspace via workspace_root link in containing member
Misc
Documentation is rendered with mdbook instead of the obsolete, in-tree rustbook
The "Unstable Book" documents nightly-only features
Improve the style of the sidebar in rustdoc output
Configure build correctly on 64-bit CPU's with the armhf ABI
Fix MSP430 breakage due to i128
Preliminary Solaris/SPARCv9 support
rustc is linked statically on Windows MSVC targets, allowing it to run without installing the MSVC runtime.
rustdoc --test includes file names in test names
This release includes builds of std for sparc64-unknown-linux-gnu, aarch64-unknown-linux-fuchsia, and x86_64-unknown-linux-fuchsia.
Initial support for aarch64-unknown-freebsd
Initial support for i686-unknown-netbsd
This release no longer includes the old makefile build system. Rust is built with a custom build system, written in Rust, and with Cargo.
Add Debug implementations for libcollection structs
TypeId implements PartialOrd and Ord
--test-threads=0 produces an error
rustup installs documentation by default
The Rust source includes NatVis visualizations. These can be used by WinDbg and Visual Studio to improve the debugging experience.
Compatibility Notes
Rust 1.17 does not correctly detect the MSVC 2017 linker. As a workaround, either use MSVC 2015 or run vcvars.bat.
When coercing to an unsized type lifetimes must be equal. That is, disallow subtyping between T and U when T: Unsize<U>, e.g. coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
format! and Display::to_string panic if an underlying formatting implementation returns an error. Previously the error was silently ignored. It is incorrect for write_fmt to return an error when writing to a string.
In-tree crates are verified to be unstable. Previously, some minor crates were marked stable and could be accessed from the stable toolchain.
Rust git source no longer includes vendored crates. Those that need to build with vendored crates should build from release tarballs.
Fix inert attributes from proc_macro_derives
During crate resolution, rustc prefers a crate in the sysroot if two crates are otherwise identical. Unlikely to be encountered outside the Rust build system.
Fixed bugs around how type inference interacts with dead-code. The existing code generally ignores the type of dead-code unless a type-hint is provided; this can cause surprising inference interactions particularly around defaulting. The new code uniformly ignores the result type of dead-code.
Tuple-struct constructors with private fields are no longer visible
Lifetime parameters that do not appear in the arguments are now considered early-bound, resolving a soundness bug (#32330). The hr_lifetime_in_assoc_type future-compatibility lint has been in effect since April of 2016.
rustdoc: fix doctests with non-feature crate attributes
Make transmuting from fn item types to pointer-sized types a hard error
2017-09-30 06:42:43 +02:00
|
|
|
do-build:
|
|
|
|
cd ${WRKSRC} \
|
2018-11-27 16:45:23 +01:00
|
|
|
&& ${SETENV} ${MAKE_ENV} \
|
2018-12-22 00:12:34 +01:00
|
|
|
${PYTHONBIN} ./x.py -v ${BUILD_TARGET} -j ${MAKE_JOBS:U1}
|
Update to 1.20.0
* Disable SunOS/Solaris support because newer bootstrap is not available
* Include Rust libraries and Cargo
Changelog:
Version 1.20.0 (2017-08-31)
Language
Associated constants are now stabilised.
A lot of macro bugs are now fixed.
Compiler
Struct fields are now properly coerced to the expected field type.
Enabled wasm LLVM backend WASM can now be built with the wasm32-experimental-emscripten target.
Changed some of the error messages to be more helpful.
Add support for RELRO(RELocation Read-Only) for platforms that support it.
rustc now reports the total number of errors on compilation failure previously this was only the number of errors in the pass that failed.
Expansion in rustc has been sped up 29x.
added msp430-none-elf target.
rustc will now suggest one-argument enum variant to fix type mismatch when applicable
Fixes backtraces on Redox
rustc now identifies different versions of same crate when absolute paths of different types match in an error message.
Libraries
Relaxed Debug constraints on {HashMap,BTreeMap}::{Keys,Values}.
Impl PartialEq, Eq, PartialOrd, Ord, Debug, Hash for unsized tuples.
Impl fmt::{Display, Debug} for Ref, RefMut, MutexGuard, RwLockReadGuard, RwLockWriteGuard
Impl Clone for DefaultHasher.
Impl Sync for SyncSender.
Impl FromStr for char
Fixed how {f32, f64}::{is_sign_negative, is_sign_positive} handles NaN.
allow messages in the unimplemented!() macro. ie. unimplemented!("Waiting for 1.21 to be stable")
pub(restricted) is now supported in the thread_local! macro.
Upgrade to Unicode 10.0.0
Reimplemented {f32, f64}::{min, max} in Rust instead of using CMath.
Skip the main thread's manual stack guard on Linux
Iterator::nth for ops::{Range, RangeFrom} is now done in O(1) time
#[repr(align(N))] attribute max number is now 2^31 - 1. This was previously 2^15.
{OsStr, Path}::Display now avoids allocations where possible
Stabilized APIs
CStr::into_c_string
CString::as_c_str
CString::into_boxed_c_str
Chain::get_mut
Chain::get_ref
Chain::into_inner
Option::get_or_insert_with
Option::get_or_insert
OsStr::into_os_string
OsString::into_boxed_os_str
Take::get_mut
Take::get_ref
Utf8Error::error_len
char::EscapeDebug
char::escape_debug
compile_error!
f32::from_bits
f32::to_bits
f64::from_bits
f64::to_bits
mem::ManuallyDrop
slice::sort_unstable_by_key
slice::sort_unstable_by
slice::sort_unstable
str::from_boxed_utf8_unchecked
str::as_bytes_mut
str::as_bytes_mut
str::from_utf8_mut
str::from_utf8_unchecked_mut
str::get_mut
str::get_unchecked_mut
str::get_unchecked
str::get
str::into_boxed_bytes
Cargo
Cargo API token location moved from ~/.cargo/config to ~/.cargo/credentials.
Cargo will now build main.rs binaries that are in sub-directories of src/bin. ie. Having src/bin/server/main.rs and src/bin/client/main.rs generates target/debug/server and target/debug/client
You can now specify version of a binary when installed through cargo install using --vers.
Added --no-fail-fast flag to cargo to run all benchmarks regardless of failure.
Changed the convention around which file is the crate root.
The include/exclude property in Cargo.toml now accepts gitignore paths instead of glob patterns. Glob patterns are now deprecated.
Compatibility Notes
Functions with 'static in their return types will now not be as usable as if they were using lifetime parameters instead.
The reimplementation of {f32, f64}::is_sign_{negative, positive} now takes the sign of NaN into account where previously didn't.
Version 1.19.0 (2017-07-20)
Language
Numeric fields can now be used for creating tuple structs. RFC 1506 For example struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };.
Macro recursion limit increased to 1024 from 64.
Added lint for detecting unused macros.
loop can now return a value with break. RFC 1624 For example: let x = loop { break 7; };
C compatible unions are now available. RFC 1444 They can only contain Copy types and cannot have a Drop implementation. Example: union Foo { bar: u8, baz: usize }
Non capturing closures can now be coerced into fns, RFC 1558 Example: let foo: fn(u8) -> u8 = |v: u8| { v };
Compiler
Add support for bootstrapping the Rust compiler toolchain on Android.
Change arm-linux-androideabi to correspond to the armeabi official ABI. If you wish to continue targeting the armeabi-v7a ABI you should use --target armv7-linux-androideabi.
Fixed ICE when removing a source file between compilation sessions.
Minor optimisation of string operations.
Compiler error message is now aborting due to previous error(s) instead of aborting due to N previous errors This was previously inaccurate and would only count certain kinds of errors.
The compiler now supports Visual Studio 2017
The compiler is now built against LLVM 4.0.1 by default
Added a lot of new error codes
Added target-feature=+crt-static option RFC 1721 Which allows libraries with C Run-time Libraries(CRT) to be statically linked.
Fixed various ARM codegen bugs
Libraries
String now implements FromIterator<Cow<'a, str>> and Extend<Cow<'a, str>>
Vec now implements From<&mut [T]>
Box<[u8]> now implements From<Box<str>>
SplitWhitespace now implements Clone
[u8]::reverse is now 5x faster and [u16]::reverse is now 1.5x faster
eprint! and eprintln! macros added to prelude. Same as the print! macros, but for printing to stderr.
Stabilized APIs
OsString::shrink_to_fit
cmp::Reverse
Command::envs
thread::ThreadId
Cargo
Build scripts can now add environment variables to the environment the crate is being compiled in. Example: println!("cargo:rustc-env=FOO=bar");
Subcommands now replace the current process rather than spawning a new child process
Workspace members can now accept glob file patterns
Added --all flag to the cargo bench subcommand to run benchmarks of all the members in a given workspace.
Updated libssh2-sys to 0.2.6
Target directory path is now in the cargmetadata
Cargo no longer checks out a local working directory for the crates.io index This should provide smaller file size for the registry, and improve cloning times, especially on Windows machines.
Added an --exclude option for excluding certai using the --all option
Cargo will now automatically retry when receiving a 5xx error from crates.io
The --features option now accepts multiple comma or space delimited values.
Added support for custom target specific runners
Misc
Added ow prefer to download rust packages with XZ compression over GZip packages.
Added the ability to escape # in rust documentation By adding additional #'s ie. ## is now #
Compatibility Notes
MutexGuard<T> may only be Sync if T is Sync.
-Z flagning for a year previous to this.
As a result of the -Z flag change, the cargo-check plugin no longer works. Users should migrate to the built-in check command, which has been available since 1.16.
Ending a float literal with ._ is now a hard erro use ::self::foo; is now a hard error. self paths are always relative while the :: prefix makes a path absolute, but was ignored and the path was relative regardless.
Floating point constants in match patterns is now a hard error This was previously ts that don't derive PartialEq & Eq used match patterns is now a hard error This was previously a warning.
Lifetimes named '_ are no longer allowed. This was previously a warning.
From the pound escape, lines consisting of multiple #s are now visible
It is an error to reexport private enum variants. This is known to break a number of crates that depend on an older version of mustache.
On Windows, if VCINSTALLDIR is set incorrectly, rustc will try to use it to find the linker, and the build will fail where it did not previously
Version 1.18.0 (2017-06-08)
Language
Stabilize pub(restricted) pub can now accept a module path to make the item visible to just that module tree. Also accepts the keyword crate to make something public to the whole crate but not users of the library. Example: pub(crate) mod utils;. RFC 1422.
Stabilize #![windows_subsystem] attribute conservative exposure of the /SUBSYSTEM linker flag on Windows platforms. RFC 1665.
Refactor of trait object type parsing Now ty in macros can accept types like Write + Send, trailing + are now supported in trait objects, and better error reporting for trait objects starting with ?Sized.
0e+10 is now a valid floating point literal
Now warns if you bind a lifetime parameter to 'static
Tuples, Enum variant fields, and structs with no repr attribute or with #[repr(Rust)] are reordered to minimize padding and produce a smaller representation in some cases.
Compiler
rustc can now emit mir with --emit mir
Improved LLVM IR for trivial functions
Added explanation for E0090(Wrong number of lifetimes are supplied)
rustc compilation is now 15%-20% faster Thanks to optimisation opportunities found through profiling
Improved backtrace formatting when panicking
Libraries
Specialized Vec::from_iter being passed vec::IntoIter if the iterator hasn't been advanced the original Vec is reassembled with no actual iteration or reallocation.
Simplified HashMap Bucket interface provides performance improvements for iterating and cloning.
Specialize Vec::from_elem to use calloc
Fixed Race condition in fs::create_dir_all
No longer caching stdio on Windows
Optimized insertion sort in slice insertion sort in some cases 2.50%~ faster and in one case now 12.50% faster.
Optimized AtomicBool::fetch_nand
Stabilized APIs
Child::try_wait
HashMap::retain
HashSet::retain
PeekMut::pop
TcpStream::peek
UdpSocket::peek
UdpSocket::peek_from
Cargo
Added partial Pijul support Pijul is a version control system in Rust. You can now create new cargo projects with Pijul using cargo new --vcs pijul
Now always emits build script warnings for crates that fail to build
Added Android build support
Added --bins and --tests flags now you can build all programs of a certain type, for example cargo build --bins will build all binaries.
Added support for haiku
Misc
rustdoc can now use pulldown-cmark with the --enable-commonmark flag
Added rust-winbg script for better debugging on Windows
Rust now uses the official cross compiler for NetBSD
rustdoc now accepts # at the start of files
Fixed jemalloc support for musl
Compatibility Notes
Changes to how the 0 flag works in format! Padding zeroes are now always placed after the sign if it exists and before the digits. With the # flag the zeroes are placed after the prefix and before the digits.
Due to the struct field optimisation, using transmute on structs that have no repr attribute or #[repr(Rust)] will no longer work. This has always been undefined behavior, but is now more likely to break in practice.
The refactor of trait object type parsing fixed a bug where + was receiving the wrong priority parsing things like &for<'a> Tr<'a> + Send as &(for<'a> Tr<'a> + Send) instead of (&for<'a> Tr<'a>) + Send
Overlapping inherent impls are now a hard error
PartialOrd and Ord must agree on the ordering.
rustc main.rs -o out --emit=asm,llvm-ir Now will output out.asm and out.ll instead of only one of the filetypes.
calling a function that returns Self will no longer work when the size of Self cannot be statically determined.
rustc now builds with a "pthreads" flavour of MinGW for Windows GNU this has caused a few regressions namely:
Changed the link order of local static/dynamic libraries (respecting the order on given rather than having the compiler reorder).
Changed how MinGW is linked, native code linked to dynamic libraries may require manually linking to the gcc support library (for the native code itself)
Version 1.17.0 (2017-04-27)
Language
The lifetime of statics and consts defaults to 'static. RFC 1623
Fields of structs may be initialized without duplicating the field/variable names. RFC 1682
Self may be included in the where clause of impls. RFC 1647
When coercing to an unsized type lifetimes must be equal. That is, there is no subtyping between T and U when T: Unsize<U>. For example, coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
Values passed to the indexing operator, [], automatically coerce
Static variables may contain references to other statics
Compiler
Exit quickly on only --emit dep-info
Make -C relocation-model more correctly determine whether the linker creates a position-independent executable
Add -C overflow-checks to directly control whether integer overflow panics
The rustc type checker now checks items on demand instead of in a single in-order pass. This is mostly an internal refactoring in support of future work, including incremental type checking, but also resolves RFC 1647, allowing Self to appear in impl where clauses.
Optimize vtable loads
Turn off vectorization for Emscripten targets
Provide suggestions for unknown macros imported with use
Fix ICEs in path resolution
Strip exception handling code on Emscripten when panic=abort
Add clearer error message using &str + &str
Stabilized APIs
Arc::into_raw
Arc::from_raw
Arc::ptr_eq
Rc::into_raw
Rc::from_raw
Rc::ptr_eq
Ordering::then
Ordering::then_with
BTreeMap::range
BTreeMap::range_mut
collections::Bound
process::abort
ptr::read_unaligned
ptr::write_unaligned
Result::expect_err
Cell::swap
Cell::replace
Cell::into_inner
Cell::take
Libraries
BTreeMap and BTreeSet can iterate over ranges
Cell can store non-Copy types. RFC 1651
String implements FromIterator<&char>
Box implements a number of new conversions: From<Box<str>> for String, From<Box<[T]>> for Vec<T>, From<Box<CStr>> for CString, From<Box<OsStr>> for OsString, From<Box<Path>> for PathBuf, Into<Box<str>> for String, Into<Box<[T]>> for Vec<T>, Into<Box<CStr>> for CString, Into<Box<OsStr>> for OsString, Into<Box<Path>> for PathBuf, Default for Box<str>, Default for Box<CStr>, Default for Box<OsStr>, From<&CStr> for Box<CStr>, From<&OsStr> for Box<OsStr>, From<&Path> for Box<Path>
ffi::FromBytesWithNulError implements Error and Display
Specialize PartialOrd<A> for [A] where A: Ord
Slightly optimize slice::sort
Add ToString trait specialization for Cow<'a, str> and String
Box<[T]> implements From<&[T]> where T: Copy, Box<str> implements From<&str>
IpAddr implements From for various arrays. SocketAddr implements From<(I, u16)> where I: Into<IpAddr>
format! estimates the needed capacity before writing a string
Support unprivileged symlink creation in Windows
PathBuf implements Default
Implement PartialEq<[A]> for VecDeque<A>
HashMap resizes adaptively to guard against DOS attacks and poor hash functions.
Cargo
Add cargo check --all
Add an option to ignore SSL revocation checking
Add cargo run --package
Add required_features
Assume build.rs is a build script
Find workspace via workspace_root link in containing member
Misc
Documentation is rendered with mdbook instead of the obsolete, in-tree rustbook
The "Unstable Book" documents nightly-only features
Improve the style of the sidebar in rustdoc output
Configure build correctly on 64-bit CPU's with the armhf ABI
Fix MSP430 breakage due to i128
Preliminary Solaris/SPARCv9 support
rustc is linked statically on Windows MSVC targets, allowing it to run without installing the MSVC runtime.
rustdoc --test includes file names in test names
This release includes builds of std for sparc64-unknown-linux-gnu, aarch64-unknown-linux-fuchsia, and x86_64-unknown-linux-fuchsia.
Initial support for aarch64-unknown-freebsd
Initial support for i686-unknown-netbsd
This release no longer includes the old makefile build system. Rust is built with a custom build system, written in Rust, and with Cargo.
Add Debug implementations for libcollection structs
TypeId implements PartialOrd and Ord
--test-threads=0 produces an error
rustup installs documentation by default
The Rust source includes NatVis visualizations. These can be used by WinDbg and Visual Studio to improve the debugging experience.
Compatibility Notes
Rust 1.17 does not correctly detect the MSVC 2017 linker. As a workaround, either use MSVC 2015 or run vcvars.bat.
When coercing to an unsized type lifetimes must be equal. That is, disallow subtyping between T and U when T: Unsize<U>, e.g. coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
format! and Display::to_string panic if an underlying formatting implementation returns an error. Previously the error was silently ignored. It is incorrect for write_fmt to return an error when writing to a string.
In-tree crates are verified to be unstable. Previously, some minor crates were marked stable and could be accessed from the stable toolchain.
Rust git source no longer includes vendored crates. Those that need to build with vendored crates should build from release tarballs.
Fix inert attributes from proc_macro_derives
During crate resolution, rustc prefers a crate in the sysroot if two crates are otherwise identical. Unlikely to be encountered outside the Rust build system.
Fixed bugs around how type inference interacts with dead-code. The existing code generally ignores the type of dead-code unless a type-hint is provided; this can cause surprising inference interactions particularly around defaulting. The new code uniformly ignores the result type of dead-code.
Tuple-struct constructors with private fields are no longer visible
Lifetime parameters that do not appear in the arguments are now considered early-bound, resolving a soundness bug (#32330). The hr_lifetime_in_assoc_type future-compatibility lint has been in effect since April of 2016.
rustdoc: fix doctests with non-feature crate attributes
Make transmuting from fn item types to pointer-sized types a hard error
2017-09-30 06:42:43 +02:00
|
|
|
|
|
|
|
do-install:
|
|
|
|
cd ${WRKSRC} \
|
2018-11-27 16:45:23 +01:00
|
|
|
&& ${SETENV} ${MAKE_ENV} ${INSTALL_ENV} \
|
|
|
|
${PYTHONBIN} ./x.py -v install -j ${MAKE_JOBS:U1}
|
Update to 1.20.0
* Disable SunOS/Solaris support because newer bootstrap is not available
* Include Rust libraries and Cargo
Changelog:
Version 1.20.0 (2017-08-31)
Language
Associated constants are now stabilised.
A lot of macro bugs are now fixed.
Compiler
Struct fields are now properly coerced to the expected field type.
Enabled wasm LLVM backend WASM can now be built with the wasm32-experimental-emscripten target.
Changed some of the error messages to be more helpful.
Add support for RELRO(RELocation Read-Only) for platforms that support it.
rustc now reports the total number of errors on compilation failure previously this was only the number of errors in the pass that failed.
Expansion in rustc has been sped up 29x.
added msp430-none-elf target.
rustc will now suggest one-argument enum variant to fix type mismatch when applicable
Fixes backtraces on Redox
rustc now identifies different versions of same crate when absolute paths of different types match in an error message.
Libraries
Relaxed Debug constraints on {HashMap,BTreeMap}::{Keys,Values}.
Impl PartialEq, Eq, PartialOrd, Ord, Debug, Hash for unsized tuples.
Impl fmt::{Display, Debug} for Ref, RefMut, MutexGuard, RwLockReadGuard, RwLockWriteGuard
Impl Clone for DefaultHasher.
Impl Sync for SyncSender.
Impl FromStr for char
Fixed how {f32, f64}::{is_sign_negative, is_sign_positive} handles NaN.
allow messages in the unimplemented!() macro. ie. unimplemented!("Waiting for 1.21 to be stable")
pub(restricted) is now supported in the thread_local! macro.
Upgrade to Unicode 10.0.0
Reimplemented {f32, f64}::{min, max} in Rust instead of using CMath.
Skip the main thread's manual stack guard on Linux
Iterator::nth for ops::{Range, RangeFrom} is now done in O(1) time
#[repr(align(N))] attribute max number is now 2^31 - 1. This was previously 2^15.
{OsStr, Path}::Display now avoids allocations where possible
Stabilized APIs
CStr::into_c_string
CString::as_c_str
CString::into_boxed_c_str
Chain::get_mut
Chain::get_ref
Chain::into_inner
Option::get_or_insert_with
Option::get_or_insert
OsStr::into_os_string
OsString::into_boxed_os_str
Take::get_mut
Take::get_ref
Utf8Error::error_len
char::EscapeDebug
char::escape_debug
compile_error!
f32::from_bits
f32::to_bits
f64::from_bits
f64::to_bits
mem::ManuallyDrop
slice::sort_unstable_by_key
slice::sort_unstable_by
slice::sort_unstable
str::from_boxed_utf8_unchecked
str::as_bytes_mut
str::as_bytes_mut
str::from_utf8_mut
str::from_utf8_unchecked_mut
str::get_mut
str::get_unchecked_mut
str::get_unchecked
str::get
str::into_boxed_bytes
Cargo
Cargo API token location moved from ~/.cargo/config to ~/.cargo/credentials.
Cargo will now build main.rs binaries that are in sub-directories of src/bin. ie. Having src/bin/server/main.rs and src/bin/client/main.rs generates target/debug/server and target/debug/client
You can now specify version of a binary when installed through cargo install using --vers.
Added --no-fail-fast flag to cargo to run all benchmarks regardless of failure.
Changed the convention around which file is the crate root.
The include/exclude property in Cargo.toml now accepts gitignore paths instead of glob patterns. Glob patterns are now deprecated.
Compatibility Notes
Functions with 'static in their return types will now not be as usable as if they were using lifetime parameters instead.
The reimplementation of {f32, f64}::is_sign_{negative, positive} now takes the sign of NaN into account where previously didn't.
Version 1.19.0 (2017-07-20)
Language
Numeric fields can now be used for creating tuple structs. RFC 1506 For example struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };.
Macro recursion limit increased to 1024 from 64.
Added lint for detecting unused macros.
loop can now return a value with break. RFC 1624 For example: let x = loop { break 7; };
C compatible unions are now available. RFC 1444 They can only contain Copy types and cannot have a Drop implementation. Example: union Foo { bar: u8, baz: usize }
Non capturing closures can now be coerced into fns, RFC 1558 Example: let foo: fn(u8) -> u8 = |v: u8| { v };
Compiler
Add support for bootstrapping the Rust compiler toolchain on Android.
Change arm-linux-androideabi to correspond to the armeabi official ABI. If you wish to continue targeting the armeabi-v7a ABI you should use --target armv7-linux-androideabi.
Fixed ICE when removing a source file between compilation sessions.
Minor optimisation of string operations.
Compiler error message is now aborting due to previous error(s) instead of aborting due to N previous errors This was previously inaccurate and would only count certain kinds of errors.
The compiler now supports Visual Studio 2017
The compiler is now built against LLVM 4.0.1 by default
Added a lot of new error codes
Added target-feature=+crt-static option RFC 1721 Which allows libraries with C Run-time Libraries(CRT) to be statically linked.
Fixed various ARM codegen bugs
Libraries
String now implements FromIterator<Cow<'a, str>> and Extend<Cow<'a, str>>
Vec now implements From<&mut [T]>
Box<[u8]> now implements From<Box<str>>
SplitWhitespace now implements Clone
[u8]::reverse is now 5x faster and [u16]::reverse is now 1.5x faster
eprint! and eprintln! macros added to prelude. Same as the print! macros, but for printing to stderr.
Stabilized APIs
OsString::shrink_to_fit
cmp::Reverse
Command::envs
thread::ThreadId
Cargo
Build scripts can now add environment variables to the environment the crate is being compiled in. Example: println!("cargo:rustc-env=FOO=bar");
Subcommands now replace the current process rather than spawning a new child process
Workspace members can now accept glob file patterns
Added --all flag to the cargo bench subcommand to run benchmarks of all the members in a given workspace.
Updated libssh2-sys to 0.2.6
Target directory path is now in the cargmetadata
Cargo no longer checks out a local working directory for the crates.io index This should provide smaller file size for the registry, and improve cloning times, especially on Windows machines.
Added an --exclude option for excluding certai using the --all option
Cargo will now automatically retry when receiving a 5xx error from crates.io
The --features option now accepts multiple comma or space delimited values.
Added support for custom target specific runners
Misc
Added ow prefer to download rust packages with XZ compression over GZip packages.
Added the ability to escape # in rust documentation By adding additional #'s ie. ## is now #
Compatibility Notes
MutexGuard<T> may only be Sync if T is Sync.
-Z flagning for a year previous to this.
As a result of the -Z flag change, the cargo-check plugin no longer works. Users should migrate to the built-in check command, which has been available since 1.16.
Ending a float literal with ._ is now a hard erro use ::self::foo; is now a hard error. self paths are always relative while the :: prefix makes a path absolute, but was ignored and the path was relative regardless.
Floating point constants in match patterns is now a hard error This was previously ts that don't derive PartialEq & Eq used match patterns is now a hard error This was previously a warning.
Lifetimes named '_ are no longer allowed. This was previously a warning.
From the pound escape, lines consisting of multiple #s are now visible
It is an error to reexport private enum variants. This is known to break a number of crates that depend on an older version of mustache.
On Windows, if VCINSTALLDIR is set incorrectly, rustc will try to use it to find the linker, and the build will fail where it did not previously
Version 1.18.0 (2017-06-08)
Language
Stabilize pub(restricted) pub can now accept a module path to make the item visible to just that module tree. Also accepts the keyword crate to make something public to the whole crate but not users of the library. Example: pub(crate) mod utils;. RFC 1422.
Stabilize #![windows_subsystem] attribute conservative exposure of the /SUBSYSTEM linker flag on Windows platforms. RFC 1665.
Refactor of trait object type parsing Now ty in macros can accept types like Write + Send, trailing + are now supported in trait objects, and better error reporting for trait objects starting with ?Sized.
0e+10 is now a valid floating point literal
Now warns if you bind a lifetime parameter to 'static
Tuples, Enum variant fields, and structs with no repr attribute or with #[repr(Rust)] are reordered to minimize padding and produce a smaller representation in some cases.
Compiler
rustc can now emit mir with --emit mir
Improved LLVM IR for trivial functions
Added explanation for E0090(Wrong number of lifetimes are supplied)
rustc compilation is now 15%-20% faster Thanks to optimisation opportunities found through profiling
Improved backtrace formatting when panicking
Libraries
Specialized Vec::from_iter being passed vec::IntoIter if the iterator hasn't been advanced the original Vec is reassembled with no actual iteration or reallocation.
Simplified HashMap Bucket interface provides performance improvements for iterating and cloning.
Specialize Vec::from_elem to use calloc
Fixed Race condition in fs::create_dir_all
No longer caching stdio on Windows
Optimized insertion sort in slice insertion sort in some cases 2.50%~ faster and in one case now 12.50% faster.
Optimized AtomicBool::fetch_nand
Stabilized APIs
Child::try_wait
HashMap::retain
HashSet::retain
PeekMut::pop
TcpStream::peek
UdpSocket::peek
UdpSocket::peek_from
Cargo
Added partial Pijul support Pijul is a version control system in Rust. You can now create new cargo projects with Pijul using cargo new --vcs pijul
Now always emits build script warnings for crates that fail to build
Added Android build support
Added --bins and --tests flags now you can build all programs of a certain type, for example cargo build --bins will build all binaries.
Added support for haiku
Misc
rustdoc can now use pulldown-cmark with the --enable-commonmark flag
Added rust-winbg script for better debugging on Windows
Rust now uses the official cross compiler for NetBSD
rustdoc now accepts # at the start of files
Fixed jemalloc support for musl
Compatibility Notes
Changes to how the 0 flag works in format! Padding zeroes are now always placed after the sign if it exists and before the digits. With the # flag the zeroes are placed after the prefix and before the digits.
Due to the struct field optimisation, using transmute on structs that have no repr attribute or #[repr(Rust)] will no longer work. This has always been undefined behavior, but is now more likely to break in practice.
The refactor of trait object type parsing fixed a bug where + was receiving the wrong priority parsing things like &for<'a> Tr<'a> + Send as &(for<'a> Tr<'a> + Send) instead of (&for<'a> Tr<'a>) + Send
Overlapping inherent impls are now a hard error
PartialOrd and Ord must agree on the ordering.
rustc main.rs -o out --emit=asm,llvm-ir Now will output out.asm and out.ll instead of only one of the filetypes.
calling a function that returns Self will no longer work when the size of Self cannot be statically determined.
rustc now builds with a "pthreads" flavour of MinGW for Windows GNU this has caused a few regressions namely:
Changed the link order of local static/dynamic libraries (respecting the order on given rather than having the compiler reorder).
Changed how MinGW is linked, native code linked to dynamic libraries may require manually linking to the gcc support library (for the native code itself)
Version 1.17.0 (2017-04-27)
Language
The lifetime of statics and consts defaults to 'static. RFC 1623
Fields of structs may be initialized without duplicating the field/variable names. RFC 1682
Self may be included in the where clause of impls. RFC 1647
When coercing to an unsized type lifetimes must be equal. That is, there is no subtyping between T and U when T: Unsize<U>. For example, coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
Values passed to the indexing operator, [], automatically coerce
Static variables may contain references to other statics
Compiler
Exit quickly on only --emit dep-info
Make -C relocation-model more correctly determine whether the linker creates a position-independent executable
Add -C overflow-checks to directly control whether integer overflow panics
The rustc type checker now checks items on demand instead of in a single in-order pass. This is mostly an internal refactoring in support of future work, including incremental type checking, but also resolves RFC 1647, allowing Self to appear in impl where clauses.
Optimize vtable loads
Turn off vectorization for Emscripten targets
Provide suggestions for unknown macros imported with use
Fix ICEs in path resolution
Strip exception handling code on Emscripten when panic=abort
Add clearer error message using &str + &str
Stabilized APIs
Arc::into_raw
Arc::from_raw
Arc::ptr_eq
Rc::into_raw
Rc::from_raw
Rc::ptr_eq
Ordering::then
Ordering::then_with
BTreeMap::range
BTreeMap::range_mut
collections::Bound
process::abort
ptr::read_unaligned
ptr::write_unaligned
Result::expect_err
Cell::swap
Cell::replace
Cell::into_inner
Cell::take
Libraries
BTreeMap and BTreeSet can iterate over ranges
Cell can store non-Copy types. RFC 1651
String implements FromIterator<&char>
Box implements a number of new conversions: From<Box<str>> for String, From<Box<[T]>> for Vec<T>, From<Box<CStr>> for CString, From<Box<OsStr>> for OsString, From<Box<Path>> for PathBuf, Into<Box<str>> for String, Into<Box<[T]>> for Vec<T>, Into<Box<CStr>> for CString, Into<Box<OsStr>> for OsString, Into<Box<Path>> for PathBuf, Default for Box<str>, Default for Box<CStr>, Default for Box<OsStr>, From<&CStr> for Box<CStr>, From<&OsStr> for Box<OsStr>, From<&Path> for Box<Path>
ffi::FromBytesWithNulError implements Error and Display
Specialize PartialOrd<A> for [A] where A: Ord
Slightly optimize slice::sort
Add ToString trait specialization for Cow<'a, str> and String
Box<[T]> implements From<&[T]> where T: Copy, Box<str> implements From<&str>
IpAddr implements From for various arrays. SocketAddr implements From<(I, u16)> where I: Into<IpAddr>
format! estimates the needed capacity before writing a string
Support unprivileged symlink creation in Windows
PathBuf implements Default
Implement PartialEq<[A]> for VecDeque<A>
HashMap resizes adaptively to guard against DOS attacks and poor hash functions.
Cargo
Add cargo check --all
Add an option to ignore SSL revocation checking
Add cargo run --package
Add required_features
Assume build.rs is a build script
Find workspace via workspace_root link in containing member
Misc
Documentation is rendered with mdbook instead of the obsolete, in-tree rustbook
The "Unstable Book" documents nightly-only features
Improve the style of the sidebar in rustdoc output
Configure build correctly on 64-bit CPU's with the armhf ABI
Fix MSP430 breakage due to i128
Preliminary Solaris/SPARCv9 support
rustc is linked statically on Windows MSVC targets, allowing it to run without installing the MSVC runtime.
rustdoc --test includes file names in test names
This release includes builds of std for sparc64-unknown-linux-gnu, aarch64-unknown-linux-fuchsia, and x86_64-unknown-linux-fuchsia.
Initial support for aarch64-unknown-freebsd
Initial support for i686-unknown-netbsd
This release no longer includes the old makefile build system. Rust is built with a custom build system, written in Rust, and with Cargo.
Add Debug implementations for libcollection structs
TypeId implements PartialOrd and Ord
--test-threads=0 produces an error
rustup installs documentation by default
The Rust source includes NatVis visualizations. These can be used by WinDbg and Visual Studio to improve the debugging experience.
Compatibility Notes
Rust 1.17 does not correctly detect the MSVC 2017 linker. As a workaround, either use MSVC 2015 or run vcvars.bat.
When coercing to an unsized type lifetimes must be equal. That is, disallow subtyping between T and U when T: Unsize<U>, e.g. coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
format! and Display::to_string panic if an underlying formatting implementation returns an error. Previously the error was silently ignored. It is incorrect for write_fmt to return an error when writing to a string.
In-tree crates are verified to be unstable. Previously, some minor crates were marked stable and could be accessed from the stable toolchain.
Rust git source no longer includes vendored crates. Those that need to build with vendored crates should build from release tarballs.
Fix inert attributes from proc_macro_derives
During crate resolution, rustc prefers a crate in the sysroot if two crates are otherwise identical. Unlikely to be encountered outside the Rust build system.
Fixed bugs around how type inference interacts with dead-code. The existing code generally ignores the type of dead-code unless a type-hint is provided; this can cause surprising inference interactions particularly around defaulting. The new code uniformly ignores the result type of dead-code.
Tuple-struct constructors with private fields are no longer visible
Lifetime parameters that do not appear in the arguments are now considered early-bound, resolving a soundness bug (#32330). The hr_lifetime_in_assoc_type future-compatibility lint has been in effect since April of 2016.
rustdoc: fix doctests with non-feature crate attributes
Make transmuting from fn item types to pointer-sized types a hard error
2017-09-30 06:42:43 +02:00
|
|
|
|
2018-11-27 16:45:23 +01:00
|
|
|
GENERATE_PLIST+=find ${DESTDIR}${PREFIX} \( -type f -o -type l \) -print | \
|
|
|
|
sed 's,${DESTDIR}${PREFIX}/,,' | ${SORT} ;
|
2017-10-03 16:07:55 +02:00
|
|
|
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
.if ${OPSYS} == "Darwin"
|
2018-11-27 16:45:23 +01:00
|
|
|
LDFLAGS+= -headerpad_max_install_names
|
|
|
|
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
.PHONY: fix-darwin-install-name
|
|
|
|
post-install: fix-darwin-install-name
|
|
|
|
fix-darwin-install-name:
|
2018-09-30 18:19:54 +02:00
|
|
|
. for bin in clippy-driver rls rustc rustdoc
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
otool -XL ${DESTDIR}${PREFIX}/bin/${bin} \
|
|
|
|
| ${GREP} '@rpath' | while read rpath rest; do \
|
|
|
|
install_name_tool -change $$rpath \
|
|
|
|
`${ECHO} $$rpath | ${SED} -e 's,@rpath,${PREFIX}/lib,g'` \
|
|
|
|
${DESTDIR}${PREFIX}/bin/${bin}; \
|
|
|
|
done
|
|
|
|
. endfor
|
2018-09-30 18:19:54 +02:00
|
|
|
. for libdir in lib lib/rustlib/${RUST_ARCH}/lib lib/rustlib/${RUST_ARCH}/codegen-backends
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
for f in ${DESTDIR}${PREFIX}/${libdir}/lib*.dylib; do \
|
|
|
|
[ ! -f $$f ] && continue; \
|
|
|
|
install_name_tool -id `${ECHO} $$f | ${SED} -e 's,${DESTDIR},,g'` $$f; \
|
|
|
|
otool -XL $$f | grep '@rpath' | while read rpath rest; do \
|
|
|
|
install_name_tool -change $$rpath \
|
2018-09-30 18:19:54 +02:00
|
|
|
`${ECHO} $$rpath | ${SED} -e 's,@rpath,${PREFIX}/lib,g'` \
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
$$f; \
|
|
|
|
done; \
|
|
|
|
done
|
|
|
|
. endfor
|
|
|
|
.endif
|
|
|
|
|
2017-02-23 10:35:16 +01:00
|
|
|
#
|
|
|
|
# Create a relocatable stage2 bootstrap from the bits we just built that can be
|
|
|
|
# used to build the next version of rust. Currently only tested on SmartOS.
|
|
|
|
#
|
2018-01-04 16:18:50 +01:00
|
|
|
BOOTSTRAP_TMPDIR= ${WRKDIR}/${PKGNAME_NOREV}-${RUST_ARCH}
|
2017-02-23 10:35:16 +01:00
|
|
|
USE_TOOLS+= gtar
|
|
|
|
|
2018-10-13 12:03:36 +02:00
|
|
|
# The NetBSD part is so far untested, because I could not convince
|
|
|
|
# the rust build to use the gcc wrapper when building natively,
|
|
|
|
# so that I could get a placeholder in the RPATH, because chrpath
|
|
|
|
# cannot extend the length of the RPATH...
|
|
|
|
|
2017-02-23 10:35:16 +01:00
|
|
|
stage0-bootstrap: install
|
2018-01-04 16:18:50 +01:00
|
|
|
${RM} -rf ${BOOTSTRAP_TMPDIR}
|
2017-02-23 10:35:16 +01:00
|
|
|
${MKDIR} ${BOOTSTRAP_TMPDIR}
|
2018-10-13 12:03:36 +02:00
|
|
|
.if ${OPSYS} == "NetBSD"
|
|
|
|
(cd ${BOOTSTRAP_TMPDIR}; \
|
|
|
|
DISTDIR=${WRKSRC}/bild/dist; \
|
|
|
|
VER_ARCH=${PKGVERSION}-${RUST_ARCH}; \
|
|
|
|
RUSTC=rustc-$${VER_ARCH}; \
|
|
|
|
RUSTC_FILE=$${RUSTC}.tar.gz; \
|
|
|
|
RUST_STD=rust-std-$${VER_ARCH}; \
|
|
|
|
RUST_STD_FILE=$${RUST_STD}.tar.gz; \
|
|
|
|
${GTAR} -xzf $${DISTDIR}/$${RUSTC_FILE}; \
|
|
|
|
(cd ${RUSTC}; \
|
|
|
|
RPATH='/usr/pkg/lib:/lib:/usr/lib:$$ORIGIN/../lib'; \
|
|
|
|
for f in rls-preview/bin/rls rustc/bin/rustc rustc/bin/rustdoc; do \
|
|
|
|
chrpath -r $$RPATH $$f; \
|
|
|
|
done; \
|
|
|
|
RPATH='/usr/pkg/lib:/lib:/usr/lib:$$ORIGIN'; \
|
|
|
|
for f in rustc/lib/*.so*; do \
|
|
|
|
chrpath -r $$RPATH $$f; \
|
|
|
|
done; \
|
|
|
|
RPATH='/usr/pkg/lib:/lib:/usr/lib:$$ORIGIN:$$ORIGIN/../../..'; \
|
|
|
|
for f in rustc/lib/rustlib/*/*/*.so*; do \
|
|
|
|
chrpath -r $$RPATH $$f; \
|
|
|
|
done;); \
|
|
|
|
${GTAR} -czf $${RUSTC_FILE} $${RUSTC}; \
|
|
|
|
${CP} $${DISTDIR}/$${RUST_STD_FILE} .; \
|
2018-11-27 16:45:23 +01:00
|
|
|
${ECHO} "Fixed stage0 bootstrap in ${BOOTSTRAP_TMPDIR}:"; \
|
|
|
|
${ECHO} "$${RUSTC_FILE}"; \
|
|
|
|
${ECHO} "$${RUST_STD_FILE}"; \
|
2018-10-13 12:03:36 +02:00
|
|
|
)
|
|
|
|
.endif
|
|
|
|
.if ${OS_VARIANT} == "SmartOS"
|
2017-02-23 10:35:16 +01:00
|
|
|
${CP} -R ${DESTDIR}/${PREFIX}/bin ${BOOTSTRAP_TMPDIR}/
|
|
|
|
${CP} -R ${DESTDIR}/${PREFIX}/lib ${BOOTSTRAP_TMPDIR}/
|
2018-01-04 16:18:50 +01:00
|
|
|
${MKDIR} ${BOOTSTRAP_TMPDIR}/lib/pkgsrc
|
2017-02-23 10:35:16 +01:00
|
|
|
for lib in libgcc_s.so.1 libssp.so.0 libstdc++.so.6; do \
|
|
|
|
${CP} `${PKG_CC} -print-file-name=$${lib}` \
|
2018-01-04 16:18:50 +01:00
|
|
|
${BOOTSTRAP_TMPDIR}/lib/pkgsrc/; \
|
2017-02-23 10:35:16 +01:00
|
|
|
done
|
2018-01-04 16:18:50 +01:00
|
|
|
for lib in libcrypto.so.1.0.0 libcurl.so.4 libhttp_parser.so.2 \
|
|
|
|
libiconv.so.2 libidn2.so.0 libintl.so.8 liblber-2.4.so.2 \
|
|
|
|
libldap-2.4.so.2 libnghttp2.so.14 libsasl2.so.3 \
|
|
|
|
libssh2.so.1 libssl.so.1.0.0 libunistring.so.2 libz.so.1; do \
|
|
|
|
${CP} ${PREFIX}/lib/$${lib} ${BOOTSTRAP_TMPDIR}/lib/pkgsrc/; \
|
2017-02-23 10:35:16 +01:00
|
|
|
done
|
2018-01-04 16:18:50 +01:00
|
|
|
for f in ${BOOTSTRAP_TMPDIR}/bin/{cargo,rls,rustc,rustdoc}; do \
|
|
|
|
/usr/bin/elfedit -e 'dyn:runpath $$ORIGIN/../lib:$$ORIGIN/../lib/pkgsrc' $$f; \
|
|
|
|
done
|
|
|
|
for f in ${BOOTSTRAP_TMPDIR}/lib/pkgsrc/*.so*; do \
|
2017-02-23 10:35:16 +01:00
|
|
|
/usr/bin/elfedit -e 'dyn:runpath $$ORIGIN' $$f; \
|
|
|
|
done
|
2018-01-04 16:18:50 +01:00
|
|
|
for f in ${BOOTSTRAP_TMPDIR}/lib/*.so*; do \
|
|
|
|
/usr/bin/elfedit -e 'dyn:runpath $$ORIGIN:$$ORIGIN/pkgsrc' $$f; \
|
|
|
|
done
|
2018-07-18 18:24:38 +02:00
|
|
|
for f in ${BOOTSTRAP_TMPDIR}/lib/rustlib/${RUST_ARCH}/*/*.so*; do \
|
2018-01-04 16:18:50 +01:00
|
|
|
/usr/bin/elfedit -e 'dyn:runpath $$ORIGIN:$$ORIGIN/../../..:$$ORIGIN/../../../pkgsrc' $$f; \
|
2017-02-23 10:35:16 +01:00
|
|
|
done
|
|
|
|
(cd ${WRKDIR}; \
|
2018-01-04 16:18:50 +01:00
|
|
|
${GTAR} -zcf ${PKGNAME_NOREV}-${RUST_ARCH}.tar.gz ${PKGNAME_NOREV}-${RUST_ARCH})
|
2018-10-13 12:03:36 +02:00
|
|
|
.endif
|
2017-02-23 10:35:16 +01:00
|
|
|
|
2018-11-29 15:32:14 +01:00
|
|
|
# These dependencies currently use the bundled sources as they require
|
|
|
|
# development features not yet available in released versions.
|
|
|
|
#
|
|
|
|
#.include "../../devel/libgit2/buildlink3.mk"
|
|
|
|
#.include "../../security/libssh2/buildlink3.mk"
|
|
|
|
#.include "../../www/curl/buildlink3.mk"
|
|
|
|
#.include "../../www/http-parser/buildlink3.mk"
|
|
|
|
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
.include "../../devel/cmake/buildlink3.mk"
|
2018-11-27 16:45:23 +01:00
|
|
|
#.include "../../devel/jemalloc/buildlink3.mk"
|
Update to 1.20.0
* Disable SunOS/Solaris support because newer bootstrap is not available
* Include Rust libraries and Cargo
Changelog:
Version 1.20.0 (2017-08-31)
Language
Associated constants are now stabilised.
A lot of macro bugs are now fixed.
Compiler
Struct fields are now properly coerced to the expected field type.
Enabled wasm LLVM backend WASM can now be built with the wasm32-experimental-emscripten target.
Changed some of the error messages to be more helpful.
Add support for RELRO(RELocation Read-Only) for platforms that support it.
rustc now reports the total number of errors on compilation failure previously this was only the number of errors in the pass that failed.
Expansion in rustc has been sped up 29x.
added msp430-none-elf target.
rustc will now suggest one-argument enum variant to fix type mismatch when applicable
Fixes backtraces on Redox
rustc now identifies different versions of same crate when absolute paths of different types match in an error message.
Libraries
Relaxed Debug constraints on {HashMap,BTreeMap}::{Keys,Values}.
Impl PartialEq, Eq, PartialOrd, Ord, Debug, Hash for unsized tuples.
Impl fmt::{Display, Debug} for Ref, RefMut, MutexGuard, RwLockReadGuard, RwLockWriteGuard
Impl Clone for DefaultHasher.
Impl Sync for SyncSender.
Impl FromStr for char
Fixed how {f32, f64}::{is_sign_negative, is_sign_positive} handles NaN.
allow messages in the unimplemented!() macro. ie. unimplemented!("Waiting for 1.21 to be stable")
pub(restricted) is now supported in the thread_local! macro.
Upgrade to Unicode 10.0.0
Reimplemented {f32, f64}::{min, max} in Rust instead of using CMath.
Skip the main thread's manual stack guard on Linux
Iterator::nth for ops::{Range, RangeFrom} is now done in O(1) time
#[repr(align(N))] attribute max number is now 2^31 - 1. This was previously 2^15.
{OsStr, Path}::Display now avoids allocations where possible
Stabilized APIs
CStr::into_c_string
CString::as_c_str
CString::into_boxed_c_str
Chain::get_mut
Chain::get_ref
Chain::into_inner
Option::get_or_insert_with
Option::get_or_insert
OsStr::into_os_string
OsString::into_boxed_os_str
Take::get_mut
Take::get_ref
Utf8Error::error_len
char::EscapeDebug
char::escape_debug
compile_error!
f32::from_bits
f32::to_bits
f64::from_bits
f64::to_bits
mem::ManuallyDrop
slice::sort_unstable_by_key
slice::sort_unstable_by
slice::sort_unstable
str::from_boxed_utf8_unchecked
str::as_bytes_mut
str::as_bytes_mut
str::from_utf8_mut
str::from_utf8_unchecked_mut
str::get_mut
str::get_unchecked_mut
str::get_unchecked
str::get
str::into_boxed_bytes
Cargo
Cargo API token location moved from ~/.cargo/config to ~/.cargo/credentials.
Cargo will now build main.rs binaries that are in sub-directories of src/bin. ie. Having src/bin/server/main.rs and src/bin/client/main.rs generates target/debug/server and target/debug/client
You can now specify version of a binary when installed through cargo install using --vers.
Added --no-fail-fast flag to cargo to run all benchmarks regardless of failure.
Changed the convention around which file is the crate root.
The include/exclude property in Cargo.toml now accepts gitignore paths instead of glob patterns. Glob patterns are now deprecated.
Compatibility Notes
Functions with 'static in their return types will now not be as usable as if they were using lifetime parameters instead.
The reimplementation of {f32, f64}::is_sign_{negative, positive} now takes the sign of NaN into account where previously didn't.
Version 1.19.0 (2017-07-20)
Language
Numeric fields can now be used for creating tuple structs. RFC 1506 For example struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };.
Macro recursion limit increased to 1024 from 64.
Added lint for detecting unused macros.
loop can now return a value with break. RFC 1624 For example: let x = loop { break 7; };
C compatible unions are now available. RFC 1444 They can only contain Copy types and cannot have a Drop implementation. Example: union Foo { bar: u8, baz: usize }
Non capturing closures can now be coerced into fns, RFC 1558 Example: let foo: fn(u8) -> u8 = |v: u8| { v };
Compiler
Add support for bootstrapping the Rust compiler toolchain on Android.
Change arm-linux-androideabi to correspond to the armeabi official ABI. If you wish to continue targeting the armeabi-v7a ABI you should use --target armv7-linux-androideabi.
Fixed ICE when removing a source file between compilation sessions.
Minor optimisation of string operations.
Compiler error message is now aborting due to previous error(s) instead of aborting due to N previous errors This was previously inaccurate and would only count certain kinds of errors.
The compiler now supports Visual Studio 2017
The compiler is now built against LLVM 4.0.1 by default
Added a lot of new error codes
Added target-feature=+crt-static option RFC 1721 Which allows libraries with C Run-time Libraries(CRT) to be statically linked.
Fixed various ARM codegen bugs
Libraries
String now implements FromIterator<Cow<'a, str>> and Extend<Cow<'a, str>>
Vec now implements From<&mut [T]>
Box<[u8]> now implements From<Box<str>>
SplitWhitespace now implements Clone
[u8]::reverse is now 5x faster and [u16]::reverse is now 1.5x faster
eprint! and eprintln! macros added to prelude. Same as the print! macros, but for printing to stderr.
Stabilized APIs
OsString::shrink_to_fit
cmp::Reverse
Command::envs
thread::ThreadId
Cargo
Build scripts can now add environment variables to the environment the crate is being compiled in. Example: println!("cargo:rustc-env=FOO=bar");
Subcommands now replace the current process rather than spawning a new child process
Workspace members can now accept glob file patterns
Added --all flag to the cargo bench subcommand to run benchmarks of all the members in a given workspace.
Updated libssh2-sys to 0.2.6
Target directory path is now in the cargmetadata
Cargo no longer checks out a local working directory for the crates.io index This should provide smaller file size for the registry, and improve cloning times, especially on Windows machines.
Added an --exclude option for excluding certai using the --all option
Cargo will now automatically retry when receiving a 5xx error from crates.io
The --features option now accepts multiple comma or space delimited values.
Added support for custom target specific runners
Misc
Added ow prefer to download rust packages with XZ compression over GZip packages.
Added the ability to escape # in rust documentation By adding additional #'s ie. ## is now #
Compatibility Notes
MutexGuard<T> may only be Sync if T is Sync.
-Z flagning for a year previous to this.
As a result of the -Z flag change, the cargo-check plugin no longer works. Users should migrate to the built-in check command, which has been available since 1.16.
Ending a float literal with ._ is now a hard erro use ::self::foo; is now a hard error. self paths are always relative while the :: prefix makes a path absolute, but was ignored and the path was relative regardless.
Floating point constants in match patterns is now a hard error This was previously ts that don't derive PartialEq & Eq used match patterns is now a hard error This was previously a warning.
Lifetimes named '_ are no longer allowed. This was previously a warning.
From the pound escape, lines consisting of multiple #s are now visible
It is an error to reexport private enum variants. This is known to break a number of crates that depend on an older version of mustache.
On Windows, if VCINSTALLDIR is set incorrectly, rustc will try to use it to find the linker, and the build will fail where it did not previously
Version 1.18.0 (2017-06-08)
Language
Stabilize pub(restricted) pub can now accept a module path to make the item visible to just that module tree. Also accepts the keyword crate to make something public to the whole crate but not users of the library. Example: pub(crate) mod utils;. RFC 1422.
Stabilize #![windows_subsystem] attribute conservative exposure of the /SUBSYSTEM linker flag on Windows platforms. RFC 1665.
Refactor of trait object type parsing Now ty in macros can accept types like Write + Send, trailing + are now supported in trait objects, and better error reporting for trait objects starting with ?Sized.
0e+10 is now a valid floating point literal
Now warns if you bind a lifetime parameter to 'static
Tuples, Enum variant fields, and structs with no repr attribute or with #[repr(Rust)] are reordered to minimize padding and produce a smaller representation in some cases.
Compiler
rustc can now emit mir with --emit mir
Improved LLVM IR for trivial functions
Added explanation for E0090(Wrong number of lifetimes are supplied)
rustc compilation is now 15%-20% faster Thanks to optimisation opportunities found through profiling
Improved backtrace formatting when panicking
Libraries
Specialized Vec::from_iter being passed vec::IntoIter if the iterator hasn't been advanced the original Vec is reassembled with no actual iteration or reallocation.
Simplified HashMap Bucket interface provides performance improvements for iterating and cloning.
Specialize Vec::from_elem to use calloc
Fixed Race condition in fs::create_dir_all
No longer caching stdio on Windows
Optimized insertion sort in slice insertion sort in some cases 2.50%~ faster and in one case now 12.50% faster.
Optimized AtomicBool::fetch_nand
Stabilized APIs
Child::try_wait
HashMap::retain
HashSet::retain
PeekMut::pop
TcpStream::peek
UdpSocket::peek
UdpSocket::peek_from
Cargo
Added partial Pijul support Pijul is a version control system in Rust. You can now create new cargo projects with Pijul using cargo new --vcs pijul
Now always emits build script warnings for crates that fail to build
Added Android build support
Added --bins and --tests flags now you can build all programs of a certain type, for example cargo build --bins will build all binaries.
Added support for haiku
Misc
rustdoc can now use pulldown-cmark with the --enable-commonmark flag
Added rust-winbg script for better debugging on Windows
Rust now uses the official cross compiler for NetBSD
rustdoc now accepts # at the start of files
Fixed jemalloc support for musl
Compatibility Notes
Changes to how the 0 flag works in format! Padding zeroes are now always placed after the sign if it exists and before the digits. With the # flag the zeroes are placed after the prefix and before the digits.
Due to the struct field optimisation, using transmute on structs that have no repr attribute or #[repr(Rust)] will no longer work. This has always been undefined behavior, but is now more likely to break in practice.
The refactor of trait object type parsing fixed a bug where + was receiving the wrong priority parsing things like &for<'a> Tr<'a> + Send as &(for<'a> Tr<'a> + Send) instead of (&for<'a> Tr<'a>) + Send
Overlapping inherent impls are now a hard error
PartialOrd and Ord must agree on the ordering.
rustc main.rs -o out --emit=asm,llvm-ir Now will output out.asm and out.ll instead of only one of the filetypes.
calling a function that returns Self will no longer work when the size of Self cannot be statically determined.
rustc now builds with a "pthreads" flavour of MinGW for Windows GNU this has caused a few regressions namely:
Changed the link order of local static/dynamic libraries (respecting the order on given rather than having the compiler reorder).
Changed how MinGW is linked, native code linked to dynamic libraries may require manually linking to the gcc support library (for the native code itself)
Version 1.17.0 (2017-04-27)
Language
The lifetime of statics and consts defaults to 'static. RFC 1623
Fields of structs may be initialized without duplicating the field/variable names. RFC 1682
Self may be included in the where clause of impls. RFC 1647
When coercing to an unsized type lifetimes must be equal. That is, there is no subtyping between T and U when T: Unsize<U>. For example, coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
Values passed to the indexing operator, [], automatically coerce
Static variables may contain references to other statics
Compiler
Exit quickly on only --emit dep-info
Make -C relocation-model more correctly determine whether the linker creates a position-independent executable
Add -C overflow-checks to directly control whether integer overflow panics
The rustc type checker now checks items on demand instead of in a single in-order pass. This is mostly an internal refactoring in support of future work, including incremental type checking, but also resolves RFC 1647, allowing Self to appear in impl where clauses.
Optimize vtable loads
Turn off vectorization for Emscripten targets
Provide suggestions for unknown macros imported with use
Fix ICEs in path resolution
Strip exception handling code on Emscripten when panic=abort
Add clearer error message using &str + &str
Stabilized APIs
Arc::into_raw
Arc::from_raw
Arc::ptr_eq
Rc::into_raw
Rc::from_raw
Rc::ptr_eq
Ordering::then
Ordering::then_with
BTreeMap::range
BTreeMap::range_mut
collections::Bound
process::abort
ptr::read_unaligned
ptr::write_unaligned
Result::expect_err
Cell::swap
Cell::replace
Cell::into_inner
Cell::take
Libraries
BTreeMap and BTreeSet can iterate over ranges
Cell can store non-Copy types. RFC 1651
String implements FromIterator<&char>
Box implements a number of new conversions: From<Box<str>> for String, From<Box<[T]>> for Vec<T>, From<Box<CStr>> for CString, From<Box<OsStr>> for OsString, From<Box<Path>> for PathBuf, Into<Box<str>> for String, Into<Box<[T]>> for Vec<T>, Into<Box<CStr>> for CString, Into<Box<OsStr>> for OsString, Into<Box<Path>> for PathBuf, Default for Box<str>, Default for Box<CStr>, Default for Box<OsStr>, From<&CStr> for Box<CStr>, From<&OsStr> for Box<OsStr>, From<&Path> for Box<Path>
ffi::FromBytesWithNulError implements Error and Display
Specialize PartialOrd<A> for [A] where A: Ord
Slightly optimize slice::sort
Add ToString trait specialization for Cow<'a, str> and String
Box<[T]> implements From<&[T]> where T: Copy, Box<str> implements From<&str>
IpAddr implements From for various arrays. SocketAddr implements From<(I, u16)> where I: Into<IpAddr>
format! estimates the needed capacity before writing a string
Support unprivileged symlink creation in Windows
PathBuf implements Default
Implement PartialEq<[A]> for VecDeque<A>
HashMap resizes adaptively to guard against DOS attacks and poor hash functions.
Cargo
Add cargo check --all
Add an option to ignore SSL revocation checking
Add cargo run --package
Add required_features
Assume build.rs is a build script
Find workspace via workspace_root link in containing member
Misc
Documentation is rendered with mdbook instead of the obsolete, in-tree rustbook
The "Unstable Book" documents nightly-only features
Improve the style of the sidebar in rustdoc output
Configure build correctly on 64-bit CPU's with the armhf ABI
Fix MSP430 breakage due to i128
Preliminary Solaris/SPARCv9 support
rustc is linked statically on Windows MSVC targets, allowing it to run without installing the MSVC runtime.
rustdoc --test includes file names in test names
This release includes builds of std for sparc64-unknown-linux-gnu, aarch64-unknown-linux-fuchsia, and x86_64-unknown-linux-fuchsia.
Initial support for aarch64-unknown-freebsd
Initial support for i686-unknown-netbsd
This release no longer includes the old makefile build system. Rust is built with a custom build system, written in Rust, and with Cargo.
Add Debug implementations for libcollection structs
TypeId implements PartialOrd and Ord
--test-threads=0 produces an error
rustup installs documentation by default
The Rust source includes NatVis visualizations. These can be used by WinDbg and Visual Studio to improve the debugging experience.
Compatibility Notes
Rust 1.17 does not correctly detect the MSVC 2017 linker. As a workaround, either use MSVC 2015 or run vcvars.bat.
When coercing to an unsized type lifetimes must be equal. That is, disallow subtyping between T and U when T: Unsize<U>, e.g. coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
format! and Display::to_string panic if an underlying formatting implementation returns an error. Previously the error was silently ignored. It is incorrect for write_fmt to return an error when writing to a string.
In-tree crates are verified to be unstable. Previously, some minor crates were marked stable and could be accessed from the stable toolchain.
Rust git source no longer includes vendored crates. Those that need to build with vendored crates should build from release tarballs.
Fix inert attributes from proc_macro_derives
During crate resolution, rustc prefers a crate in the sysroot if two crates are otherwise identical. Unlikely to be encountered outside the Rust build system.
Fixed bugs around how type inference interacts with dead-code. The existing code generally ignores the type of dead-code unless a type-hint is provided; this can cause surprising inference interactions particularly around defaulting. The new code uniformly ignores the result type of dead-code.
Tuple-struct constructors with private fields are no longer visible
Lifetime parameters that do not appear in the arguments are now considered early-bound, resolving a soundness bug (#32330). The hr_lifetime_in_assoc_type future-compatibility lint has been in effect since April of 2016.
rustdoc: fix doctests with non-feature crate attributes
Make transmuting from fn item types to pointer-sized types a hard error
2017-09-30 06:42:43 +02:00
|
|
|
.include "../../devel/zlib/buildlink3.mk"
|
2018-11-27 16:45:23 +01:00
|
|
|
#.include "../../lang/llvm/buildlink3.mk"
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
.include "../../lang/python/tool.mk"
|
Update to 1.20.0
* Disable SunOS/Solaris support because newer bootstrap is not available
* Include Rust libraries and Cargo
Changelog:
Version 1.20.0 (2017-08-31)
Language
Associated constants are now stabilised.
A lot of macro bugs are now fixed.
Compiler
Struct fields are now properly coerced to the expected field type.
Enabled wasm LLVM backend WASM can now be built with the wasm32-experimental-emscripten target.
Changed some of the error messages to be more helpful.
Add support for RELRO(RELocation Read-Only) for platforms that support it.
rustc now reports the total number of errors on compilation failure previously this was only the number of errors in the pass that failed.
Expansion in rustc has been sped up 29x.
added msp430-none-elf target.
rustc will now suggest one-argument enum variant to fix type mismatch when applicable
Fixes backtraces on Redox
rustc now identifies different versions of same crate when absolute paths of different types match in an error message.
Libraries
Relaxed Debug constraints on {HashMap,BTreeMap}::{Keys,Values}.
Impl PartialEq, Eq, PartialOrd, Ord, Debug, Hash for unsized tuples.
Impl fmt::{Display, Debug} for Ref, RefMut, MutexGuard, RwLockReadGuard, RwLockWriteGuard
Impl Clone for DefaultHasher.
Impl Sync for SyncSender.
Impl FromStr for char
Fixed how {f32, f64}::{is_sign_negative, is_sign_positive} handles NaN.
allow messages in the unimplemented!() macro. ie. unimplemented!("Waiting for 1.21 to be stable")
pub(restricted) is now supported in the thread_local! macro.
Upgrade to Unicode 10.0.0
Reimplemented {f32, f64}::{min, max} in Rust instead of using CMath.
Skip the main thread's manual stack guard on Linux
Iterator::nth for ops::{Range, RangeFrom} is now done in O(1) time
#[repr(align(N))] attribute max number is now 2^31 - 1. This was previously 2^15.
{OsStr, Path}::Display now avoids allocations where possible
Stabilized APIs
CStr::into_c_string
CString::as_c_str
CString::into_boxed_c_str
Chain::get_mut
Chain::get_ref
Chain::into_inner
Option::get_or_insert_with
Option::get_or_insert
OsStr::into_os_string
OsString::into_boxed_os_str
Take::get_mut
Take::get_ref
Utf8Error::error_len
char::EscapeDebug
char::escape_debug
compile_error!
f32::from_bits
f32::to_bits
f64::from_bits
f64::to_bits
mem::ManuallyDrop
slice::sort_unstable_by_key
slice::sort_unstable_by
slice::sort_unstable
str::from_boxed_utf8_unchecked
str::as_bytes_mut
str::as_bytes_mut
str::from_utf8_mut
str::from_utf8_unchecked_mut
str::get_mut
str::get_unchecked_mut
str::get_unchecked
str::get
str::into_boxed_bytes
Cargo
Cargo API token location moved from ~/.cargo/config to ~/.cargo/credentials.
Cargo will now build main.rs binaries that are in sub-directories of src/bin. ie. Having src/bin/server/main.rs and src/bin/client/main.rs generates target/debug/server and target/debug/client
You can now specify version of a binary when installed through cargo install using --vers.
Added --no-fail-fast flag to cargo to run all benchmarks regardless of failure.
Changed the convention around which file is the crate root.
The include/exclude property in Cargo.toml now accepts gitignore paths instead of glob patterns. Glob patterns are now deprecated.
Compatibility Notes
Functions with 'static in their return types will now not be as usable as if they were using lifetime parameters instead.
The reimplementation of {f32, f64}::is_sign_{negative, positive} now takes the sign of NaN into account where previously didn't.
Version 1.19.0 (2017-07-20)
Language
Numeric fields can now be used for creating tuple structs. RFC 1506 For example struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };.
Macro recursion limit increased to 1024 from 64.
Added lint for detecting unused macros.
loop can now return a value with break. RFC 1624 For example: let x = loop { break 7; };
C compatible unions are now available. RFC 1444 They can only contain Copy types and cannot have a Drop implementation. Example: union Foo { bar: u8, baz: usize }
Non capturing closures can now be coerced into fns, RFC 1558 Example: let foo: fn(u8) -> u8 = |v: u8| { v };
Compiler
Add support for bootstrapping the Rust compiler toolchain on Android.
Change arm-linux-androideabi to correspond to the armeabi official ABI. If you wish to continue targeting the armeabi-v7a ABI you should use --target armv7-linux-androideabi.
Fixed ICE when removing a source file between compilation sessions.
Minor optimisation of string operations.
Compiler error message is now aborting due to previous error(s) instead of aborting due to N previous errors This was previously inaccurate and would only count certain kinds of errors.
The compiler now supports Visual Studio 2017
The compiler is now built against LLVM 4.0.1 by default
Added a lot of new error codes
Added target-feature=+crt-static option RFC 1721 Which allows libraries with C Run-time Libraries(CRT) to be statically linked.
Fixed various ARM codegen bugs
Libraries
String now implements FromIterator<Cow<'a, str>> and Extend<Cow<'a, str>>
Vec now implements From<&mut [T]>
Box<[u8]> now implements From<Box<str>>
SplitWhitespace now implements Clone
[u8]::reverse is now 5x faster and [u16]::reverse is now 1.5x faster
eprint! and eprintln! macros added to prelude. Same as the print! macros, but for printing to stderr.
Stabilized APIs
OsString::shrink_to_fit
cmp::Reverse
Command::envs
thread::ThreadId
Cargo
Build scripts can now add environment variables to the environment the crate is being compiled in. Example: println!("cargo:rustc-env=FOO=bar");
Subcommands now replace the current process rather than spawning a new child process
Workspace members can now accept glob file patterns
Added --all flag to the cargo bench subcommand to run benchmarks of all the members in a given workspace.
Updated libssh2-sys to 0.2.6
Target directory path is now in the cargmetadata
Cargo no longer checks out a local working directory for the crates.io index This should provide smaller file size for the registry, and improve cloning times, especially on Windows machines.
Added an --exclude option for excluding certai using the --all option
Cargo will now automatically retry when receiving a 5xx error from crates.io
The --features option now accepts multiple comma or space delimited values.
Added support for custom target specific runners
Misc
Added ow prefer to download rust packages with XZ compression over GZip packages.
Added the ability to escape # in rust documentation By adding additional #'s ie. ## is now #
Compatibility Notes
MutexGuard<T> may only be Sync if T is Sync.
-Z flagning for a year previous to this.
As a result of the -Z flag change, the cargo-check plugin no longer works. Users should migrate to the built-in check command, which has been available since 1.16.
Ending a float literal with ._ is now a hard erro use ::self::foo; is now a hard error. self paths are always relative while the :: prefix makes a path absolute, but was ignored and the path was relative regardless.
Floating point constants in match patterns is now a hard error This was previously ts that don't derive PartialEq & Eq used match patterns is now a hard error This was previously a warning.
Lifetimes named '_ are no longer allowed. This was previously a warning.
From the pound escape, lines consisting of multiple #s are now visible
It is an error to reexport private enum variants. This is known to break a number of crates that depend on an older version of mustache.
On Windows, if VCINSTALLDIR is set incorrectly, rustc will try to use it to find the linker, and the build will fail where it did not previously
Version 1.18.0 (2017-06-08)
Language
Stabilize pub(restricted) pub can now accept a module path to make the item visible to just that module tree. Also accepts the keyword crate to make something public to the whole crate but not users of the library. Example: pub(crate) mod utils;. RFC 1422.
Stabilize #![windows_subsystem] attribute conservative exposure of the /SUBSYSTEM linker flag on Windows platforms. RFC 1665.
Refactor of trait object type parsing Now ty in macros can accept types like Write + Send, trailing + are now supported in trait objects, and better error reporting for trait objects starting with ?Sized.
0e+10 is now a valid floating point literal
Now warns if you bind a lifetime parameter to 'static
Tuples, Enum variant fields, and structs with no repr attribute or with #[repr(Rust)] are reordered to minimize padding and produce a smaller representation in some cases.
Compiler
rustc can now emit mir with --emit mir
Improved LLVM IR for trivial functions
Added explanation for E0090(Wrong number of lifetimes are supplied)
rustc compilation is now 15%-20% faster Thanks to optimisation opportunities found through profiling
Improved backtrace formatting when panicking
Libraries
Specialized Vec::from_iter being passed vec::IntoIter if the iterator hasn't been advanced the original Vec is reassembled with no actual iteration or reallocation.
Simplified HashMap Bucket interface provides performance improvements for iterating and cloning.
Specialize Vec::from_elem to use calloc
Fixed Race condition in fs::create_dir_all
No longer caching stdio on Windows
Optimized insertion sort in slice insertion sort in some cases 2.50%~ faster and in one case now 12.50% faster.
Optimized AtomicBool::fetch_nand
Stabilized APIs
Child::try_wait
HashMap::retain
HashSet::retain
PeekMut::pop
TcpStream::peek
UdpSocket::peek
UdpSocket::peek_from
Cargo
Added partial Pijul support Pijul is a version control system in Rust. You can now create new cargo projects with Pijul using cargo new --vcs pijul
Now always emits build script warnings for crates that fail to build
Added Android build support
Added --bins and --tests flags now you can build all programs of a certain type, for example cargo build --bins will build all binaries.
Added support for haiku
Misc
rustdoc can now use pulldown-cmark with the --enable-commonmark flag
Added rust-winbg script for better debugging on Windows
Rust now uses the official cross compiler for NetBSD
rustdoc now accepts # at the start of files
Fixed jemalloc support for musl
Compatibility Notes
Changes to how the 0 flag works in format! Padding zeroes are now always placed after the sign if it exists and before the digits. With the # flag the zeroes are placed after the prefix and before the digits.
Due to the struct field optimisation, using transmute on structs that have no repr attribute or #[repr(Rust)] will no longer work. This has always been undefined behavior, but is now more likely to break in practice.
The refactor of trait object type parsing fixed a bug where + was receiving the wrong priority parsing things like &for<'a> Tr<'a> + Send as &(for<'a> Tr<'a> + Send) instead of (&for<'a> Tr<'a>) + Send
Overlapping inherent impls are now a hard error
PartialOrd and Ord must agree on the ordering.
rustc main.rs -o out --emit=asm,llvm-ir Now will output out.asm and out.ll instead of only one of the filetypes.
calling a function that returns Self will no longer work when the size of Self cannot be statically determined.
rustc now builds with a "pthreads" flavour of MinGW for Windows GNU this has caused a few regressions namely:
Changed the link order of local static/dynamic libraries (respecting the order on given rather than having the compiler reorder).
Changed how MinGW is linked, native code linked to dynamic libraries may require manually linking to the gcc support library (for the native code itself)
Version 1.17.0 (2017-04-27)
Language
The lifetime of statics and consts defaults to 'static. RFC 1623
Fields of structs may be initialized without duplicating the field/variable names. RFC 1682
Self may be included in the where clause of impls. RFC 1647
When coercing to an unsized type lifetimes must be equal. That is, there is no subtyping between T and U when T: Unsize<U>. For example, coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
Values passed to the indexing operator, [], automatically coerce
Static variables may contain references to other statics
Compiler
Exit quickly on only --emit dep-info
Make -C relocation-model more correctly determine whether the linker creates a position-independent executable
Add -C overflow-checks to directly control whether integer overflow panics
The rustc type checker now checks items on demand instead of in a single in-order pass. This is mostly an internal refactoring in support of future work, including incremental type checking, but also resolves RFC 1647, allowing Self to appear in impl where clauses.
Optimize vtable loads
Turn off vectorization for Emscripten targets
Provide suggestions for unknown macros imported with use
Fix ICEs in path resolution
Strip exception handling code on Emscripten when panic=abort
Add clearer error message using &str + &str
Stabilized APIs
Arc::into_raw
Arc::from_raw
Arc::ptr_eq
Rc::into_raw
Rc::from_raw
Rc::ptr_eq
Ordering::then
Ordering::then_with
BTreeMap::range
BTreeMap::range_mut
collections::Bound
process::abort
ptr::read_unaligned
ptr::write_unaligned
Result::expect_err
Cell::swap
Cell::replace
Cell::into_inner
Cell::take
Libraries
BTreeMap and BTreeSet can iterate over ranges
Cell can store non-Copy types. RFC 1651
String implements FromIterator<&char>
Box implements a number of new conversions: From<Box<str>> for String, From<Box<[T]>> for Vec<T>, From<Box<CStr>> for CString, From<Box<OsStr>> for OsString, From<Box<Path>> for PathBuf, Into<Box<str>> for String, Into<Box<[T]>> for Vec<T>, Into<Box<CStr>> for CString, Into<Box<OsStr>> for OsString, Into<Box<Path>> for PathBuf, Default for Box<str>, Default for Box<CStr>, Default for Box<OsStr>, From<&CStr> for Box<CStr>, From<&OsStr> for Box<OsStr>, From<&Path> for Box<Path>
ffi::FromBytesWithNulError implements Error and Display
Specialize PartialOrd<A> for [A] where A: Ord
Slightly optimize slice::sort
Add ToString trait specialization for Cow<'a, str> and String
Box<[T]> implements From<&[T]> where T: Copy, Box<str> implements From<&str>
IpAddr implements From for various arrays. SocketAddr implements From<(I, u16)> where I: Into<IpAddr>
format! estimates the needed capacity before writing a string
Support unprivileged symlink creation in Windows
PathBuf implements Default
Implement PartialEq<[A]> for VecDeque<A>
HashMap resizes adaptively to guard against DOS attacks and poor hash functions.
Cargo
Add cargo check --all
Add an option to ignore SSL revocation checking
Add cargo run --package
Add required_features
Assume build.rs is a build script
Find workspace via workspace_root link in containing member
Misc
Documentation is rendered with mdbook instead of the obsolete, in-tree rustbook
The "Unstable Book" documents nightly-only features
Improve the style of the sidebar in rustdoc output
Configure build correctly on 64-bit CPU's with the armhf ABI
Fix MSP430 breakage due to i128
Preliminary Solaris/SPARCv9 support
rustc is linked statically on Windows MSVC targets, allowing it to run without installing the MSVC runtime.
rustdoc --test includes file names in test names
This release includes builds of std for sparc64-unknown-linux-gnu, aarch64-unknown-linux-fuchsia, and x86_64-unknown-linux-fuchsia.
Initial support for aarch64-unknown-freebsd
Initial support for i686-unknown-netbsd
This release no longer includes the old makefile build system. Rust is built with a custom build system, written in Rust, and with Cargo.
Add Debug implementations for libcollection structs
TypeId implements PartialOrd and Ord
--test-threads=0 produces an error
rustup installs documentation by default
The Rust source includes NatVis visualizations. These can be used by WinDbg and Visual Studio to improve the debugging experience.
Compatibility Notes
Rust 1.17 does not correctly detect the MSVC 2017 linker. As a workaround, either use MSVC 2015 or run vcvars.bat.
When coercing to an unsized type lifetimes must be equal. That is, disallow subtyping between T and U when T: Unsize<U>, e.g. coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.
format! and Display::to_string panic if an underlying formatting implementation returns an error. Previously the error was silently ignored. It is incorrect for write_fmt to return an error when writing to a string.
In-tree crates are verified to be unstable. Previously, some minor crates were marked stable and could be accessed from the stable toolchain.
Rust git source no longer includes vendored crates. Those that need to build with vendored crates should build from release tarballs.
Fix inert attributes from proc_macro_derives
During crate resolution, rustc prefers a crate in the sysroot if two crates are otherwise identical. Unlikely to be encountered outside the Rust build system.
Fixed bugs around how type inference interacts with dead-code. The existing code generally ignores the type of dead-code unless a type-hint is provided; this can cause surprising inference interactions particularly around defaulting. The new code uniformly ignores the result type of dead-code.
Tuple-struct constructors with private fields are no longer visible
Lifetime parameters that do not appear in the arguments are now considered early-bound, resolving a soundness bug (#32330). The hr_lifetime_in_assoc_type future-compatibility lint has been in effect since April of 2016.
rustdoc: fix doctests with non-feature crate attributes
Make transmuting from fn item types to pointer-sized types a hard error
2017-09-30 06:42:43 +02:00
|
|
|
.include "../../security/openssl/buildlink3.mk"
|
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes:
* The build requires binary bootstraps built by the Rust team. Due
to the requirement that only the previous version is supported as
a bootstrap compiler, and new versions of Rust are released every
6 weeks, it is unlikely to be practical to build TNF bootstraps.
Users should evaluate whether they trust binaries from upstream.
* There is currently no SunOS bootstrap provided by the Rust team,
so for now a version built by myself is provided by Joyent.
* Only Darwin/Linux/SunOS are currently supported. The Rust team do
provide NetBSD bootstraps so support should be easy enough to add.
Information about Rust from the DESCR:
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.
It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
2016-09-06 12:36:49 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|