Skip to content

Commit dc41f7c

Browse files
committed
simulator-ng init
1 parent 021f54e commit dc41f7c

File tree

1,920 files changed

+963177
-45
lines changed

Some content is hidden

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

1,920 files changed

+963177
-45
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ else()
391391
include(CTest)
392392
add_subdirectory(test/unit-test)
393393
add_subdirectory(test/simulator)
394+
add_subdirectory(test/simulator-ng)
394395
if(COVERAGE)
395396
find_program(GCOVR gcovr)
396397
if(NOT GCOVR STREQUAL "GCOVR-NOTFOUND")

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ rust-docs: | build
113113
$(MAKE) -C build rust-docs
114114
simulator: | build-build-noasan
115115
$(MAKE) -C build-build-noasan simulator
116+
simulator-ng: | build-build-noasan
117+
$(MAKE) -C build-build-noasan simulator-ng
116118
run-simulator: | simulator
117119
./build-build-noasan/bin/simulator
118120
unit-test: | build-build
@@ -194,3 +196,7 @@ prepare-tidy: | build build-build
194196
$(MAKE) -C build-build rust-cbindgen
195197
clean:
196198
rm -rf build build-build build-debug build-build-noasan
199+
200+
# When you vendor rust libs avoid duplicates
201+
vendor-rust-deps:
202+
(cd external; ./vendor-rust.sh)

external/vendor-rust.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,9 @@ RUSTC_BOOTSTRAP=1 cargo vendor \
2121
--manifest-path ../src/rust/Cargo.toml \
2222
--sync "$RUST_SYSROOT/lib/rustlib/src/rust/library/test/Cargo.toml" \
2323
vendor
24+
25+
RUSTC_BOOTSTRAP=1 cargo vendor \
26+
--manifest-path ../test/simulator-ng/Cargo.toml \
27+
--no-delete \
28+
--sync "$RUST_SYSROOT/lib/rustlib/src/rust/library/test/Cargo.toml" \
29+
vendor
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"files":{"CHANGELOG.md":"d362fc1fccaaf4d421bcf0fe8b80ddb4f625dade0c1ee52d08bd0b95509a49d1","CODE_OF_CONDUCT.md":"42634d0f6d922f49857175af991802822f7f920487aefa2ee250a50d12251a66","Cargo.toml":"87aced7532a7974eb37ab5fe6037f0abafc36d6b2d74891ecd2bf2f14f50d11e","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"baa8604f8afb34fd93b9c79729daafb884dedcaf34023e4af8ad037d916061fd","src/example_generated.rs":"e43eb59e90f317f38d436670a6067d2fd9eb35fb319fe716184e4a04e24ed1b2","src/lib.rs":"e6477688535ee326d27238aeedc9cb4320ac35b9d17a4deda09e0587b0ccdbd4","tests/basic.rs":"146f1cbf6279bc609242cd3349f29cb21b41294f5e4921875f5ec95bd83529a2","tests/compile-fail/impls/copy.rs":"b791371237ddc75a7c04d2130e03b462c9c00a80dca08bd45aa97433d9c0d13a","tests/compile-fail/impls/copy.stderr.beta":"77d83484ce221d4b6ff2f7de843929a452d779fcfff428122710dd8218c298e3","tests/compile-fail/impls/eq.rs":"0cee8b9e07d537890e0189710293b53972d0fab63c09366f33c391065afafa99","tests/compile-fail/impls/eq.stderr.beta":"381fc6143d45ce76d7cecc47aa59cb69fe5e79c0b60a4a85d5c6163b400b3cc7","tests/compile-fail/non_integer_base/all_defined.rs":"95e14cad9e94560262f2862c3c01865ac30369b69da1001b0e7285cb55e6cb75","tests/compile-fail/non_integer_base/all_defined.stderr.beta":"1760739a276690903bb03844025587d37939f5dfcbfab309db3c86f32bdbf748","tests/compile-fail/non_integer_base/all_missing.rs":"b3d9da619d23213731ba2581aa7999c796c3c79aaf4f0ee6b11ceec08a11537f","tests/compile-fail/non_integer_base/all_missing.stderr.beta":"37e102290d3867e175b21976be798939f294efb17580d5b51e7b17b590d55132","tests/compile-fail/visibility/private_field.rs":"38e4d3fe6471829360d12c8d09b097f6a21aa93fb51eac3b215d96bdae23316b","tests/compile-fail/visibility/private_field.stderr.beta":"5aa24a3ebb39326f31927721c5017b8beb66c3e501fb865a3fa814c9763bfa0f","tests/compile-fail/visibility/private_flags.rs":"2ce4235802aa4e9c96c4e77d9e31d8401ef58dcda4741325184f0764ab1fe393","tests/compile-fail/visibility/private_flags.stderr.beta":"f3eb9f7baf2689258f3519ff7ee5c6ec3c237264ebcfe63f40c40f2023e5022f","tests/compile-fail/visibility/pub_const.rs":"8f813a97ac518c5ea8ac65b184101912452384afaf7b8d6c5e62f8370eca3c0a","tests/compile-fail/visibility/pub_const.stderr.beta":"823976ae1794d7f5372e2ec9aabba497e7bb88004722904c38da342ed98e8962","tests/compile-pass/impls/convert.rs":"88fe80bfb9cd5779f0e1d92c9ec02a8b6bb67e334c07f2309e9c0ba5ef776eb0","tests/compile-pass/impls/default.rs":"c508f9a461691f44b45142fa5ad599f02326e1de4c0cbca6c0593f4652eba109","tests/compile-pass/impls/inherent_methods.rs":"ecc26388e9a394bfa7a5bb69a5d621ab3d4d1e53f28f657bb8e78fe79f437913","tests/compile-pass/redefinition/core.rs":"ff5b6e72f87acc6ebb12405d3c0f6e3fa62e669933656a454bb63b30ea44179c","tests/compile-pass/redefinition/stringify.rs":"1edbce42b900c14425d7ffa14e83e165ebe452d7dccd8c0a8a821bdec64f5c93","tests/compile-pass/repr/c.rs":"6fda17f7c2edfcd155314579e83d0fc8a16209e400f1f9a5ca77bd9a799041f2","tests/compile-pass/repr/transparent.rs":"6cdc87a2137d8a4e0c8ce9b6cba83c82255f8ea125951bf614418685600489ce","tests/compile-pass/visibility/bits_field.rs":"1f3e5ba5a047440066a9f6bf7b7af33f5b06f6b1da3dd9af6886168199a7ea0a","tests/compile-pass/visibility/pub_in.rs":"e95312ff60966d42ec4bc00225507895a9b8ec24056ce6a9edd9145be35d730f","tests/compile.rs":"f27c67a7dd183ca30efea1b6e0880e3469a6dd63b92b1fd711c082df182c9eec"},"package":"bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"}

external/vendor/bitflags/CHANGELOG.md

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
# 1.3.2
2+
3+
- Allow `non_snake_case` in generated flags types ([#256])
4+
5+
[#252]: https://github.com/bitflags/bitflags/pull/256
6+
7+
# 1.3.1
8+
9+
- Revert unconditional `#[repr(transparent)]` ([#252])
10+
11+
[#252]: https://github.com/bitflags/bitflags/pull/252
12+
13+
# 1.3.0 (yanked)
14+
15+
- Add `#[repr(transparent)]` ([#187])
16+
17+
- End `empty` doc comment with full stop ([#202])
18+
19+
- Fix typo in crate root docs ([#206])
20+
21+
- Document from_bits_unchecked unsafety ([#207])
22+
23+
- Let `is_all` ignore extra bits ([#211])
24+
25+
- Allows empty flag definition ([#225])
26+
27+
- Making crate accessible from std ([#227])
28+
29+
- Make `from_bits` a const fn ([#229])
30+
31+
- Allow multiple bitflags structs in one macro invocation ([#235])
32+
33+
- Add named functions to perform set operations ([#244])
34+
35+
- Fix typos in method docs ([#245])
36+
37+
- Modernization of the `bitflags` macro to take advantage of newer features and 2018 idioms ([#246])
38+
39+
- Fix regression (in an unreleased feature) and simplify tests ([#247])
40+
41+
- Use `Self` and fix bug when overriding `stringify!` ([#249])
42+
43+
[#187]: https://github.com/bitflags/bitflags/pull/187
44+
[#202]: https://github.com/bitflags/bitflags/pull/202
45+
[#206]: https://github.com/bitflags/bitflags/pull/206
46+
[#207]: https://github.com/bitflags/bitflags/pull/207
47+
[#211]: https://github.com/bitflags/bitflags/pull/211
48+
[#225]: https://github.com/bitflags/bitflags/pull/225
49+
[#227]: https://github.com/bitflags/bitflags/pull/227
50+
[#229]: https://github.com/bitflags/bitflags/pull/229
51+
[#235]: https://github.com/bitflags/bitflags/pull/235
52+
[#244]: https://github.com/bitflags/bitflags/pull/244
53+
[#245]: https://github.com/bitflags/bitflags/pull/245
54+
[#246]: https://github.com/bitflags/bitflags/pull/246
55+
[#247]: https://github.com/bitflags/bitflags/pull/247
56+
[#249]: https://github.com/bitflags/bitflags/pull/249
57+
58+
# 1.2.1
59+
60+
- Remove extraneous `#[inline]` attributes ([#194])
61+
62+
[#194]: https://github.com/bitflags/bitflags/pull/194
63+
64+
# 1.2.0
65+
66+
- Fix typo: {Lower, Upper}Exp - {Lower, Upper}Hex ([#183])
67+
68+
- Add support for "unknown" bits ([#188])
69+
70+
[#183]: https://github.com/rust-lang-nursery/bitflags/pull/183
71+
[#188]: https://github.com/rust-lang-nursery/bitflags/pull/188
72+
73+
# 1.1.0
74+
75+
This is a re-release of `1.0.5`, which was yanked due to a bug in the RLS.
76+
77+
# 1.0.5
78+
79+
- Use compiletest_rs flags supported by stable toolchain ([#171])
80+
81+
- Put the user provided attributes first ([#173])
82+
83+
- Make bitflags methods `const` on newer compilers ([#175])
84+
85+
[#171]: https://github.com/rust-lang-nursery/bitflags/pull/171
86+
[#173]: https://github.com/rust-lang-nursery/bitflags/pull/173
87+
[#175]: https://github.com/rust-lang-nursery/bitflags/pull/175
88+
89+
# 1.0.4
90+
91+
- Support Rust 2018 style macro imports ([#165])
92+
93+
```rust
94+
use bitflags::bitflags;
95+
```
96+
97+
[#165]: https://github.com/rust-lang-nursery/bitflags/pull/165
98+
99+
# 1.0.3
100+
101+
- Improve zero value flag handling and documentation ([#157])
102+
103+
[#157]: https://github.com/rust-lang-nursery/bitflags/pull/157
104+
105+
# 1.0.2
106+
107+
- 30% improvement in compile time of bitflags crate ([#156])
108+
109+
- Documentation improvements ([#153])
110+
111+
- Implementation cleanup ([#149])
112+
113+
[#156]: https://github.com/rust-lang-nursery/bitflags/pull/156
114+
[#153]: https://github.com/rust-lang-nursery/bitflags/pull/153
115+
[#149]: https://github.com/rust-lang-nursery/bitflags/pull/149
116+
117+
# 1.0.1
118+
- Add support for `pub(restricted)` specifier on the bitflags struct ([#135])
119+
- Optimize performance of `all()` when called from a separate crate ([#136])
120+
121+
[#135]: https://github.com/rust-lang-nursery/bitflags/pull/135
122+
[#136]: https://github.com/rust-lang-nursery/bitflags/pull/136
123+
124+
# 1.0.0
125+
- **[breaking change]** Macro now generates [associated constants](https://doc.rust-lang.org/reference/items.html#associated-constants) ([#24])
126+
127+
- **[breaking change]** Minimum supported version is Rust **1.20**, due to usage of associated constants
128+
129+
- After being broken in 0.9, the `#[deprecated]` attribute is now supported again ([#112])
130+
131+
- Other improvements to unit tests and documentation ([#106] and [#115])
132+
133+
[#24]: https://github.com/rust-lang-nursery/bitflags/pull/24
134+
[#106]: https://github.com/rust-lang-nursery/bitflags/pull/106
135+
[#112]: https://github.com/rust-lang-nursery/bitflags/pull/112
136+
[#115]: https://github.com/rust-lang-nursery/bitflags/pull/115
137+
138+
## How to update your code to use associated constants
139+
Assuming the following structure definition:
140+
```rust
141+
bitflags! {
142+
struct Something: u8 {
143+
const FOO = 0b01,
144+
const BAR = 0b10
145+
}
146+
}
147+
```
148+
In 0.9 and older you could do:
149+
```rust
150+
let x = FOO.bits | BAR.bits;
151+
```
152+
Now you must use:
153+
```rust
154+
let x = Something::FOO.bits | Something::BAR.bits;
155+
```
156+
157+
# 0.9.1
158+
- Fix the implementation of `Formatting` traits when other formatting traits were present in scope ([#105])
159+
160+
[#105]: https://github.com/rust-lang-nursery/bitflags/pull/105
161+
162+
# 0.9.0
163+
- **[breaking change]** Use struct keyword instead of flags to define bitflag types ([#84])
164+
165+
- **[breaking change]** Terminate const items with semicolons instead of commas ([#87])
166+
167+
- Implement the `Hex`, `Octal`, and `Binary` formatting traits ([#86])
168+
169+
- Printing an empty flag value with the `Debug` trait now prints "(empty)" instead of nothing ([#85])
170+
171+
- The `bitflags!` macro can now be used inside of a fn body, to define a type local to that function ([#74])
172+
173+
[#74]: https://github.com/rust-lang-nursery/bitflags/pull/74
174+
[#84]: https://github.com/rust-lang-nursery/bitflags/pull/84
175+
[#85]: https://github.com/rust-lang-nursery/bitflags/pull/85
176+
[#86]: https://github.com/rust-lang-nursery/bitflags/pull/86
177+
[#87]: https://github.com/rust-lang-nursery/bitflags/pull/87
178+
179+
# 0.8.2
180+
- Update feature flag used when building bitflags as a dependency of the Rust toolchain
181+
182+
# 0.8.1
183+
- Allow bitflags to be used as a dependency of the Rust toolchain
184+
185+
# 0.8.0
186+
- Add support for the experimental `i128` and `u128` integer types ([#57])
187+
- Add set method: `flags.set(SOME_FLAG, true)` or `flags.set(SOME_FLAG, false)` ([#55])
188+
This may break code that defines its own set method
189+
190+
[#55]: https://github.com/rust-lang-nursery/bitflags/pull/55
191+
[#57]: https://github.com/rust-lang-nursery/bitflags/pull/57
192+
193+
# 0.7.1
194+
*(yanked)*
195+
196+
# 0.7.0
197+
- Implement the Extend trait ([#49])
198+
- Allow definitions inside the `bitflags!` macro to refer to items imported from other modules ([#51])
199+
200+
[#49]: https://github.com/rust-lang-nursery/bitflags/pull/49
201+
[#51]: https://github.com/rust-lang-nursery/bitflags/pull/51
202+
203+
# 0.6.0
204+
- The `no_std` feature was removed as it is now the default
205+
- The `assignment_operators` feature was remove as it is now enabled by default
206+
- Some clippy suggestions have been applied
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
education, socio-economic status, nationality, personal appearance, race,
10+
religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org

external/vendor/bitflags/Cargo.toml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
2+
#
3+
# When uploading crates to the registry Cargo will automatically
4+
# "normalize" Cargo.toml files for maximal compatibility
5+
# with all versions of Cargo and also rewrite `path` dependencies
6+
# to registry (e.g., crates.io) dependencies
7+
#
8+
# If you believe there's an error in this file please file an
9+
# issue against the rust-lang/cargo repository. If you're
10+
# editing this file be aware that the upstream Cargo.toml
11+
# will likely look very different (and much more reasonable)
12+
13+
[package]
14+
edition = "2018"
15+
name = "bitflags"
16+
version = "1.3.2"
17+
authors = ["The Rust Project Developers"]
18+
exclude = ["bors.toml"]
19+
description = "A macro to generate structures which behave like bitflags.\n"
20+
homepage = "https://github.com/bitflags/bitflags"
21+
documentation = "https://docs.rs/bitflags"
22+
readme = "README.md"
23+
keywords = ["bit", "bitmask", "bitflags", "flags"]
24+
categories = ["no-std"]
25+
license = "MIT/Apache-2.0"
26+
repository = "https://github.com/bitflags/bitflags"
27+
[package.metadata.docs.rs]
28+
features = ["example_generated"]
29+
[dependencies.compiler_builtins]
30+
version = "0.1.2"
31+
optional = true
32+
33+
[dependencies.core]
34+
version = "1.0.0"
35+
optional = true
36+
package = "rustc-std-workspace-core"
37+
[dev-dependencies.rustversion]
38+
version = "1.0"
39+
40+
[dev-dependencies.serde]
41+
version = "1.0"
42+
43+
[dev-dependencies.serde_derive]
44+
version = "1.0"
45+
46+
[dev-dependencies.serde_json]
47+
version = "1.0"
48+
49+
[dev-dependencies.trybuild]
50+
version = "1.0"
51+
52+
[dev-dependencies.walkdir]
53+
version = "2.3"
54+
55+
[features]
56+
default = []
57+
example_generated = []
58+
rustc-dep-of-std = ["core", "compiler_builtins"]

0 commit comments

Comments
 (0)