profile
viewpoint

japaric/steed 518

[INACTIVE] Rust's standard library, free of C dependencies, for Linux systems

bluss/arrayvec 212

A vector with a fixed capacity. (Rust)

strega-nil/readline 3

A cross platform readline wrapper in Rust (Linux, Mac OS X, and Windows)

tbu-/dirs 3

A library for querying operating system specific directories

tbu-/buffer 2

Safe, write-only, generics-free buffer abstraction

tbu-/file_offset 1

A Rust library for atomically reading and writing files at given offsets

tbu-/movim 1

Movim - Kickass Social Network

strega-nil/readline-sys 0

Declarations for `libreadline` or `libedit`

tbu-/arrayvec 0

A vector with a fixed capacity. (Rust)

tbu-/assert_matches 0

Provides macro `assert_matches` for testing pattern matching

issue commentrust-lang/rust

f32, f64 missing from_le, from_be, to_le, to_be, swap_bytes implementation

@steveklabnik Since this issue was create, we have created alternative methods to convert floats from/to bytes in big/little endian: #60446.

Timmmm

comment created time in 3 months

Pull request review commentrust-lang/rust

Add core::{f32,f64}::consts::TAU.

 pub mod consts {     // FIXME: replace with mathematical constants from cmath.      /// Archimedes' constant (π)+    ///+    /// Equal to τ/2.

Regardless of whether we should add tau to the standard library or not, I don't think that this is a worthwhile addition to the doc comment of pi. Pi is well-known among the general population, you won't have to look far to find mathematicians who don't know about tau.

m-ou-se

comment created time in 3 months

PR closed rust-lang/rust

Change to non-line buffered output if output is not a TTY S-waiting-on-author

This matches glibc behavior.

This is determined using the isatty function on Unixes, and not attempted at all for other operating systems.

Fixes #60673.

+199 -54

10 comments

11 changed files

tbu-

pr closed time in 4 months

pull request commentrust-lang/rust

Change to non-line buffered output if output is not a TTY

Too little time right now.

tbu-

comment created time in 4 months

push eventtbu-/rust

Tobias Bucher

commit sha 5279048070200cfc6b512e258b519df83325c42c

Explicitly flush in tests that relied on linebuffering

view details

push time in 5 months

push eventtbu-/rust

Tobias Bucher

commit sha 24367350c2c48af708a84afb44c8ac0dcd87a859

Explicitly flush in tests that relied on linebuffering

view details

push time in 5 months

pull request commentrust-lang/rust

Change to non-line buffered output if output is not a TTY

An interesting question here is what we should do exec. The answer is: probably nothing, like libc does.

#include <stdio.h>
#include <unistd.h>

int main() {
	printf("a\n");
	char *a[] = {"/bin/ls", NULL};
	execv(a[0], a);
	return 0;
}

This doesn't output the a if you pipe it into cat, because stdout will be linebuffered then.

tbu-

comment created time in 5 months

PR opened bluss/arrayvec

Add `as_{,mut_}ptr` functions to `ArrayVec`, mirroring `Vec`

Fixes #135.

+10 -0

0 comment

1 changed file

pr created time in 5 months

push eventtbu-/arrayvec

Tobias Bucher

commit sha 516f1511f6ad62e00a59d102f503ac7e31260012

Add `as_{,mut_}ptr` functions to `ArrayVec`, mirroring `Vec` Fixes #135.

view details

push time in 5 months

create barnchtbu-/arrayvec

branch : pr_asptr

created branch time in 5 months

pull request commentbluss/arrayvec

gitignore: ignore target as a symlink

If you want to move all cargo target dirs globally, just do

export CARGO_TARGET_DIR=/var/tmp/cargo
mathstuf

comment created time in 5 months

issue openedbriansmith/webpki

DNSName does not conform to Rust's naming convention, should be DnsName

See https://github.com/rust-lang/rfcs/blob/7afbf18edec3811dd7c8adacf24a293db887fd03/text/0430-finalizing-naming-conventions.md#fine-points.

created time in 5 months

delete branch tbu-/rust-openssl

delete branch : gh-pages

delete time in 5 months

delete branch tbu-/rust-openssl

delete branch : 0.9.x

delete time in 5 months

fork tbu-/rust-openssl

OpenSSL bindings for Rust

fork in 5 months

pull request commentrust-lang/rust

Change to non-line buffered output if output is not a TTY

I get a 4x speed up for the worst case of the old implementation:

fn main() {
    for _ in 0..(1<<20) {
        println!("y");
    }
}
$ hyperfine './old' './new'
Benchmark #1: ./old
  Time (mean ± σ):     462.1 ms ±   4.4 ms    [User: 241.5 ms, System: 218.2 ms]
  Range (min … max):   453.9 ms … 467.4 ms    10 runs
 
Benchmark #2: ./new
  Time (mean ± σ):     109.9 ms ±   5.5 ms    [User: 107.9 ms, System: 1.3 ms]
  Range (min … max):   102.0 ms … 120.6 ms    27 runs
 
Summary
  './new' ran
    4.20 ± 0.21 times faster than './old'

The old program is doing 1048576 write syscalls, the new one 256.

Changing the program to use an infinite loop, I get a throughput of 3MB/s vs 20MB/s.

tbu-

comment created time in 5 months

push eventtbu-/rust

Tobias Bucher

commit sha fb48c55999d182cc08e008025b7e53eed849de1f

Change to non-line buffered output if output is not a TTY This matches glibc behavior. This is determined using the `isatty` function on Unixes, and not attempted at all for other operating systems. Fixes #60673.

view details

push time in 5 months

push eventtbu-/rust

Tobias Bucher

commit sha 612524dc4a49cd5ce6bf2971f215daa7431ccd77

Change to non-line buffered output if output is not a TTY This matches glibc behavior. This is determined using the `isatty` function on Unixes, and not attempted at all for other operating systems. Fixes #60673.

view details

push time in 5 months

PR opened rust-lang/rust

Change to non-line buffered output if output is not a TTY

This matches glibc behavior.

This is determined using the isatty function on Unixes, and not attempted at all for other operating systems.

Fixes #60673.

+197 -54

0 comment

9 changed files

pr created time in 5 months

push eventtbu-/rust

Tobias Bucher

commit sha 8baed8766c02e474635a7199a8f36c1013fd8012

Change to non-line buffered output if output is not a TTY This matches glibc behavior. This is determined using the `isatty` function on Unixes, and not attempted at all for other operating systems. Fixes #60673.

view details

push time in 5 months

push eventtbu-/rust

Tobias Bucher

commit sha 78c16f8de706137018e947964c03f1497392b675

Unify stdio buffering with faking unavailable stdio

view details

Tobias Bucher

commit sha 764406e3b2109cf52585310cf750fdcac61c2a94

Change to non-line buffered output if output is not a TTY This is determined using the `isatty` function on Unixes, and not attempted at all for other operating systems.

view details

push time in 5 months

create barnchtbu-/rust

branch : pr_stdout_nonlinebuffered

created branch time in 5 months

push eventtbu-/rust

Ali Raheem

commit sha 9755fe80ee88803f2ecf7e86d7ae6d6fb8e25f55

Add fs::read_dir() and ReadDir warning about iterator order + example

view details

Ali Raheem

commit sha 8068812d042fa1bfb2133332152ee591705fdef7

Remove Iteration order heading

view details

Ali Raheem

commit sha 53c504650dc6e51c45a256f56c92b872082d0642

Fix gramitcal error in read_dir example

view details

Trevor Spiteri

commit sha 39260d9016db6925414541ad2dce6502dded3a64

make abs, wrapping_abs, and overflowing_abs const functions

view details

Trevor Spiteri

commit sha adee559659774054497fc36afea0076c334c0bb2

test const abs, wrapping_abs, and overflowing_abs

view details

Christian

commit sha 33788c252c83aeea913482b283e33ccc41bd2860

Added table containing the system calls used by Instant and SystemTime.

view details

Marcin Mielniczuk

commit sha c8619ae7916459bec1b7e5583d75c69b10f06df9

Document platform-specific behavior of the iterator returned by std::fs::read_dir

view details

ljedrz

commit sha 9a6ca413714271adac017cbdd764a7de8b244001

HirIdify hir::Crate.modules

view details

Thomas de Zeeuw

commit sha d86516d91e643fd87eadf057096989ce454f4d81

Stabilise weak_ptr_eq

view details

Thomas de Zeeuw

commit sha 307804a00d191b6f15d1a1a5b98fbae5ea6593b0

Update {rc, sync}::Weak::ptr_eq doc about comparing Weak::new

view details

Ali Raheem

commit sha 3c820fef9fafca1f25da37274aea683b9e341339

Comment out println in read_dir sorting example

view details

Christian Veenman

commit sha 1478ef45287c4da0da0daf1715d00e8b06fa333b

Update src/libstd/time.rs Co-Authored-By: lzutao <taolzu@gmail.com>

view details

Jonas Schievink

commit sha a8926a5e9c5becdf18acede5f7e114cd5f8655b6

Use `panic::set_hook` to print the ICE message

view details

Jonas Schievink

commit sha e296ed321e37dc5ba21536a1f4b277b5536f6838

Move librustc panic handler into the new one

view details

Jonas Schievink

commit sha 035333993d09df69dd82723881b05cda5f0cde07

Clarify that rustc unwinds on errors, not panics

view details

Jonas Schievink

commit sha 3e2d4d28b1c1a96e7c7482ae3e82fbf81505e8a7

Document the ICE hook and make it more flexible

view details

Jonas Schievink

commit sha cf1db72281134ab7375447f17bc2becb3943ee5d

Update comment

view details

Jonas Schievink

commit sha 547f96f19c45c469a65f5f3862213165cf899d54

Update proc-macro tests Due to #59998, the panic hook fires incorrectly for errors that should not be treated as ICEs. Previously, this would only print the default panic message, but moving the ICE printing into the panic handler will now print the entire ICE ordeal we all hate to see. Unfortunately this will make #59998 a lot more visible.

view details

Jonas Schievink

commit sha eefae7b1a9980b10f9b44a3ed14e47cf062b0c96

Update Cargo.lock

view details

Baoshan Pang

commit sha 4dd4da97175b1c6cf15fc9505ec8f8afdaf71a24

remove directory libstd/sys/vxworks/backtrace which is not used any more

view details

push time in 5 months

issue commentbluss/arrayvec

Support for constant generics

Sounds good, will work well on x86 at least I guess. For other platforms, there might be alignment issues, e.g. if you have a 256 byte array of bytes, it requires a 16 bit integer as index, but that will potentially not be aligned, leading to more expensive stores/loads.

c410-f3r

comment created time in 5 months

push eventtbu-/rust

Mazdak Farrokhzad

commit sha aec047edebb596c79852fc78c5cfcddbae595c08

Rollup merge of #61780 - SimonSapin:container-error, r=Amanieu Finalize the error type for `try_reserve` See tracking issue comments from https://github.com/rust-lang/rust/issues/48043#issuecomment-500828346. It is now: ```rust /// The error type for `try_reserve` methods. #[derive(Clone, PartialEq, Eq, Debug)] #[unstable(feature = "try_reserve", reason = "new API", issue="48043")] pub enum TryReserveError { /// Error due to the computed capacity exceeding the collection's maximum /// (usually `isize::MAX` bytes). CapacityOverflow, /// The memory allocator returned an error AllocError { /// The layout of allocation request that failed layout: Layout, #[doc(hidden)] #[unstable(feature = "container_error_extra", issue = "0", reason = "\ Enable exposing the allocator’s custom error value \ if an associated type is added in the future: \ https://github.com/rust-lang/wg-allocators/issues/23")] non_exhaustive: (), }, } #[unstable(feature = "try_reserve", reason = "new API", issue="48043")] impl From<LayoutErr> for TryReserveError { #[inline] fn from(_: LayoutErr) -> Self { TryReserveError::CapacityOverflow } } ``` Changes: * A `Layout` is included. Firefox wants to log the size of failed allocations. If this were not part of the return value of e.g. `HashMap::try_reserve`, users would only be able to estimate based on `HashMap::capacity` and assumptions about the allocation strategy of `HashMap`. * There’s a dummy field that can stay unstable when `try_reserve` and the rest of this enum are stabilized. This forces non-exhaustive matching ~(https://github.com/rust-lang/rust/issues/44109 is not implemented yet for variants)~ and allows adding another field in the future if we want to expose custom error values from the allocator. See https://github.com/rust-lang/wg-allocators/issues/23. - If the `Alloc` trait is stabilized without an associated error type and with a zero-size `AllocErr` type, we can simply remove this dummy field. - If an associated type is added, we can add a default type parameter to `ContainerError` and a generic field to the `AllocError` variant. * ~Moved from the `collections` module to the `alloc` module, and replaced `Collection` in the enum name with `Container`. The wold collection implies a multiplicity of items which is not relevant to this type. For example we may want to use this error type in a future `Box::try_new` method.~ - Renamed to `TryReserveError`, after the methods that involve this type: https://github.com/rust-lang/rust/pull/61780#issuecomment-501392487 * Replaced `Err` with `Error` in the enum and variant names. There is more precedent for this in https://doc.rust-lang.org/std/error/trait.Error.html#implementors, `AllocErr` and `LayoutErr` are the odd ones. * ~Dropped `Alloc` in the enum name. `ContainerAllocError` with a mouthful, and being in the `alloc` module already provides the same indication.~

view details

Mazdak Farrokhzad

commit sha db3bae01708b41f7fd9bb75830cd9163b8b10e48

Rollup merge of #63495 - eddyb:mir-constant-ty, r=oli-obk Remove redundant `ty` fields from `mir::Constant` and `hair::pattern::PatternRange`. Fixes #56137. As a side-effect, associated const literals have the correct type now, which should make things easier for #61041. r? @oli-obk / @matthewjasper cc @davidtwco @varkor

view details

Mazdak Farrokhzad

commit sha c83d3c32815c13d9fa2e881ed97b7163030cd8cc

Rollup merge of #63525 - matklad:centraliza-file-loading, r=petrochenkov Make sure that all file loading happens via SourceMap That way, callers don't need to repeat "let's add this to sm manually for tracking dependencies" trick. It should make it easier to switch to using `FileLoader` for binary files in the future as well cc #62948 r? @petrochenkov

view details

Mazdak Farrokhzad

commit sha c53ce3b0cf271641530f3160a46ac239ca0c3623

Rollup merge of #63595 - semarie:openbsd-sparc64, r=alexcrichton add sparc64-unknown-openbsd target on OpenBSD, some architectures relies on libc++ (from LLVM) and some others on libestdc++ (particular version of libstdc++ from GCC). sparc64-unknown-openbsd needs libestdc++ and libgcc (as x86_64 some years ago). Reintroduce the support of them for openbsd, only for sparc64 arch. Some others architectures on OpenBSD could use them too.

view details

Mazdak Farrokhzad

commit sha b7311316fe8b6638d5d9dc07f18def8f60f0b9d2

Rollup merge of #63604 - Wind-River:master, r=alexcrichton Some update for vxWorks 1. support crt-static 2. change armv7_wrs_vxworks to armv7_wrs_vxworks_eabihf. 3. change vx-cxx to wr-c++, vx-ar to wr-ar and vx-run to wr-run. 4. code cleanup r? @alexcrichton

view details

Mazdak Farrokhzad

commit sha cd21715c3412dc381e386db229cb679015289359

Rollup merge of #63613 - petrochenkov:stdhyg, r=alexcrichton Hygienize use of built-in macros in the standard library Same as https://github.com/rust-lang/rust/pull/61629, but for built-in macros. Closes https://github.com/rust-lang/rust/issues/48781 r? @alexcrichton

view details

Mazdak Farrokhzad

commit sha f40a2807a9a017179f0c2224cb991a370554c7c1

Rollup merge of #63632 - vext01:vext01-comment-fixes, r=eddyb A couple of comment fixes. This change fixes a couple of comments in the compiler code. The first change was discussed with @eddyb. This one confused me because I thought only *public* defs were in the table (not so). The second was a typo I noticed yesterday. OK to go in?

view details

Mazdak Farrokhzad

commit sha 4c3f21b47d05a4f8d8e3f680ac03f2997375ece3

Rollup merge of #63634 - pietroalbini:cpu-stats-name, r=alexcrichton ci: properly set the job name in CPU stats r? @alexcrichton

view details

Mazdak Farrokhzad

commit sha 6b0a83862ce7f0fa0bd5d729b3b89b6ad25f8221

Rollup merge of #63636 - pietroalbini:ci-mingw, r=alexcrichton ci: move linkcheck from mingw-2 to mingw-1 Running UI tests now takes a huge amount of time on mingw builders (between 40 and 50 minutes), with mingw-1 builders taking even an hour less to finish than mingw-2. This PR moves linkcheck from mingw-2 to mingw-1, removing between 10 and 20 minutes of runtime on the -2 builders. r? @alexcrichton

view details

Justin Restivo

commit sha 178abd7d810a15a39baf2ab366e8fde0974287c7

add git keyword to submodule option

view details

Eduard-Mihai Burtescu

commit sha 0f1da639d4ad18a762834069c588e89b2b252cab

Rename overflowing_{add,sub,mul} intrinsics to wrapping_{add,sub,mul}.

view details

Eduard-Mihai Burtescu

commit sha 892ef6fa48bd20c037351e0cf8ea12c4c429a868

rustbuild: work around the stdarch cfg(bootstrap) bug.

view details

Mazdak Farrokhzad

commit sha 4087fc583e543f2801bf2e8c3b8051b31d26a078

Feature gate 'yield ?' pre-expansion.

view details

Mazdak Farrokhzad

commit sha 20661f18df695058224427fb84d21a0eeec8c657

Simplify pre-expansion gating in general.

view details

Vadim Petrochenkov

commit sha ea81d8cedb68076cb194204f86a0ffb1204be8f9

resolve: Populate external modules in more automatic and lazy way The modules are now populated implicitly on the first access

view details

Vadim Petrochenkov

commit sha fe2524cb9cf09e7a0aa84bbb36a130e65255e1c0

resolve: Populate external traits lazily as well

view details

Vadim Petrochenkov

commit sha ab4cc2db56c0985ff5a0eb722898d8f45186d5aa

resolve: Move some code around

view details

Vadim Petrochenkov

commit sha 5e47cd4a1784bd9d86a3f5a413d606e938679044

Fix rebase Move some code into `build_reduced_graph.rs` to keep `BuildReducedGraphVisitor` it private Also move the def collector call to `build_reduced_graph.rs`, it belongs there.

view details

bors

commit sha bdfd698f37184da42254a03ed466ab1f90e6fb6c

Auto merge of #63640 - Centril:rollup-yeb8o66, r=Centril Rollup of 10 pull requests Successful merges: - #60492 (Add custom nth_back for Chain) - #61780 (Finalize the error type for `try_reserve`) - #63495 ( Remove redundant `ty` fields from `mir::Constant` and `hair::pattern::PatternRange`.) - #63525 (Make sure that all file loading happens via SourceMap) - #63595 (add sparc64-unknown-openbsd target) - #63604 (Some update for vxWorks) - #63613 (Hygienize use of built-in macros in the standard library) - #63632 (A couple of comment fixes.) - #63634 (ci: properly set the job name in CPU stats) - #63636 (ci: move linkcheck from mingw-2 to mingw-1) Failed merges: r? @ghost

view details

Mazdak Farrokhzad

commit sha 7f3c67d4e0c4d8237899c6aa99a174547ff85b09

Rollup merge of #63149 - petrochenkov:lazypop2, r=eddyb resolve: Populate external modules in more automatic and lazy way So, resolve had this function `populate_module_if_necessary` for loading module children from other crates from metadata. I never really understood when it should've been called and when not. This PR removes the function and loads the module children automatically on the first access instead. r? @eddyb

view details

push time in 6 months

more