Skip to content

Commit 05bedd9

Browse files
author
鲲尘
committed
feat: basic project structure
1 parent e264020 commit 05bedd9

Some content is hidden

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

80 files changed

+7075
-2088
lines changed

.cargo/config.toml

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,42 @@
1-
# To be able to run unit tests on macOS, support compilation to 'x86_64-apple-darwin'.
2-
[target.'cfg(target_vendor = "apple")']
3-
rustflags = ["-C", "link-args=-Wl,-undefined,dynamic_lookup"]
1+
# workaround for getting workspace root dir, reference: https://github.com/rust-lang/cargo/issues/3946
2+
[env]
3+
CARGO_WORKSPACE_DIR = { value = "", relative = true }
4+
5+
[alias]
6+
lint = "clippy --workspace --all-targets -- --deny warnings"
7+
# AKA `test-update`, handy cargo rst update without install `cargo-rst` binary
8+
t = "test --no-fail-fast"
9+
tu = "run -p cargo-rst -- update"
10+
11+
[target.'cfg(all())']
12+
rustflags = [
13+
# CLIPPY LINT SETTINGS
14+
# This is a workaround to configure lints for the entire workspace, pending the ability to configure this via TOML.
15+
# See: `https://github.com/rust-lang/cargo/issues/5034`
16+
# `https://github.com/EmbarkStudios/rust-ecosystem/issues/22#issuecomment-947011395`
17+
"-Wclippy::all", # all lints that are on by default (correctness, suspicious, style, complexity, perf)
18+
19+
# restriction
20+
"-Wclippy::dbg_macro",
21+
"-Wclippy::unwrap_in_result",
22+
"-Wclippy::unwrap_used",
23+
"-Wclippy::empty_drop",
24+
"-Wclippy::exit",
25+
"-Wclippy::empty_structs_with_brackets",
26+
"-Wclippy::rc_buffer",
27+
"-Wclippy::rc_mutex",
28+
"-Wclippy::same_name_method",
29+
30+
"-Aclippy::default_constructed_unit_structs",
31+
]
432

533
# To be able to run unit tests on Linux, support compilation to 'x86_64-unknown-linux-gnu'.
634
[target.'cfg(target_os = "linux")']
735
rustflags = ["-C", "link-args=-Wl,--warn-unresolved-symbols"]
836

937
# To be able to run unit tests on Windows, support compilation to 'x86_64-pc-windows-msvc'.
1038
[target.'cfg(target_os = "windows")']
11-
rustflags = ["-C", "link-args=/FORCE"]
39+
rustflags = ["-C", "link-args=/FORCE"]
40+
41+
[target.x86_64-apple-darwin]
42+
rustflags = ["-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup"]

.github/workflows/CI.yml

Lines changed: 0 additions & 288 deletions
This file was deleted.

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ dist
121121
.AppleDouble
122122
.LSOverride
123123

124-
# Icon must end with two
124+
# Icon must end with two
125125
Icon
126126

127127

@@ -195,3 +195,6 @@ Cargo.lock
195195
!.yarn/versions
196196

197197
*.node
198+
199+
.rspack_crates/
200+
node_modules/

0 commit comments

Comments
 (0)