Skip to content

Commit

Permalink
Update crates dependencies to use git or crates.io version
Browse files Browse the repository at this point in the history
  • Loading branch information
equation314 committed Jul 18, 2024
1 parent 5a05e29 commit 7dec406
Show file tree
Hide file tree
Showing 66 changed files with 461 additions and 719 deletions.
569 changes: 156 additions & 413 deletions Cargo.lock

Large diffs are not rendered by default.

67 changes: 30 additions & 37 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,6 @@
resolver = "2"

members = [
"crates/allocator",
"crates/arm_gic",
"crates/arm_pl011",
"crates/dw_apb_uart",
"crates/axerrno",
"crates/axfs_devfs",
"crates/axfs_ramfs",
"crates/axfs_vfs",
"crates/axio",
"crates/capability",
"crates/crate_interface",
"crates/driver_block",
"crates/driver_common",
"crates/driver_display",
"crates/driver_net",
"crates/driver_pci",
"crates/driver_virtio",
"crates/flatten_objects",
"crates/handler_table",
"crates/kernel_guard",
"crates/lazy_init",
"crates/linked_list",
"crates/memory_addr",
"crates/page_table",
"crates/page_table_entry",
"crates/percpu",
"crates/percpu_macros",
"crates/ratio",
"crates/scheduler",
"crates/slab_allocator",
"crates/spinlock",
"crates/timer_list",
"crates/tuple_for_each",

"modules/axalloc",
"modules/axconfig",
"modules/axdisplay",
Expand Down Expand Up @@ -72,8 +38,35 @@ members = [
"apps/task/tls",
]

[workspace.package]
version = "0.1.0"
authors = ["Yuekai Jia <[email protected]>"]
license = "GPL-3.0-or-later OR Apache-2.0 OR MulanPSL-2.0"
homepage = "https://github.com/arceos-org/arceos"
documentation = "https://arceos-org.github.io/arceos"
repository = "https://github.com/arceos-org/arceos"
keywords = ["arceos", "kernel"]
categories = ["os", "no-std"]

[workspace.dependencies]
axstd = { path = "ulib/axstd" }
axlibc = { path = "ulib/axlibc" }

arceos_api = { path = "api/arceos_api" }
arceos_posix_api = { path = "api/arceos_posix_api" }
axfeat = { path = "api/axfeat" }

axalloc = { path = "modules/axalloc" }
axconfig = { path = "modules/axconfig" }
axdisplay = { path = "modules/axdisplay" }
axdriver = { path = "modules/axdriver" }
axfs = { path = "modules/axfs" }
axhal = { path = "modules/axhal" }
axlog = { path = "modules/axlog" }
axnet = { path = "modules/axnet" }
axruntime = { path = "modules/axruntime" }
axsync = { path = "modules/axsync" }
axtask = { path = "modules/axtask" }

[profile.release]
lto = true

[patch.crates-io]
crate_interface = { path = "crates/crate_interface" }
24 changes: 12 additions & 12 deletions api/arceos_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ myfs = ["axfeat/myfs"]
dummy-if-not-enabled = []

[dependencies]
axfeat = { path = "../axfeat" }
axruntime = { path = "../../modules/axruntime" }
axconfig = { path = "../../modules/axconfig" }
axlog = { path = "../../modules/axlog" }
axio = { path = "../../crates/axio" }
axerrno = { path = "../../crates/axerrno" }
axhal = { path = "../../modules/axhal" }
axalloc = { path = "../../modules/axalloc", optional = true }
axtask = { path = "../../modules/axtask", optional = true }
axfs = { path = "../../modules/axfs", optional = true }
axnet = { path = "../../modules/axnet", optional = true }
axdisplay = { path = "../../modules/axdisplay", optional = true }
axio = "0.1"
axerrno = "0.1"
axfeat = { workspace = true }
axruntime = { workspace = true }
axconfig = { workspace = true }
axlog = { workspace = true }
axhal = { workspace = true }
axalloc = { workspace = true, optional = true }
axtask = { workspace = true, optional = true }
axfs = { workspace = true, optional = true }
axnet = { workspace = true, optional = true }
axdisplay = { workspace = true, optional = true }
26 changes: 13 additions & 13 deletions api/arceos_posix_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,24 @@ epoll = ["fd"]

[dependencies]
# ArceOS modules
axfeat = { path = "../axfeat" }
axruntime = { path = "../../modules/axruntime" }
axconfig = { path = "../../modules/axconfig" }
axlog = { path = "../../modules/axlog" }
axhal = { path = "../../modules/axhal" }
axsync = { path = "../../modules/axsync" }
axalloc = { path = "../../modules/axalloc", optional = true }
axtask = { path = "../../modules/axtask", optional = true }
axfs = { path = "../../modules/axfs", optional = true }
axnet = { path = "../../modules/axnet", optional = true }
axfeat = { workspace = true }
axruntime = { workspace = true }
axconfig = { workspace = true }
axlog = { workspace = true }
axhal = { workspace = true }
axsync = { workspace = true }
axalloc = { workspace = true, optional = true }
axtask = { workspace = true, optional = true }
axfs = { workspace = true, optional = true }
axnet = { workspace = true, optional = true }

# Other crates
axio = { path = "../../crates/axio" }
axerrno = { path = "../../crates/axerrno" }
axio = "0.1"
axerrno = "0.1"
flatten_objects = "0.1"
static_assertions = "1.1.0"
spin = { version = "0.9" }
lazy_static = { version = "1.5", features = ["spin_no_std"] }
flatten_objects = { path = "../../crates/flatten_objects" }

[build-dependencies]
bindgen ={ version = "0.69" }
24 changes: 12 additions & 12 deletions api/axfeat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ documentation = "https://arceos-org.github.io/arceos/axfeat/index.html"
default = []

# Multicore
smp = ["axhal/smp", "axruntime/smp", "spinlock/smp"]
smp = ["axhal/smp", "axruntime/smp", "kspin/smp"]

# Floating point/SIMD
fp_simd = ["axhal/fp_simd"]
Expand Down Expand Up @@ -64,14 +64,14 @@ log-level-debug = ["axlog/log-level-debug"]
log-level-trace = ["axlog/log-level-trace"]

[dependencies]
axruntime = { path = "../../modules/axruntime" }
axhal = { path = "../../modules/axhal" }
axlog = { path = "../../modules/axlog" }
axalloc = { path = "../../modules/axalloc", optional = true }
axdriver = { path = "../../modules/axdriver", optional = true }
axfs = { path = "../../modules/axfs", optional = true }
axnet = { path = "../../modules/axnet", optional = true }
axdisplay = { path = "../../modules/axdisplay", optional = true }
axsync = { path = "../../modules/axsync", optional = true }
axtask = { path = "../../modules/axtask", optional = true }
spinlock = { path = "../../crates/spinlock", optional = true }
axruntime = { workspace = true }
axhal = { workspace = true }
axlog = { workspace = true }
axalloc = { workspace = true, optional = true }
axdriver = { workspace = true, optional = true }
axfs = { workspace = true, optional = true }
axnet = { workspace = true, optional = true }
axdisplay = { workspace = true, optional = true }
axsync = { workspace = true, optional = true }
axtask = { workspace = true, optional = true }
kspin = { version = "0.1", optional = true }
2 changes: 1 addition & 1 deletion apps/display/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ authors = ["Shiping Yuan <[email protected]>"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
axstd = { path = "../../ulib/axstd", features = ["display"], optional = true }
axstd = { workspace = true, features = ["display"], optional = true }
embedded-graphics = "0.8"
2 changes: 1 addition & 1 deletion apps/exception/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ authors = ["Yuekai Jia <[email protected]>"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
axstd = { path = "../../ulib/axstd", optional = true }
axstd = { workspace = true, optional = true }
8 changes: 4 additions & 4 deletions apps/fs/shell/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use-ramfs = ["axstd/myfs", "dep:axfs_vfs", "dep:axfs_ramfs", "dep:crate_interfac
default = []

[dependencies]
axfs_vfs = { path = "../../../crates/axfs_vfs", optional = true }
axfs_ramfs = { path = "../../../crates/axfs_ramfs", optional = true }
crate_interface = { path = "../../../crates/crate_interface", optional = true }
axstd = { path = "../../../ulib/axstd", features = ["alloc", "fs"], optional = true }
axfs_vfs = { version = "0.1", optional = true }
axfs_ramfs = { version = "0.1", optional = true }
crate_interface = { version = "0.1", optional = true }
axstd = { workspace = true, features = ["alloc", "fs"], optional = true }
2 changes: 1 addition & 1 deletion apps/helloworld/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ authors = ["Yuekai Jia <[email protected]>"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
axstd = { path = "../../ulib/axstd", optional = true }
axstd = { workspace = true, optional = true }
2 changes: 1 addition & 1 deletion apps/memtest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ authors = ["Yuekai Jia <[email protected]>"]

[dependencies]
rand = { version = "0.8", default-features = false, features = ["small_rng"] }
axstd = { path = "../../ulib/axstd", features = ["alloc"], optional = true }
axstd = { workspace = true, features = ["alloc"], optional = true }
2 changes: 1 addition & 1 deletion apps/net/bwbench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ authors = ["ChengXiang Qi <[email protected]>"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
axstd = { path = "../../../ulib/axstd", features = ["net"] }
axstd = { workspace = true, features = ["net"] }
axnet = { path = "../../../modules/axnet" }
2 changes: 1 addition & 1 deletion apps/net/echoserver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ authors = ["Yuekai Jia <[email protected]>"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
axstd = { path = "../../../ulib/axstd", features = ["alloc", "multitask", "net"], optional = true }
axstd = { workspace = true, features = ["alloc", "multitask", "net"], optional = true }
2 changes: 1 addition & 1 deletion apps/net/httpclient/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = ["Yuekai Jia <[email protected]>", "Dashuai Wu <wudashuaijss@foxma
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
axstd = { path = "../../../ulib/axstd", features = ["net"], optional = true }
axstd = { workspace = true, features = ["net"], optional = true }

[features]
default = []
Expand Down
2 changes: 1 addition & 1 deletion apps/net/httpserver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ authors = ["Yuekai Jia <[email protected]>"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
axstd = { path = "../../../ulib/axstd", features = ["alloc", "multitask", "net"], optional = true }
axstd = { workspace = true, features = ["alloc", "multitask", "net"], optional = true }
2 changes: 1 addition & 1 deletion apps/net/udpserver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ edition = "2021"
authors = ["Dashuai Wu <[email protected]>"]

[dependencies]
axstd = { path = "../../../ulib/axstd", features = ["net"], optional = true }
axstd = { workspace = true, features = ["net"], optional = true }
2 changes: 1 addition & 1 deletion apps/task/parallel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ authors = ["Yuekai Jia <[email protected]>"]

[dependencies]
rand = { version = "0.8", default-features = false, features = ["small_rng"] }
axstd = { path = "../../../ulib/axstd", features = ["alloc", "multitask", "irq"], optional = true }
axstd = { workspace = true, features = ["alloc", "multitask", "irq"], optional = true }
2 changes: 1 addition & 1 deletion apps/task/priority/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ sched_rr = ["axstd?/sched_rr"]
sched_cfs = ["axstd?/sched_cfs"]

[dependencies]
axstd = { path = "../../../ulib/axstd", features = ["alloc", "multitask"], optional = true }
axstd = { workspace = true, features = ["alloc", "multitask"], optional = true }
2 changes: 1 addition & 1 deletion apps/task/sleep/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ authors = ["Yuekai Jia <[email protected]>"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
axstd = { path = "../../../ulib/axstd", features = ["multitask", "irq"], optional = true }
axstd = { workspace = true, features = ["multitask", "irq"], optional = true }
2 changes: 1 addition & 1 deletion apps/task/tls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ authors = ["Yuekai Jia <[email protected]>"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
axstd = { path = "../../../ulib/axstd", features = ["tls", "alloc", "multitask"], optional = true }
axstd = { workspace = true, features = ["tls", "alloc", "multitask"], optional = true }
2 changes: 1 addition & 1 deletion apps/task/yield/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ sched_rr = ["axstd?/sched_rr"]
sched_cfs = ["axstd?/sched_cfs"]

[dependencies]
axstd = { path = "../../../ulib/axstd", features = ["multitask"], optional = true }
axstd = { workspace = true, features = ["multitask"], optional = true }
8 changes: 4 additions & 4 deletions modules/axalloc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ buddy = ["allocator/buddy"]
[dependencies]
log = "0.4"
cfg-if = "1.0"
spinlock = { path = "../../crates/spinlock" }
memory_addr = { path = "../../crates/memory_addr" }
allocator = { path = "../../crates/allocator", features = ["bitmap"] }
axerrno = { path = "../../crates/axerrno" }
kspin = "0.1"
memory_addr = "0.2"
axerrno = "0.1"
allocator = { git = "https://github.com/arceos-org/allocator.git", tag ="v0.1.0", features = ["bitmap"] }
2 changes: 1 addition & 1 deletion modules/axalloc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ mod page;
use allocator::{AllocResult, BaseAllocator, BitmapPageAllocator, ByteAllocator, PageAllocator};
use core::alloc::{GlobalAlloc, Layout};
use core::ptr::NonNull;
use spinlock::SpinNoIrq;
use kspin::SpinNoIrq;

const PAGE_SIZE: usize = 0x1000;
const MIN_HEAP_SIZE: usize = 0x8000; // 32 K
Expand Down
8 changes: 4 additions & 4 deletions modules/axdisplay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ documentation = "https://arceos-org.github.io/arceos/axdisplay/index.html"

[dependencies]
log = "0.4"
axdriver = { path = "../axdriver", features = ["display"] }
lazy_init = { path = "../../crates/lazy_init" }
axsync = { path = "../axsync" }
driver_display = { path = "../../crates/driver_display" }
lazyinit = "0.1"
axdriver = { workspace = true, features = ["display"] }
axsync = { workspace = true }
axdriver_display = { git = "https://github.com/arceos-org/axdriver_crates.git", tag = "v0.1.0" }
4 changes: 2 additions & 2 deletions modules/axdisplay/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
extern crate log;

#[doc(no_inline)]
pub use driver_display::DisplayInfo;
pub use axdriver_display::DisplayInfo;

use axdriver::{prelude::*, AxDeviceContainer};
use axsync::Mutex;
use lazy_init::LazyInit;
use lazyinit::LazyInit;

static MAIN_DISPLAY: LazyInit<Mutex<AxDisplayDevice>> = LazyInit::new();

Expand Down
42 changes: 21 additions & 21 deletions modules/axdriver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,34 @@ documentation = "https://arceos-org.github.io/arceos/axdriver/index.html"
[features]
dyn = []
bus-mmio = []
bus-pci = ["dep:driver_pci", "dep:axhal", "dep:axconfig"]
net = ["driver_net"]
block = ["driver_block"]
display = ["driver_display"]
bus-pci = ["dep:axdriver_pci", "dep:axhal", "dep:axconfig"]
net = ["axdriver_net"]
block = ["axdriver_block"]
display = ["axdriver_display"]

# Enabled by features `virtio-*`
virtio = ["driver_virtio", "dep:axalloc", "dep:axhal", "dep:axconfig"]
virtio = ["axdriver_virtio", "dep:axalloc", "dep:axhal", "dep:axconfig"]

# various types of drivers
virtio-blk = ["block", "virtio", "driver_virtio/block"]
virtio-net = ["net", "virtio", "driver_virtio/net"]
virtio-gpu = ["display", "virtio", "driver_virtio/gpu"]
ramdisk = ["block", "driver_block/ramdisk"]
bcm2835-sdhci = ["block", "driver_block/bcm2835-sdhci"]
ixgbe = ["net", "driver_net/ixgbe", "dep:axalloc", "dep:axhal"]
# more devices example: e1000 = ["net", "driver_net/e1000"]
virtio-blk = ["block", "virtio", "axdriver_virtio/block"]
virtio-net = ["net", "virtio", "axdriver_virtio/net"]
virtio-gpu = ["display", "virtio", "axdriver_virtio/gpu"]
ramdisk = ["block", "axdriver_block/ramdisk"]
bcm2835-sdhci = ["block", "axdriver_block/bcm2835-sdhci"]
ixgbe = ["net", "axdriver_net/ixgbe", "dep:axalloc", "dep:axhal"]
# more devices example: e1000 = ["net", "axdriver_net/e1000"]

default = ["bus-mmio"]

[dependencies]
log = "0.4"
cfg-if = "1.0"
driver_common = { path = "../../crates/driver_common" }
driver_block = { path = "../../crates/driver_block", optional = true }
driver_net = { path = "../../crates/driver_net", optional = true }
driver_display = { path = "../../crates/driver_display", optional = true }
driver_pci = { path = "../../crates/driver_pci", optional = true }
driver_virtio = { path = "../../crates/driver_virtio", optional = true }
axalloc = { path = "../axalloc", optional = true }
axhal = { path = "../axhal", optional = true }
axconfig = { path = "../axconfig", optional = true }
axdriver_base = { git = "https://github.com/arceos-org/axdriver_crates.git", tag = "v0.1.0" }
axdriver_block = { git = "https://github.com/arceos-org/axdriver_crates.git", tag = "v0.1.0", optional = true }
axdriver_net = { git = "https://github.com/arceos-org/axdriver_crates.git", tag = "v0.1.0", optional = true }
axdriver_display = { git = "https://github.com/arceos-org/axdriver_crates.git", tag = "v0.1.0", optional = true }
axdriver_pci = { git = "https://github.com/arceos-org/axdriver_crates.git", tag = "v0.1.0", optional = true }
axdriver_virtio = { git = "https://github.com/arceos-org/axdriver_crates.git", tag = "v0.1.0", optional = true }
axalloc = { workspace = true, optional = true }
axhal = { workspace = true, optional = true }
axconfig = { workspace = true, optional = true }
4 changes: 2 additions & 2 deletions modules/axdriver/src/bus/pci.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::{prelude::*, AllDevices};
use axhal::mem::phys_to_virt;
use driver_pci::{
use axdriver_pci::{
BarInfo, Cam, Command, DeviceFunction, HeaderType, MemoryBarType, PciRangeAllocator, PciRoot,
};
use axhal::mem::phys_to_virt;

const PCI_BAR_NUM: u8 = 6;

Expand Down
Loading

0 comments on commit 7dec406

Please sign in to comment.