-
Notifications
You must be signed in to change notification settings - Fork 8
/
Cargo.toml
126 lines (116 loc) · 5.24 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
cargo-features = ["profile-rustflags"]
[workspace]
members = [
"examples/basic",
"examples/basic_gr_peach",
"examples/basic_nucleo_f401re",
"examples/basic_rp_pico",
"examples/basic_wio_terminal",
"examples/common",
"examples/smp_rp_pico",
"scripts/doctest",
"src/arm_semihosting",
"src/r3",
"src/r3_core",
"src/r3_kernel",
"src/r3_port_arm",
"src/r3_port_arm_m",
"src/r3_port_arm_m_test_driver",
"src/r3_port_arm_test_driver",
"src/r3_port_riscv",
"src/r3_port_riscv_test_driver",
"src/r3_port_std",
"src/r3_portkit",
"src/r3_support_rp2040",
"src/r3_support_rza1",
"src/r3_test_runner",
"src/r3_test_suite",
]
resolver = "2"
[workspace.package]
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/r3-os/r3"
[workspace.dependencies]
# Workspace packages.
#
# Should be kept up to date with their respective exact versions in the source
# tree so that packages don't accidentally get linked to an older version of
# dependencies that lack necessary features. However, unpublished packages must
# not have their versions specified ([tag:sync_workspace_dep_version]).
# Although this approach is conservative, it makes the publishing process
# tractable while ensuring the correctness of version requirements.
#
# `r3_core` and `r3_core_ks` point to the same package, but `r3_core_ks` allows
# the use of the APIs only covered by the kernel-side API stability (see
# [ref:core_version]).
#
# The version requirements specified here affect all packages that inherit the
# respective dependencies. However, when a version requirement changes due to a
# version bump in one package, it doesn't always mean it's necessary to
# transitively bump the version of a dependent package that inherits the version
# requirement. The possible reasons to withhold a transitive version bump
# include: (1) The change in the version requirement did not add new versions to
# the allowed set, or the dependent package using an older dependency will pose
# no problem to the package's users. (2) There has been no change in the
# dependent package's code since the last publish. For example, when you bump
# the major version of `r3_portkit`, `r3_port_arm_m` in the source tree will
# have the version requirement of its `r3_portkit` bumped, but you don't have to
# publish a new version of `r3_port_arm_m` because the version of `r3_portkit`
# is no concern to the users of `r3_port_arm_m`. Though, you should do it if
# the old version of `r3_portkit` is semver-incompatible with the latest one
# and contains substantial bugs.
arm_semihosting = { path = "src/arm_semihosting" }
r3 = { path = "src/r3", version = "0.2.4" }
r3_core = { path = "src/r3_core", version = "0.1.4", package = "r3_core" } # Application-side API
r3_core_ks = { path = "src/r3_core", version = "0.1.4", package = "r3_core" } # Kernel-side API
r3_kernel = { path = "src/r3_kernel", version = "0.1.4" }
r3_port_arm = { path = "src/r3_port_arm", version = "0.2.3" }
r3_port_arm_m = { path = "src/r3_port_arm_m", version = "0.3.3" }
r3_port_riscv = { path = "src/r3_port_riscv", version = "0.3.1" }
r3_port_std = { path = "src/r3_port_std", version = "0.2.1" }
r3_portkit = { path = "src/r3_portkit", version = "0.2.3" }
r3_support_rp2040 = { path = "src/r3_support_rp2040", version = "0.2.2" }
r3_support_rza1 = { path = "src/r3_support_rza1", version = "0.2.2" }
r3_test_suite = { path = "src/r3_test_suite", default-features = false }
[patch.crates-io.riscv-0p5]
# We need to enable `riscv/inline-asm` to work around
# <https://github.com/rust-embedded/riscv/issues/69>. However, some external
# crates depend on `riscv` 0.5.x, which uses the old form of `asm!` with the
# LLVM syntax, which isn't supported by the current compiler anymore. Therefore,
# we have to patch `riscv` 0.5.x with the version that uses the form of inline
# assembly supported by the current compiler.
git = "https://github.com/r3-os/rust-riscv.git"
package = "riscv"
branch = "refresh/0.5"
[patch.crates-io.riscv-0p6]
# Ditto.
git = "https://github.com/r3-os/rust-riscv.git"
package = "riscv"
branch = "refresh/0.6"
[patch.crates-io.riscv-0p7]
# Ditto.
git = "https://github.com/rust-embedded/riscv.git"
rev = "cd31989ba11d5d64e1addd8aab98bfb00dd927d5"
package = "riscv"
[patch.crates-io.riscv-rt]
# FIXME: This is a work-around for
# <https://github.com/rust-embedded/riscv/issues/69>. The upstream version of
# `riscv-rt` includes a precompiled object file, which may be rejected by the
# linker because of a floating-point ABI mismatch. This patched version replaces
# the precompiled object file with naked functions, which will always be
# complied with the expected floating-point ABI.
git = "https://github.com/r3-os/rust-riscv-rt.git"
branch = "refresh/0.8"
version = "0.6.2"
[patch.crates-io.memoffset]
# FIXME: Waiting for the fix for false clippy warnings
# <https://github.com/Gilnaa/memoffset/pull/64> to be published to crates.io
git = "https://github.com/Gilnaa/memoffset.git"
rev = "2a74b62c26724ff9c67e4e3ad05378a1af53f195"
[profile.release]
debug = true
# FIXME: Work-around for undefined symbol errors that occur with the
# combination of `-Zbuild-std`, `opt-level = "s"`, and `lto = true`
# <https://github.com/rust-lang/rust/issues/108853>
rustflags = ["-Zshare-generics=off"]