-
-
Notifications
You must be signed in to change notification settings - Fork 174
/
Cargo.toml
136 lines (116 loc) · 5.29 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
[workspace]
resolver = "2"
## Here, we specify that all subdirectories in the kernel/ and applications/ directories should be built,
## except for those starting with a "." So, we build all kernel and application crates except hidden directories.
##
## The `members` field of this workspace is used to specify all of the crates that are built
## when the entire workspace is built, e.g., with `cargo build --workspace` or `cargo build --all`.
##
## Note that a full workspace build will *not* include crates that are explicitly excluded below.
members = [
"theseus_features", ## Must be included to realize global Cargo features across Theseus.
"kernel/[!.]*/",
"applications/[!.]*/",
]
## Default members are the crates built by default if no specific packages (crates)
## are specified when invoking `cargo build`.
## Currently, this is only relevant when overriding the Makefile's default `FEATURES`,
## which has the default value of `--workspace`, ensuring that all `members` above
## are built even when `FEATURES` is explicitly set when invoking `make`.
##
## So far, this includes only the minimum crates required to allow Theseus to boot.
default-members = [
"theseus_features", ## Must be included to realize global Cargo features across Theseus.
"kernel/nano_core",
]
exclude = [
## Exclude the build directories
"build",
"target",
## Exclude configuration, tools, scripts, etc
"cfg",
"compiler_plugins",
"scripts",
"tools",
## Exclude old components
"old_crates",
## Exclude third-party libs and ports for now.
## This allows Theseus crates that *are* included in a build to pull these
## third-party crates in only when needed to fulfill their dependencies.
"libs",
"ports",
## Exclude tlibc and libtheseus, which are currently built separately.
"tlibc",
"libtheseus",
########################################################################################
## Below, we exclude things that should NEVER be considered part of Theseus's workspace.
########################################################################################
##
## Note that if you simply need to exclude something from a custom build of Theseus,
## it's best to add that crate as an optional dependency and then create a feature
## to enable it in a non-workspace build (i.e., when not calling `cargo build --all`).
## Exclude kernel crates that exist purely for testing or benchmarking purposes.
"kernel/libtest",
"kernel/test_thread_local",
"kernel/unified_channel",
## Exclude benchmark-related crates in all builds; they must be explicitly included via features.
## TODO: move these to a specific "benches" folder so we can exclude that entire folder.
"applications/bm",
"applications/channel_eval",
"applications/heap_eval",
"applications/rq_eval",
"applications/scheduler_eval",
## Exclude application crates used for testing specific Theseus functionality.
## TODO: move these to a specific "tests" folder so we can exclude that entire folder.
"applications/test_aligned_page_allocation",
"applications/test_async",
"applications/test_backtrace",
"applications/test_block_io",
"applications/test_channel",
"applications/test_filerw",
"applications/test_identity_mapping",
"applications/test_ixgbe",
"applications/test_libc",
"applications/test_mlx5",
"applications/test_panic",
"applications/test_preemption_counter",
"applications/test_restartable",
"applications/test_scheduler",
"applications/test_std_fs",
"applications/test_sync_block",
"applications/test_task_cancel",
"applications/test_tls",
"applications/test_wait_queue",
"applications/test_wasmtime",
"applications/unwind_test",
]
[patch.crates-io]
### use our own version of volatile which supports zerocopy
volatile = { git = "https://github.com/theseus-os/volatile" }
### use our own no_std-compatilbe getopts
getopts = { git = "https://github.com/theseus-os/getopts" }
### Patch `libc` so we can use libc-specific types when using `cfg(target_os = "theseus")`.
libc = { git = "https://github.com/theseus-os/libc", branch = "theseus" }
### Patch `core2` with newer functions from `std::io`, e.g., additional `Seek` trait functions
core2 = { path = "libs/core2" }
### Patch `bincode` because the version on crates.io doesn't handle no_std features correctly.
bincode = { git = "https://github.com/bincode-org/bincode" }
##############################################################################################
#################### Below are patches for wasmtime-related crates. ##########################
##############################################################################################
wasmparser = { git = "https://github.com/theseus-os/wasm-tools", branch = "no-std-wasmparser" }
backtrace = { path = "ports/backtrace" }
region = { path = "ports/region" }
noline = { git = "https://github.com/theseus-os/noline", branch = "history-dedup" }
target-lexicon = { git = "https://github.com/theseus-os/target-lexicon", branch = "theseus" }
### These profiles fix the new rustc behavior of splitting one crate into many object files.
### That messes up our module loading, which is bad!
### See this link about profiles: https://doc.rust-lang.org/cargo/reference/manifest.html
# workaround rust-lang/rust#47074
[profile.dev]
codegen-units = 1
incremental = false
# workaround rust-lang/rust#47074
[profile.release]
codegen-units = 1
incremental = false