Skip to content

Commit 8442e94

Browse files
committed
update
0 parents  commit 8442e94

129 files changed

Lines changed: 2154 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.mp4 filter=lfs diff=lfs merge=lfs -text
2+
videos/2024-03-26/huawei_and_rust.mp4 filter=lfs diff=lfs merge=lfs -text

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
_site
2+
.bundle
3+
vendor

Gemfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
source "https://rubygems.org"
2+
gem "jekyll", "~> 4.3.1"
3+
4+
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
5+
# and associated library.
6+
platforms :mingw, :x64_mingw, :mswin, :jruby do
7+
gem "tzinfo", ">= 1", "< 3"
8+
gem "tzinfo-data"
9+
end
10+
11+
# Performance-booster for watching directories on Windows
12+
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
13+
14+
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
15+
# do not have a Java counterpart.
16+
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

Gemfile.lock

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
addressable (2.8.1)
5+
public_suffix (>= 2.0.2, < 6.0)
6+
colorator (1.1.0)
7+
concurrent-ruby (1.2.0)
8+
em-websocket (0.5.3)
9+
eventmachine (>= 0.12.9)
10+
http_parser.rb (~> 0)
11+
eventmachine (1.2.7)
12+
ffi (1.15.5)
13+
forwardable-extended (2.6.0)
14+
google-protobuf (3.21.12)
15+
http_parser.rb (0.8.0)
16+
i18n (1.12.0)
17+
concurrent-ruby (~> 1.0)
18+
jekyll (4.3.2)
19+
addressable (~> 2.4)
20+
colorator (~> 1.0)
21+
em-websocket (~> 0.5)
22+
i18n (~> 1.0)
23+
jekyll-sass-converter (>= 2.0, < 4.0)
24+
jekyll-watch (~> 2.0)
25+
kramdown (~> 2.3, >= 2.3.1)
26+
kramdown-parser-gfm (~> 1.0)
27+
liquid (~> 4.0)
28+
mercenary (>= 0.3.6, < 0.5)
29+
pathutil (~> 0.9)
30+
rouge (>= 3.0, < 5.0)
31+
safe_yaml (~> 1.0)
32+
terminal-table (>= 1.8, < 4.0)
33+
webrick (~> 1.7)
34+
jekyll-sass-converter (3.0.0)
35+
sass-embedded (~> 1.54)
36+
jekyll-watch (2.2.1)
37+
listen (~> 3.0)
38+
kramdown (2.4.0)
39+
rexml
40+
kramdown-parser-gfm (1.1.0)
41+
kramdown (~> 2.0)
42+
liquid (4.0.4)
43+
listen (3.8.0)
44+
rb-fsevent (~> 0.10, >= 0.10.3)
45+
rb-inotify (~> 0.9, >= 0.9.10)
46+
mercenary (0.4.0)
47+
pathutil (0.16.2)
48+
forwardable-extended (~> 2.6)
49+
public_suffix (5.0.1)
50+
rake (13.0.6)
51+
rb-fsevent (0.11.2)
52+
rb-inotify (0.10.1)
53+
ffi (~> 1.0)
54+
rexml (3.2.5)
55+
rouge (4.0.1)
56+
safe_yaml (1.0.5)
57+
sass-embedded (1.58.0)
58+
google-protobuf (~> 3.21)
59+
rake (>= 10.0.0)
60+
terminal-table (3.0.2)
61+
unicode-display_width (>= 1.1.1, < 3)
62+
unicode-display_width (2.4.2)
63+
webrick (1.8.1)
64+
65+
PLATFORMS
66+
x64-mingw-ucrt
67+
x86_64-linux
68+
69+
DEPENDENCIES
70+
http_parser.rb (~> 0.6.0)
71+
jekyll (~> 4.3.1)
72+
tzinfo (>= 1, < 3)
73+
tzinfo-data
74+
wdm (~> 0.1.1)
75+
76+
BUNDLED WITH
77+
2.3.5

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Trusted Programming
2+
3+
If you want to run it locally, install it first. Then:
4+
5+
```bash
6+
$ bundle config set --local path 'vendor/bundle'
7+
$ bundle install
8+
```
9+
10+
When it's all done, you can run it locally like this:
11+
12+
```bash
13+
$ bundle exec jekyll serve
14+
```

_config.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
title: Trusted Programming
2+
description: >-
3+
As a leading telecommunications company on a global scale, Huawei is
4+
dedicated to the development of dependable software systems. To achieve this
5+
goal, our team of developers relies heavily on the support provided by Rust
6+
programming language. As a founding member of the Rust Foundation, Huawei is
7+
fully committed to the growth and prosperity of the Rust community. To
8+
demonstrate our commitment, we have created automated tools to transform C code
9+
into a safer Rust code, and are continuously contributing to the improvement
10+
and expansion of Rust's features.
11+
baseurl: ""
12+
url: "https://trusted-programming.github.io"
13+
14+
collections:
15+
contributions:
16+
output: false
17+
projects:
18+
output: false
19+
team:
20+
output: false
21+
research_labs:
22+
output: false

_contributions/async-drop.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Async Drop
3+
area: compiler
4+
status:
5+
label: in-progress
6+
css_class: attention
7+
buttons:
8+
---
9+
Support asynchronous destruction of objects running out of scope:
10+
11+
1. Implement code generation for asynchronous drop
12+
13+
2. Implement prevention measures for running asynchronous drop synchronously
14+
15+
3. Implement type system pre-requisites for (2) if necessary - type system refactoring, linear types
16+
17+
4. Implement any other features in rustc compiler that will help Rust language team to make a decision about including async drop to the language

_contributions/atomic-memcpy.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Atomic memcpy
3+
area: library
4+
status:
5+
label: in-progress
6+
css_class: attention
7+
buttons:
8+
- label: Atomic memcpy RFC
9+
link: https://github.com/m-ou-se/rfcs/blob/atomic-memcpy/text/3301-atomic-memcpy.md
10+
---
11+
It's currently not possible to implement an efficient and strictly correct *sequence lock* in Rust,
12+
which is a very important low level synchronization primitive.
13+
14+
Reading the data from a sequence lock relies on the ability to read data that might be
15+
concurrently modified, checking afterwards if a data race occured (by checking an atomic sequence counter),
16+
and only then *using* the data after the check.
17+
(See [the RFC](https://github.com/m-ou-se/rfcs/blob/atomic-memcpy/text/3301-atomic-memcpy.md#the-problem) for a detailed explanation.)
18+
19+
However, in the memory model of Rust (and C++),
20+
reading data that is concurrently modified results in a data race (undefined behavior) *immdiately*,
21+
not just when using the data later.
22+
23+
Crates like `seqlock` work around this by using `ptr::read_volatile`, but the correctness is debatable.
24+
25+
C++'s [P1478](https://wg21.link/p1478r7) adds
26+
`atomic_load_per_byte_memcpy` and `atomic_store_per_byte_memcpy` to provide a solution for that problem.
27+
Rust should have something similar, but something that fits better into Rust's type and safety system.
28+
29+
[Rust RFC 3301](https://github.com/m-ou-se/rfcs/blob/atomic-memcpy/text/3301-atomic-memcpy.md) is
30+
a proposal for a generic type `AtomicPerByte<T>` that allows for concurrent reads and writes that do not result in undefined behavior,
31+
while still allowing tearing to allow reads and writes of any size.
32+
It leverages the `MaybeUninit<T>` type to represent types in potentially invalid (teared) state.

_contributions/btreemap-cursors.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Cursor support for BTreeMap
3+
area: library
4+
status:
5+
label: in-progress
6+
css_class: attention
7+
buttons:
8+
- label: API Change Proposal
9+
link: https://github.com/rust-lang/libs-team/issues/141
10+
---
11+
One of the fundamental properties of `BTreeMap` is that it maintains elements in sorted order and
12+
enables efficient element lookup in `O(log(N))` time. However the current API is overly fitted
13+
towards a key-value API like a HashMap and fails to expose the ability to make queries about
14+
"nearby" keys. For example, finding the first element whose key is greater than X.
15+
16+
This proposal adds `Cursor` and `CursorMut` types to `BTreeMap` based on [similar][cursor]
17+
[types][cursor_mut] for `LinkedList`.
18+
19+
[cursor]: https://doc.rust-lang.org/nightly/std/collections/linked_list/struct.Cursor.html
20+
[cursor_mut]: https://doc.rust-lang.org/nightly/std/collections/linked_list/struct.CursorMut.html

_contributions/cg_gcc.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: rustc_codegen_gcc
3+
area: compiler
4+
status:
5+
label: in-progress
6+
css_class: attention
7+
buttons:
8+
---
9+
10+
`rustc_codegen_gcc` adds support for GCC as backend for the Rust compiler. It'll allow to support a lot more of compilation targets while also benefiting from GCC advantages.

0 commit comments

Comments
 (0)