📚 Community guides for open source creators
intermezzOS/kernel 1172
A hobby operating system, in Rust
Native Ruby extensions written in Rust
ashleygwilliams/breakfast-repo 372
a collection of videos, recordings, and podcasts to accompany our morning coffee
A simple library to set request locale based on a hierarchy of factors
judofyr/timeless 120
A mixture of a blog, wiki and CMS, inspired by Christoffer Sawicki's Termos and James Adam's Vanilla.rb
Help me help you!
Are the contents of two directories different?
rust-dev-tools/dev-tools-team 35
resources for the Rust dev-tools team
qrush/shp 28
A new UI for git. This doesn't work yet.
issue commentrust-lang/rust
No way to extract flags arguments from unix::OpenOptionsExt
Triage: it's been a bit over a year. I too would be surprised by this. I wonder what @rust-lang/libs thinks.
comment created time in an hour
issue commentrust-lang/rust
Triage: no idea what the current status of this is, to be honest. I imagine that this was never suggested upstream.
comment created time in 3 days
push eventsteveklabnik/TwitterDelete
commit sha 9eb76b28cd298a2e71c95801b3eb09fab5fe0b4f
Merge pull request #70 from MikeMcQuaid/dependabot/bundler/ffi-1.13.0
commit sha a9c37fa7791233c831b0dca87ebfb6d3fe86134b
Bump ffi from 1.13.0 to 1.13.1 Bumps [ffi](https://github.com/ffi/ffi) from 1.13.0 to 1.13.1. - [Release notes](https://github.com/ffi/ffi/releases) - [Changelog](https://github.com/ffi/ffi/blob/master/CHANGELOG.md) - [Commits](https://github.com/ffi/ffi/compare/1.13.0...1.13.1) Signed-off-by: dependabot-preview[bot] <[email protected]>
commit sha 61702c421c12de113dbbb93ea2b057e0408c8681
Merge pull request #71 from MikeMcQuaid/dependabot/bundler/ffi-1.13.1
commit sha f053caaad88cf36d26337d2bfb8a1acc25d5b8d4
Add scheduled workflow This allows automatic deletion of tweets. Also: - update Ruby version in workflows - cleanup README - note how to use workflow in README - add TWITTER_DAYS to make workflow more generic
commit sha 165dd9c955259a4e2e704a466aefcd6ebbc73337
Merge pull request #72 from MikeMcQuaid/scheduled Add scheduled workflow
commit sha 9f1cdd911dc8246909380898d56019bb73495a96
Bump dotenv from 2.7.5 to 2.7.6 Bumps [dotenv](https://github.com/bkeepers/dotenv) from 2.7.5 to 2.7.6. - [Release notes](https://github.com/bkeepers/dotenv/releases) - [Changelog](https://github.com/bkeepers/dotenv/blob/master/Changelog.md) - [Commits](https://github.com/bkeepers/dotenv/compare/v2.7.5...v2.7.6) Signed-off-by: dependabot-preview[bot] <[email protected]>
commit sha e7d9d6ac98b486b6523530fc92f743c763e59fd9
Merge pull request #74 from MikeMcQuaid/dependabot/bundler/dotenv-2.7.6 Bump dotenv from 2.7.5 to 2.7.6
commit sha b6cf295c22b6c2c33cc2e305d604862d7e84bcf3
Bump public_suffix from 4.0.5 to 4.0.6 Bumps [public_suffix](https://github.com/weppos/publicsuffix-ruby) from 4.0.5 to 4.0.6. - [Release notes](https://github.com/weppos/publicsuffix-ruby/releases) - [Changelog](https://github.com/weppos/publicsuffix-ruby/blob/master/CHANGELOG.md) - [Commits](https://github.com/weppos/publicsuffix-ruby/compare/v4.0.5...v4.0.6) Signed-off-by: dependabot-preview[bot] <[email protected]>
commit sha acfd634e86bdec2fc576171dc7ac8f959629fc4f
Merge pull request #75 from MikeMcQuaid/dependabot/bundler/public_suffix-4.0.6
commit sha 866eebfb86b4f78b41bfe754b06215bdd513ed6a
remove --force in CI so i can see what this would do
commit sha c1abe9f5fdb93dc994875c3a192556cac098cc70
rename task so that I can see CI run
commit sha f9e904cef724a37dd45e8565f9c43e970d259d7f
test running schedule
commit sha c42101c470e21aa055a0a50bf76a41c23adac5dc
run every day this won't actually delete stuff just yet
commit sha d6ad54b089e634bc048b33431453759ca83242e6
actually delete tweets here we go
commit sha beed20ce58af790a017f02034e694bd433806c05
get rid of more tweets
commit sha 03746589edd6535897a14119e4f77ce77308e50a
undo that it didn't actually work
commit sha 087ca5871e6ae7e7c7e6cd19e96e2fff67e102c2
lets try that again
commit sha b4e70a326f53fd50db1141c4f7ff1d73bc89ff7c
be more aggressive with RTs and likes
push time in 3 days
push eventsteveklabnik/TwitterDelete
commit sha c90f7b2a0a9a41a6191e3d4f3c1cf853c321ad27
Bump ffi from 1.13.0 to 1.13.1 Bumps [ffi](https://github.com/ffi/ffi) from 1.13.0 to 1.13.1. - [Release notes](https://github.com/ffi/ffi/releases) - [Changelog](https://github.com/ffi/ffi/blob/master/CHANGELOG.md) - [Commits](https://github.com/ffi/ffi/compare/1.13.0...1.13.1) Signed-off-by: dependabot-preview[bot] <[email protected]>
commit sha d05eebd32df00389e0166533c8ab51ab66d20693
Add scheduled workflow This allows automatic deletion of tweets. Also: - update Ruby version in workflows - cleanup README - note how to use workflow in README - add TWITTER_DAYS to make workflow more generic
commit sha b7503dc9d4b284273b1d53b98390818cd6dbe79d
Bump dotenv from 2.7.5 to 2.7.6 Bumps [dotenv](https://github.com/bkeepers/dotenv) from 2.7.5 to 2.7.6. - [Release notes](https://github.com/bkeepers/dotenv/releases) - [Changelog](https://github.com/bkeepers/dotenv/blob/master/Changelog.md) - [Commits](https://github.com/bkeepers/dotenv/compare/v2.7.5...v2.7.6) Signed-off-by: dependabot-preview[bot] <[email protected]>
commit sha 5b432a022b647874ccfd5720bf4d4efa0054e87a
Bump public_suffix from 4.0.5 to 4.0.6 Bumps [public_suffix](https://github.com/weppos/publicsuffix-ruby) from 4.0.5 to 4.0.6. - [Release notes](https://github.com/weppos/publicsuffix-ruby/releases) - [Changelog](https://github.com/weppos/publicsuffix-ruby/blob/master/CHANGELOG.md) - [Commits](https://github.com/weppos/publicsuffix-ruby/compare/v4.0.5...v4.0.6) Signed-off-by: dependabot-preview[bot] <[email protected]>
commit sha a78c6006d411614199920442db6b6705837e8de5
remove --force in CI so i can see what this would do
commit sha c07b3611d438a14f79f2686df001a13a3abbc40a
rename task so that I can see CI run
commit sha 3350a67d4bed11acce0039a37802b8586c35a0bf
test running schedule
commit sha 1c0f68728415b8f252786d2f979b96b97a85ab0f
run every day this won't actually delete stuff just yet
commit sha 0c971895a988bf8a6c5f4d4f58520ebdca1a6fb7
actually delete tweets here we go
commit sha f773990c4e6165b94f582eef77a9b827b9f353de
get rid of more tweets
commit sha 1ea9f04a3f2cf6129be6c4d9bd0312a4ff901347
undo that it didn't actually work
commit sha 27f4b362676676dd0d7d5e83454001ad72225d21
lets try that again
commit sha 17a1960b5d4d99ad502872cb89305d6ea963e575
be more aggressive with RTs and likes
push time in 3 days
push eventsteveklabnik/TwitterDelete
commit sha 9f1cdd911dc8246909380898d56019bb73495a96
Bump dotenv from 2.7.5 to 2.7.6 Bumps [dotenv](https://github.com/bkeepers/dotenv) from 2.7.5 to 2.7.6. - [Release notes](https://github.com/bkeepers/dotenv/releases) - [Changelog](https://github.com/bkeepers/dotenv/blob/master/Changelog.md) - [Commits](https://github.com/bkeepers/dotenv/compare/v2.7.5...v2.7.6) Signed-off-by: dependabot-preview[bot] <[email protected]>
commit sha e7d9d6ac98b486b6523530fc92f743c763e59fd9
Merge pull request #74 from MikeMcQuaid/dependabot/bundler/dotenv-2.7.6 Bump dotenv from 2.7.5 to 2.7.6
commit sha b6cf295c22b6c2c33cc2e305d604862d7e84bcf3
Bump public_suffix from 4.0.5 to 4.0.6 Bumps [public_suffix](https://github.com/weppos/publicsuffix-ruby) from 4.0.5 to 4.0.6. - [Release notes](https://github.com/weppos/publicsuffix-ruby/releases) - [Changelog](https://github.com/weppos/publicsuffix-ruby/blob/master/CHANGELOG.md) - [Commits](https://github.com/weppos/publicsuffix-ruby/compare/v4.0.5...v4.0.6) Signed-off-by: dependabot-preview[bot] <[email protected]>
commit sha acfd634e86bdec2fc576171dc7ac8f959629fc4f
Merge pull request #75 from MikeMcQuaid/dependabot/bundler/public_suffix-4.0.6
commit sha 670628d01cdcbc9cb74b4982376fb51a0970cbc0
Merge pull request #1 from MikeMcQuaid/master pulling in upstream
push time in 3 days
push eventsteveklabnik/TwitterDelete
commit sha 072dbf4807fed7d08131d33ceb09d83b670d440d
Scan entire timeline Due to the integer math for determining the number of timeline pages to check, the last page (with the oldest) tweets would normally be missed. For example: 743 tweet. Max 250 per page. 743 / 250 = 2 What we want, though is 3. This commit changes MAX_TWEETS_PER_PAGE to 250.0 from 250. Now, 743 / 250.0 = 2.972 We then call `ceil` on it to round up to the next highest integer, 3.0 and correctly check all pages.
push time in 3 days
push eventsteveklabnik/TwitterDelete
commit sha 7c3f17c688b6df940407bf1ac9f768e797954061
be more aggressive with RTs and likes
push time in 3 days
push eventsteveklabnik/TwitterDelete
commit sha b955aa98adaa0df9f66db9715fcd22d24d71c38e
lets try that again
push time in 3 days
push eventsteveklabnik/TwitterDelete
commit sha 2812890bad204e69f674964e75a206f9afe667f4
undo that it didn't actually work
push time in 3 days
push eventsteveklabnik/TwitterDelete
commit sha 6b7b34c0b2f9fb539d862e87516af0c16d582956
get rid of more tweets
push time in 3 days
push eventsteveklabnik/semver
commit sha 38ece8eae56bc20c16f6c59b29ad19c786305c56
Update README to reflect latest published version
commit sha 051c39c50d565c597be65c4496597c7d16a514d9
Merge pull request #215 from frewsxcv/patch-1 Update README to reflect latest published version
push time in 3 days
push eventsteveklabnik/request_store
commit sha 46461a25665cc77f1424cb179cd8a80b0eb81ee3
GitHub is HTTPS by default
commit sha 9326888c1d814cf1d669f9e339d139234ee79e88
Merge pull request #74 from amatsuda/https GitHub is HTTPS by default
push time in 3 days
PR merged steveklabnik/request_store
This reduces unnecessary redirection from http://... to https://... when someone visits this gem's homepage via https://rubygems.org/gems/request_store or some tools or APIs that use the gem's metadata.
pr closed time in 3 days
issue commentrust-lang/rust
CI: We should be able to complete a build in 3 hours even without Docker image cache
Triage: Over two years later, I am not sure if this ticket is still relevant, given the amount of changes we've undergone. Maybe it is, maybe it isn't.
comment created time in 4 days
push eventsteveklabnik/semver
commit sha 2748f5cba2ce9c1cab13b0d07fd7a36cf0f3029d
semver 0.11.0 Big thanks to @mikrostew and @hone for making this happen. <3
push time in 4 days
push eventsteveklabnik/semver
commit sha 553571943f44bb091db11baf03e37419f769a6cf
depend on actual semver-parser 0.10.0
push time in 4 days
pull request commentsteveklabnik/semver
(Going to push a commit to un-patch semver-parser after this. Thanks for all the work, @hone <3)
comment created time in 4 days
push eventsteveklabnik/semver
commit sha 05b003e08b198356b4fed3ed606684eff1dad0f6
update logic and tests, this simplifies things a bit
commit sha 548df2f61136bc8281741c9f9f0251528800cf36
fix formatting, and don't need Option internally
commit sha 57f3069b7e0af82a550eb91101a2f021c7ceaece
added hyphen support in pre section for semver-parser
commit sha 03e65b7c9688882d9f6dedde9a0a66df5e428e3a
add compatible versionreq parsing and formatting for Node
commit sha 3c0a9cd03390a0cf6ba9748ac727f982ed27f432
export Compat from the root
commit sha 5e87530d55cf92c33df15899354cecb736b621c0
fix tests and formatting to comply with #196
commit sha e1d9386075c2bbb624feba5f851ae48d63b9c9d9
use semver-parser 0.10.0 (from github for now)
commit sha d96044a1f51ccc6ae20982387c796d59305b9bd7
cargo fmt
commit sha d7d9605cdd3b2198083f07acbd869e9202cd8a35
cargo clippy
commit sha 204f1ce3b6585ef03fdf9674c1312e5d52f96faa
turn on issue 88 test
commit sha 66a84dd05cc3402f4b7e6a27504b24ed5b01b415
add tests and link issues for NPM compatible version ranges See https://github.com/steveklabnik/semver/issues/58 for more info.
commit sha e7043d2973a7684fd55727e99ad65e6372a7725a
VersionReq parses as '*' now, so remove this deprecation. See discussion here: https://github.com/steveklabnik/semver/pull/209#discussion_r459465532
commit sha 9efc6025bd787512a8e25bc98089ca3208c148a8
add VersionReq::parse_compat example
commit sha dd8ed4b0ce5e277d4e7705c7fe5849962a18c5cf
use semver-parser fork so tests pass for now
commit sha 439bfe85822c2599d67f9b9baf207510524b84fc
rename `Compat::Node` to `Compat::Npm` Technically these are associated with the tools, not the languages. https://github.com/steveklabnik/semver/pull/209#issuecomment-690855508
commit sha a3a3d264d03856445b21edb6447d07815558cbb1
Merge pull request #209 from hone/new-parser semver-parser 0.10.0
push time in 4 days
PR merged steveklabnik/semver
This combines the changes from mikrostew/semver@new-parser and the current master branch which makes it compatible with semver-parser 0.10.0 that hasn't quite been released. In order for the tests pass, it patches the semver-parser dependency to use GitHub.
Tracking Items Left:
- [x] #58
- [x] fix test for #88
- [x] Merge steveklabnik/semver-parser#47
- [x] Remove deprecation for
VersionReq::any()as'*' - [x]
VersionReq::parse_compatdoc example - [x] Rename
Compat::NodetoCompat::Npm - [x] Release
0.10.0ofsemver-parsercrate - [ ] Unpatch
semver-parserinCargo.toml
pr closed time in 4 days
PR closed steveklabnik/semver-parser
I'm optionally parsing parts of a version using the Parser, but it seems the pre function was not public.
Edit: Also plus_build_metadata
pr closed time in 4 days
pull request commentsteveklabnik/semver-parser
Since you said you don't need this, @dsherret , I'm going to close. If you do, just let me know and I'm happy to put it in, but without a need, let's keep the surface area smaller. Thanks!
comment created time in 4 days
issue commentrust-lang/rust
Move the doc directory to separate repo
@petrochenkov @tmandry I don't know a ton about subtree, but would be interested in hearing more about it; maybe there's some examples of how it's worked or you could ping me on zulip? that does sound like the best of both worlds, but I didn't realize it was possible.
comment created time in 5 days
pull request commentrust-lang/rust
make exp_m1 and ln_1p examples more representative of use
Honestly, I never use these functions so I have no idea if this is an improvement or not.
comment created time in 5 days
issue openedsemver/semver
prerelease example in the spec has an invalid dash
https://semver.org/#spec-item-9
1.0.0-x-y-z.–. has a dash that's not a hyphen as the last example, which is not actually allowed by teh spec.
created time in 6 days
issue commentrust-lang/rust
Move the doc directory to separate repo
This has gone back and forth historically; there are pros and cons of each approach. When the docs were in the repo, people were concerned about bors queue length. So we moved them out, but that made coordinated changes difficult.
Any changes here would involve changing the build + deployment story, so @rust-lang/release should be at least consulted if there's a decision to change any of this.
comment created time in 6 days
pull request commentrust-lang/rfcs
Hey everyone,
So, Niko has pushed a few updates to the RFC. We’re making a few changes, and we think this will land things in a good place. We’re going to do a 2021 edition, and do it on the three year pace, but cut some scope that will hopefully help with the “confusion” concern. Namely, the edition guide will be cut back to purely the migration changes. We’ll still talk about major features in the related blog post, but clearly separating them from the specific migrations. With those changes in place, we intend to move to FCP in the near future; please review the last few commits. Thank you!
comment created time in 6 days
issue commentrust-lang/rust
ABI code generates oversize loads when returning with a cast
Triage: don't have a good way to test this out, since I don't really know anything about sparc64.
comment created time in 7 days
Pull request review commentrust-lang/rust
Add exploit mitigations chapter to the rustc book
+# Exploit Mitigations++## Introduction++The Rust programming language provides memory[1] and thread[2] safety+guarantees via its ownership[3], references and borrowing[4], and slice+types[5] features. However, Unsafe Rust[6] disables some of these features+by introducing unsafe blocks, unsafe functions and methods, unsafe traits,+and new types that are not subject to the borrowing rules.
yes, framing unsafe rust as "disabling" is common, but a bit backwards: unsafe rust is a superset of safe Rust. It enables new unchecked things, it does not turn off existing checks.
comment created time in 7 days
push eventsteveklabnik/im-rs
commit sha b0dc7a50e27efe5de91f663f08badae8e22f6772
Update src/vector/mod.rs Co-authored-by: Joshua Nelson <[email protected]>
push time in 7 days
pull request commentrust-lang/book
ch15/drop: update output for E0040
This PR is fine but given the discussion in https://github.com/rust-lang/book/issues/2459 I'm going to hold off merging until I investigate which versions this applies to.
comment created time in 7 days
issue commentrust-lang/book
A policy is required regarding rust toolchain and error messages
The book should use the version of rust listed in https://github.com/rust-lang/book/blob/master/rust-toolchain
Which is currently 1.41.
Yes, I made a mistake there, I didn't realize it had changed between versions.
Fixing that bug should probably be "update everything to the latest Rust" rather than reverting, though.
comment created time in 7 days
Pull request review commentrust-lang/rust
Add exploit mitigations chapter to the rustc book
+# Exploit Mitigations++## Introduction++The Rust programming language provides memory[1] and thread[2] safety+guarantees via its ownership[3], references and borrowing[4], and slice+types[5] features. However, Unsafe Rust[6] disables some of these features+by introducing unsafe blocks, unsafe functions and methods, unsafe traits,+and new types that are not subject to the borrowing rules.++Parts of the Rust standard library are implemented as safe abstractions over+unsafe code (and historically have been vulnerable to memory corruption[7]).+Furthermore, the Rust code and documentation encourage creating safe+abstractions over unsafe code. This can cause a false sense of security if+unsafe code is not properly reviewed and tested.++Unsafe Rust disables some of the features that provide memory and thread+safety guarantees. This causes programs or libraries to be susceptible to+memory corruption (CWE-119)[8] and concurrency issues (CWE-557)[9]. Modern C+and C++ compilers provide exploit mitigations to increase the difficulty to+exploit vulnerabilities resulting from these issues. Therefore, the Rust+compiler must also support these exploit mitigations in order to mitigate+vulnerabilities resulting from the use of Unsafe Rust. This chapter is going+to document these exploit mitigations and how they apply to Rust.+++## Exploit mitigations++This section documents the exploit mitigations applicable to the Rust+compiler when building programs for the Linux operating system on the AMD64+architecture and equivalent.<sup id="fnref:1" role="doc-noteref"><a+href="#fn:1" class="footnote">1</a></sup> All examples in this section were+built using the Rust compiler version 1.40.0 (2019-12-19) on Debian testing+(Bullseye).++The Rust Programming Language currently has no specification. The Rust+compiler (i.e., rustc) is the language reference implementation. All+references to “the Rust compiler” in this document refer to the language+reference implementation.++Table I \+Summary of exploit mitigations supported by the Rust compiler when building+programs for the Linux operating system on the AMD64 architecture and+equivalent.+<table class="table">+ <tr>+ <td><strong>Exploit mitigation</strong>+ </td>+ <td><strong>Supported and enabled by default</strong>+ </td>+ <td><strong>Since</strong>+ </td>+ </tr>+ <tr>+ <td>Position-independent executable+ </td>+ <td>Yes+ </td>+ <td>0.12.0 (2014-10-09)+ </td>+ </tr>+ <tr>+ <td>Integer overflow checks+ </td>+ <td>Supported but enabled by default when debug assertions are enabled only.+ </td>+ <td>1.1.0 (2015-06-25)+ </td>+ </tr>+ <tr>+ <td>Non-executable memory regions+ </td>+ <td>Yes+ </td>+ <td>1.8.0 (2016-04-14)+ </td>+ </tr>+ <tr>+ <td>Stack clashing protection+ </td>+ <td>Yes+ </td>+ <td>1.20.0 (2017-08-31)+ </td>+ </tr>+ <tr>+ <td>Read-only relocations and immediate binding+ </td>+ <td>Yes+ </td>+ <td>1.21.0 (2017-10-12)+ </td>+ </tr>+ <tr>+ <td>Heap corruption protection+ </td>+ <td>Yes+ </td>+ <td>1.32.0 (2019-01-17) via OS default or specified allocator+ </td>+ </tr>+ <tr>+ <td>Stack smashing protection+ </td>+ <td>No+ </td>+ <td>+ </td>+ </tr>+ <tr>+ <td>Forward-edge control flow protection+ </td>+ <td>No+ </td>+ <td>+ </td>+ </tr>+ <tr>+ <td>Backward-edge control flow protection (e.g., shadow and safe stack)+ </td>+ <td>No+ </td>+ <td>+ </td>+ </tr>+</table>++<small id="fn:1">1\. See+<https://github.com/rust-lang/rust/tree/master/compiler/rustc_target/src/spec>+for a list of targets and their default options. <a href="#fnref:1"+class="reversefootnote" role="doc-backlink">↩</a></small>+++### Position-independent executable++Position-independent executable increases the difficulty of the use of code+reuse exploitation techniques, such as return-oriented programming (ROP) and+variants, by generating position-independent code for the executable, and+instructing the dynamic linker to load it similarly to a shared object at a+random load address, thus also benefiting from address-space layout+randomization (ASLR). This is also referred to as “full ASLR”.++The Rust compiler supports position-independent executable and enables it by+default since version 0.12.0 (2014-10-09)[10]–[13].++```+$ readelf -h target/release/hello-rust | grep Type:+ Type: DYN (Shared object file)+```+Fig. 1. Checking if an executable is a position-independent executable.++An executable with an object type of `ET_DYN` (i.e., shared object) and not+`ET_EXEC` (i.e., executable) is a position-independent executable (see Fig.+1).+++### Integer overflow checks++Integer overflow checks protects programs from undefined and unintended+behavior (which may cause vulnerabilities) by checking for results of signed+and unsigned integer computations that cannot be represented in their type,+resulting in an overflow or wraparound.++The Rust compiler supports integer overflow checks, and enables it when+debug assertions are enabled since version 1.0.0 (2015-05-15)[14]–[17], but+support for it was not completed until version 1.1.0 (2015-06-25)[16]. An+option to control integer overflow checks was later stabilized in version+1.17.0 (2017-04-27)[18]–[20].
Yes, we don't write docs in that style. That doesn't mean it's not useful to have, it's just not the way that the documentation is organized.
comment created time in 7 days
Pull request review commentrust-lang/rust
Add exploit mitigations chapter to the rustc book
+# Exploit Mitigations++## Introduction++The Rust programming language provides memory[1] and thread[2] safety+guarantees via its ownership[3], references and borrowing[4], and slice+types[5] features. However, Unsafe Rust[6] disables some of these features+by introducing unsafe blocks, unsafe functions and methods, unsafe traits,+and new types that are not subject to the borrowing rules.++Parts of the Rust standard library are implemented as safe abstractions over+unsafe code (and historically have been vulnerable to memory corruption[7]).+Furthermore, the Rust code and documentation encourage creating safe+abstractions over unsafe code. This can cause a false sense of security if+unsafe code is not properly reviewed and tested.++Unsafe Rust disables some of the features that provide memory and thread+safety guarantees. This causes programs or libraries to be susceptible to+memory corruption (CWE-119)[8] and concurrency issues (CWE-557)[9]. Modern C+and C++ compilers provide exploit mitigations to increase the difficulty to+exploit vulnerabilities resulting from these issues. Therefore, the Rust+compiler must also support these exploit mitigations in order to mitigate+vulnerabilities resulting from the use of Unsafe Rust. This chapter is going+to document these exploit mitigations and how they apply to Rust.+++## Exploit mitigations++This section documents the exploit mitigations applicable to the Rust+compiler when building programs for the Linux operating system on the AMD64+architecture and equivalent.<sup id="fnref:1" role="doc-noteref"><a+href="#fn:1" class="footnote">1</a></sup> All examples in this section were+built using the Rust compiler version 1.40.0 (2019-12-19) on Debian testing
Re-running things isn't the issue; it's the wording of the text in the example. It should say something like "an example run" rather than refer to specific dates.
comment created time in 7 days
Pull request review commentrust-lang/rust
Documented From impls in std/sync/mpsc/mod.rs
impl<T: Send> error::Error for TrySendError<T> { #[stable(feature = "mpsc_error_conversions", since = "1.24.0")] impl<T> From<SendError<T>> for TrySendError<T> {+ /// Converts a `SendError<T>` into a `TrySendError<T>`.+ /// This conversion always returns a `TrySendError::Disconnected` containing the data in the `SendError<T>`.
These need a blank /// between the first and second lines, that is, the format is:
/// summary sentence
///
/// other paragraphs
comment created time in 7 days
Pull request review commentrust-lang/rust
Documented From impls in std/sync/mpsc/mod.rs
impl<T: Send> error::Error for TrySendError<T> { #[stable(feature = "mpsc_error_conversions", since = "1.24.0")] impl<T> From<SendError<T>> for TrySendError<T> {+ /// Converts a `SendError<T>` into a `TrySendError<T>`.+ /// This conversion always returns a `TrySendError::Disconnected` containing the data in the `SendError<T>`.
Also, given that the two sentences of docs here feel disconnected, I would expect these to be formatted as
/// Converts...
///
/// This conversion...
///
/// No data ...
comment created time in 7 days
issue commentrust-lang/book
Script to lint for copypasta'd file paths that should be generic
@angelhen2020 @rogers0404 @MrVirm hi, this issue is closed because the bug was already fixed. It also seems like you're looking for a general "how to get involved on github", but that's not what we do here, we're working on this specific project, which doesn't take a lot of external contribution.
comment created time in 7 days
issue commentrust-lang/rust
`std::env::temp_dir` should return env var XDG_RUNTIME_DIR under Linux if declared
Triage: no change https://github.com/rust-lang/rust/blob/45f638bd8620592b7c50e9b483c2aa8ef9715f5d/library/std/src/sys/unix/os.rs#L556
comment created time in 7 days
PR opened bodil/im-rs
Reported on the rust discord:

I am not 100% sure this works but I think so?
pr created time in 9 days
push eventsteveklabnik/im-rs
commit sha 8e2b65d5e464c68c900b1639b1980e522bba1491
Fix hidden attribute
push time in 9 days
issue commentrust-lang/rust
Compiler error message is confusing
Triage: this really needs some way to reproduce.
comment created time in 10 days
issue commentrust-lang/rust
ReSkolemized can leak into error messages
Triage: this FIXME is still here https://github.com/rust-lang/rust/blob/41dc3942eb33e8e882b6e4782a9bd9d2b8970647/compiler/rustc_infer/src/infer/error_reporting/mod.rs#L103-L110
comment created time in 10 days
Pull request review commentrust-lang/rust
Add exploit mitigations chapter to the rustc book
+# Exploit Mitigations++## Introduction++The Rust programming language provides memory[1] and thread[2] safety+guarantees via its ownership[3], references and borrowing[4], and slice+types[5] features. However, Unsafe Rust[6] disables some of these features+by introducing unsafe blocks, unsafe functions and methods, unsafe traits,+and new types that are not subject to the borrowing rules.++Parts of the Rust standard library are implemented as safe abstractions over+unsafe code (and historically have been vulnerable to memory corruption[7]).+Furthermore, the Rust code and documentation encourage creating safe+abstractions over unsafe code. This can cause a false sense of security if+unsafe code is not properly reviewed and tested.++Unsafe Rust disables some of the features that provide memory and thread+safety guarantees. This causes programs or libraries to be susceptible to+memory corruption (CWE-119)[8] and concurrency issues (CWE-557)[9]. Modern C+and C++ compilers provide exploit mitigations to increase the difficulty to+exploit vulnerabilities resulting from these issues. Therefore, the Rust+compiler must also support these exploit mitigations in order to mitigate+vulnerabilities resulting from the use of Unsafe Rust. This chapter is going+to document these exploit mitigations and how they apply to Rust.+++## Exploit mitigations++This section documents the exploit mitigations applicable to the Rust+compiler when building programs for the Linux operating system on the AMD64+architecture and equivalent.<sup id="fnref:1" role="doc-noteref"><a+href="#fn:1" class="footnote">1</a></sup> All examples in this section were+built using the Rust compiler version 1.40.0 (2019-12-19) on Debian testing
Yes, agreed 100%.
comment created time in 10 days
Pull request review commentrust-lang/rust
Add exploit mitigations chapter to the rustc book
+# Exploit Mitigations++## Introduction++The Rust programming language provides memory[1] and thread[2] safety+guarantees via its ownership[3], references and borrowing[4], and slice+types[5] features. However, Unsafe Rust[6] disables some of these features+by introducing unsafe blocks, unsafe functions and methods, unsafe traits,+and new types that are not subject to the borrowing rules.++Parts of the Rust standard library are implemented as safe abstractions over+unsafe code (and historically have been vulnerable to memory corruption[7]).+Furthermore, the Rust code and documentation encourage creating safe+abstractions over unsafe code. This can cause a false sense of security if+unsafe code is not properly reviewed and tested.++Unsafe Rust disables some of the features that provide memory and thread+safety guarantees. This causes programs or libraries to be susceptible to+memory corruption (CWE-119)[8] and concurrency issues (CWE-557)[9]. Modern C+and C++ compilers provide exploit mitigations to increase the difficulty to+exploit vulnerabilities resulting from these issues. Therefore, the Rust+compiler must also support these exploit mitigations in order to mitigate+vulnerabilities resulting from the use of Unsafe Rust. This chapter is going+to document these exploit mitigations and how they apply to Rust.+++## Exploit mitigations++This section documents the exploit mitigations applicable to the Rust+compiler when building programs for the Linux operating system on the AMD64+architecture and equivalent.<sup id="fnref:1" role="doc-noteref"><a+href="#fn:1" class="footnote">1</a></sup> All examples in this section were+built using the Rust compiler version 1.40.0 (2019-12-19) on Debian testing+(Bullseye).++The Rust Programming Language currently has no specification. The Rust+compiler (i.e., rustc) is the language reference implementation. All+references to “the Rust compiler” in this document refer to the language+reference implementation.++Table I \+Summary of exploit mitigations supported by the Rust compiler when building+programs for the Linux operating system on the AMD64 architecture and+equivalent.+<table class="table">+ <tr>+ <td><strong>Exploit mitigation</strong>+ </td>+ <td><strong>Supported and enabled by default</strong>+ </td>+ <td><strong>Since</strong>+ </td>+ </tr>+ <tr>+ <td>Position-independent executable+ </td>+ <td>Yes+ </td>+ <td>0.12.0 (2014-10-09)+ </td>+ </tr>+ <tr>+ <td>Integer overflow checks+ </td>+ <td>Supported but enabled by default when debug assertions are enabled only.+ </td>+ <td>1.1.0 (2015-06-25)+ </td>+ </tr>+ <tr>+ <td>Non-executable memory regions+ </td>+ <td>Yes+ </td>+ <td>1.8.0 (2016-04-14)+ </td>+ </tr>+ <tr>+ <td>Stack clashing protection+ </td>+ <td>Yes+ </td>+ <td>1.20.0 (2017-08-31)+ </td>+ </tr>+ <tr>+ <td>Read-only relocations and immediate binding+ </td>+ <td>Yes+ </td>+ <td>1.21.0 (2017-10-12)+ </td>+ </tr>+ <tr>+ <td>Heap corruption protection+ </td>+ <td>Yes+ </td>+ <td>1.32.0 (2019-01-17) via OS default or specified allocator+ </td>+ </tr>+ <tr>+ <td>Stack smashing protection+ </td>+ <td>No+ </td>+ <td>+ </td>+ </tr>+ <tr>+ <td>Forward-edge control flow protection+ </td>+ <td>No+ </td>+ <td>+ </td>+ </tr>+ <tr>+ <td>Backward-edge control flow protection (e.g., shadow and safe stack)+ </td>+ <td>No+ </td>+ <td>+ </td>+ </tr>+</table>++<small id="fn:1">1\. See+<https://github.com/rust-lang/rust/tree/master/compiler/rustc_target/src/spec>+for a list of targets and their default options. <a href="#fnref:1"+class="reversefootnote" role="doc-backlink">↩</a></small>+++### Position-independent executable++Position-independent executable increases the difficulty of the use of code+reuse exploitation techniques, such as return-oriented programming (ROP) and+variants, by generating position-independent code for the executable, and+instructing the dynamic linker to load it similarly to a shared object at a+random load address, thus also benefiting from address-space layout+randomization (ASLR). This is also referred to as “full ASLR”.++The Rust compiler supports position-independent executable and enables it by+default since version 0.12.0 (2014-10-09)[10]–[13].++```+$ readelf -h target/release/hello-rust | grep Type:+ Type: DYN (Shared object file)+```+Fig. 1. Checking if an executable is a position-independent executable.++An executable with an object type of `ET_DYN` (i.e., shared object) and not+`ET_EXEC` (i.e., executable) is a position-independent executable (see Fig.+1).+++### Integer overflow checks++Integer overflow checks protects programs from undefined and unintended+behavior (which may cause vulnerabilities) by checking for results of signed+and unsigned integer computations that cannot be represented in their type,+resulting in an overflow or wraparound.++The Rust compiler supports integer overflow checks, and enables it when+debug assertions are enabled since version 1.0.0 (2015-05-15)[14]–[17], but+support for it was not completed until version 1.1.0 (2015-06-25)[16]. An+option to control integer overflow checks was later stabilized in version+1.17.0 (2017-04-27)[18]–[20].
Yes, in general, all docs are written "in the present", and we don't include specific version numbers.
comment created time in 10 days
pull request commentrust-lang/rust
Revamp rustdoc docs about documentation using `cfg`
Hmm, you're right that doc(cfg) is unstable, but it seems like it should go near the section on cfg(doc) since they're often used together. Maybe I could say in advanced-features that doc(cfg) is unstable and have a short paragraph linking there from unstable-features?
Traditionally, we keep a very clean separation here; we only talk about stable things in stable docs, and unstable things in unstable docs.
However, I think the rustdoc team should document its tool the way it wants to, and this is an odd case. I'm fine with this either way.
comment created time in 10 days
pull request commentrust-lang/rust
You could also just not refactor
Documenting platform-specific or feature-specific information
comment created time in 11 days
issue commentrust-lang/rust
Is Rust help too eager, especially in cases of low confidence
It might be worth discussing if the Rust system is being too eager to offer help, especially in cases where its "confidence level" is low.
Discussions are better served on internals.rust-lang.org than the issue tracker; that being said, this specific scenario might be considered a bug, so I'll leave this open for now.
comment created time in 11 days
issue commentrust-lang/core-team
Clarify the Rust compiler's licensing status
no updates
comment created time in 12 days
issue commentrust-lang/core-team
Need a better email answering solution
No updates, as the people involved were not in attendance.
comment created time in 12 days
issue commentrust-lang/core-team
We talked async a bit, but didn't find a common time to chat yet. Soon!
comment created time in 12 days
issue commentrust-lang/core-team
Consider pulling the Citizen Code of Conduct (partially) to a rust-lang repository
No updates this week.
comment created time in 12 days
issue commentrust-lang/book
Chapter 14.3 wrong use of add_one as a crate.
So, one of these is wrong, and one is right. The first one is right; when referring to the name in code, it's add_one::add_one. But the package name is add-one. This is because add-one isn't a valid identifier, so rust/cargo will turn - into _ in your code.
comment created time in 12 days
push eventsteveklabnik/livestream
commit sha e8ec1cb40a9eb241e5411fe2eca47f457ad81b10
fix the build with the std feature turned on
commit sha 8c6822787b3e02b9540cb6d4acb7058da1e424d6
Operation implements Debug
commit sha 7c649724ab4f52a4da2997a7851120b5be7f000d
Fix bug around wildcard operations
commit sha 6b745f3aa37cfcaea9183b1e66ddaeeea7c33089
greater than and less than
commit sha 108c35bdab30364ccb81a50301cdfeb2bb8ba447
gte and lte
push time in 13 days
issue closedrust-lang/rust
Automatic dereferencing doesn't occur on std::ops::* traits
use std::ops::Add;
#[derive(Copy, Clone)]
struct Wrapper(i8);
// Only defining one implementation of Add for Wrapper,
// with the assumption that automatic dereferencing will handle
// (&a, b), (a, &b), and (&a, &b)
impl Add for Wrapper {
type Output = Self;
fn add(self, other: Self) -> Self::Output {
Wrapper(self.0 + other.0)
}
}
// This will fail, however.
// <anon>:29:31: 29:35 error: binary operation `+` cannot be applied to type `&Wrapper` [E0369]
// <anon>:29 println!("&a + b: {}\n", (refa + b).0);
/*
fn std_add_wrappers() {
println!("Wrapper's std::ops::add");
let a: Wrapper = Wrapper(1);
let b: Wrapper = Wrapper(2);
println!("a + b: {}", (a + b).0);
let refa = &a;
println!("&a + b: {}\n", (refa + b).0);
}
*/
// This succeeds, since std::ops::Add's parameters for i8 are explicitly
// implemented for (a, b), (&a, b), (a, &b), and (&a, &b),
// according to stdlib docs
// https://doc.rust-lang.org/core/ops/trait.Add.html
fn std_add_integers() {
println!("i8's std::ops::add");
let a: i8 = 1;
let b: i8 = 2;
println!("a + b: {}", a + b);
let refa = &a;
println!("&a + b: {}\n", refa + b);
}
// So lets define our own add functionality,
// as the good lord who created asm intended
trait DIYAdd<RHS=Self> {
type Output;
fn diy_add(self, other: RHS) -> Self::Output;
}
// Only one definition is required, and automatic
// dereferencing handles the rest
impl DIYAdd for Wrapper {
type Output = Self;
fn diy_add(self, other: Self) -> Self::Output {
Wrapper(self.0 + other.0)
}
}
fn diy_add_wrappers() {
println!("Wrapper's diy_add");
let a: Wrapper = Wrapper(1);
let b: Wrapper = Wrapper(2);
println!("a.diy_add(b): {}", (a.diy_add(b)).0);
let refa = &a;
println!("&a.diy_add(b): {}\n", (refa.diy_add(b)).0);
}
fn main() {
std_add_integers();
//std_add_wrappers();
diy_add_wrappers()
}
closed time in 13 days
Kingsqueeissue commentrust-lang/rust
Automatic dereferencing doesn't occur on std::ops::* traits
Yes, it seems that #447672 is tracking this now, so I'm gonna give this a close. If this is in error please re-open!
comment created time in 13 days
pull request commentsteveklabnik/semver-parser
rename `Compat::Node` to `Compat::Npm`
Great, thank you!
comment created time in 13 days
push eventsteveklabnik/semver-parser
commit sha 65d7268f8bdfaa033a1958a00c68f4b48d928a6f
rename `Compat::Node` to `Compat::Npm` Technically these are associated with the tools, not the languages. https://github.com/steveklabnik/semver/pull/209#issuecomment-690855508
commit sha 650f56a93ddd7dbacaf9a823b26ab40054515e1c
Merge pull request #48 from hone/npm-rename rename `Compat::Node` to `Compat::Npm`
push time in 13 days
PR merged steveklabnik/semver-parser
Technically these are associated with the tools, not the languages. https://github.com/steveklabnik/semver/pull/209#issuecomment-690855508
pr closed time in 13 days
push eventsteveklabnik/build-example
commit sha 8a7c3c6ec3232d41335c4357bb9c92d5c3dbf916
add xtask
push time in 13 days
push eventsteveklabnik/build-example
commit sha e91b8a5fd2d7650ce07709871653333dac427ec4
initial commit
push time in 13 days
created repositorysteveklabnik/build-example
https://users.rust-lang.org/t/complex-build-advice/48779
created time in 13 days
issue commentrust-lang/rust
Problem with type inference resolution
Triage: here's the error message today:
error[E0277]: the trait bound `&str: std::convert::From<&std::string::String>` is not satisfied
--> src/main.rs:6:15
|
6 | let str = <&str>::from(&string);
| ^^^^^^^^^^^^ the trait `std::convert::From<&std::string::String>` is not implemented for `&str`
|
= help: the following implementations were found:
<&'t str as std::convert::From<regex::re_unicode::Match<'t>>>
= note: required by `std::convert::From::from`
comment created time in 14 days
issue closedrust-lang/book
Feature: Referred code block on hovering over the reference.

I'm in the mid of learning the rust lang referring to the book.
I felt like when I need to refer to any referenced example code block (10-6 in this case.), I need to scroll up, to the referenced code block.
It'd be better if I hover for some duration I get the referenced code instantly. So that I don't lose the train of thoughts.
closed time in 14 days
akarsh1995issue commentrust-lang/book
Feature: Referred code block on hovering over the reference.
Hi there! Thanks for this issue.
This would have to be a feature of our build tooling, mdbook. Please submit a feature request upstream. Thank you!
comment created time in 14 days
pull request commentrust-lang/blog.rust-lang.org
I really prefer how handlebars is more broadly known than terra, but at the same time, I don't do a ton of work in this codebase, so I don't think that should be a blocker.
comment created time in 14 days
pull request commentrust-lang/rust
Yes. 75.
If I weren't effectively rewriting it I wouldn't have reformatted it. I ran it through rustfmt and it didn't change the line length. Did I miss a style rule ? IME line length is one of the major areas of style dispute so I expected rustfmt to wrap my comment if it disagreed with my preference of 75.
So here's my recollection: the standard rustfmt style is 100, but the standard library uses 80. However, the rustfmt.toml doesn't include a setting here; that may be something they overlooked. Additionally, I think rustfmt only reformats things that are too long, not too short. Which is maybe not ideal, but I don't think it expects people to manually wrap shorter.
@rust-lang/libs should really answer this, I think.
Without the parens, it reads as if this is a third case,
It pretty much is, though. Regardless, it being both its own paragraph and in ()s feels very strange.
comment created time in 14 days
issue commentrust-lang/rust
Implement PartialEq for Ident, PartialEq for TokenStream
Triage: these types do not implement these traits today.
comment created time in 15 days
pull request commentsteveklabnik/semver-parser
I don't have a strong opinion either, honestly. I'd be happy either way.
comment created time in 17 days
issue commentrust-lang/rust
Better error message for 'is private'
Triage:
note: the struct import `A` is defined here...
--> src/main.rs:2:9
|
2 | use bar::A;
| ^^^^^^
note: ...and refers to the struct `A` which is defined here
--> src/main.rs:5:9
|
5 | pub struct A {}
| ^^^^^^^^^^^^ consider importing it directly
is very similar to
(Bonus points for a suggestion that foo::bar::A is public and maybe you meant to use that one.)
comment created time in 17 days
issue commentrust-lang/rust
Long Compile Time (with Optimization) with Large Arrays (2-3 hours)
An update two and a half years later. This includes building dependencies:
❯ rustc +nightly --version -v
rustc 1.48.0-nightly (e2be5f568 2020-09-09)
binary: rustc
commit-hash: e2be5f568d1f60365b825530f5b5cb722460591b
commit-date: 2020-09-09
host: x86_64-pc-windows-msvc
release: 1.48.0-nightly
LLVM version: 11.0
❯ cargo +nightly build
<snip>
Finished dev [unoptimized + debuginfo] target(s) in 8m 42s
❯ cargo +nightly build --release
<snip>
... so actually I think that this got worse. I left it running for the past 8 hours, overnight, and it shows no signs of stopping. THis is on my pretty beefy desktop too.
comment created time in 17 days
push eventsteveklabnik/semver-parser
commit sha a0538ca237169beca9ffdbe5e224b79a9c1197a2
support https://github.com/steveklabnik/semver/issues/88
commit sha 513c4d3162a5a09ba22b8443dd608d3ac5b464d4
Merge pull request #47 from hone/support_issue_88 support https://github.com/steveklabnik/semver/issues/88
push time in 17 days
PR merged steveklabnik/semver-parser
This adds pest parser support for the ignored test in the semver crate new-parser branch.
pr closed time in 17 days
pull request commentsteveklabnik/semver
Yeah it should probably be Compat::Npm. Technically these are associated with the tools, not the languages.
comment created time in 17 days
pull request commentrust-lang/rust
Reword `trivial_casts` lint in rustc book to better explain what it does.
@bors: r+ rollup
thank you!
comment created time in 18 days
Pull request review commentrust-lang/book
Edit description of invalid array access
Running this code using `cargo run` produces the following result: {{#include ../listings/ch03-common-programming-concepts/no-listing-15-invalid-array-access/output.txt}} ``` -The compilation didn’t produce any errors, but the program resulted in a-*runtime* error and didn’t exit successfully. When you attempt to access an-element using indexing, Rust will check that the index you’ve specified is less-than the array length. If the index is greater than or equal to the array-length, Rust will panic.+When the compiler can prove that invalid array access occurs, it will fail to compile.+However, there are some cases where the compilation won't produce any errors, but the+program itself will fail with a *runtime* error and won't exit successfully.++An *runtime*, when you attempt to access an element using indexing, Rust will check that
I think using the * again here isn't needed. Same with the two other uses below.
comment created time in 18 days
issue commentrust-lang/rust
rustdoc options to do case sensitive search
Triage: not aware of any movement here
comment created time in 19 days
