-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
115 lines (103 loc) · 3.89 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
[package]
name = "kernel"
version = "0.1.0"
edition = "2021"
authors = ["Sxmourai"]
autotests = true
[dependencies]
x86_64 = "0.14.12" # Usefull asm functions, structs (inb outb, enable interrupts & all)
bootloader = { version = "0.9.23", features = [
"map_physical_memory",
] } #"map_physical_memory"
# Some utils data types (mutex's, pointers...)
spin = "0.9.8"
hashbrown = "0.14.3" # A hashmap/hashset/hashset implementation using Swisstable
lazy_static = { version = "1.4.0", features = [
"spin_no_std",
] } # Helps us with static mut's & all
# Async
crossbeam-queue = { version = "0.3.10", default-features = false, features = [
"alloc",
] } # Some useful atomic queues and arrays
futures-util = { version = "0.3.4", default-features = false, features = [
"alloc",
] } # Utils for asyncs, Stream, Futures, async...
pasts = { version = "0.14.3", default-features = false }
# Usefull for parsing hardware infos
pc-keyboard = "0.7.0" # Easy transform from key code to char
pic8259 = "0.10.1" # A PIC implementation, we might not need it when we will have APIC
uart_16550 = "0.3.0" # Talks to qemu
linked_list_allocator = "0.10.5" # A linked list allocator lib & also Heap
raw-cpuid = "11.0.1" # Gets some cpuid infos
ntfs = { version = "0.4.0", default-features = false, optional = true } # A filesystem implementation of ntfs
binrw = { version = "0.11.2", default-features = false, optional = true } # Needed by ntfs
# Random numbers
rand = { version = "0.8.5", features = ["small_rng"], default-features = false }
# Simple features
log = { version = "0.4.20", default-features = false } # Logging facility (not that useful)
bitfield = "0.14.0" # Usefull to create packed structs with same fields
bytemuck = { version = "1.14.1", features = [
"derive",
] } # Very usefull for converting between types (Vec<u8> -> ExtSuperblock)
bit_field = "0.10.2" # Amazing library to read / set bits on u[8,16,32,...]
# Our libs
pci-ids = { git = "https://github.com/Sxmourai/auto-pci-ids.rs.git", optional = true } # Pci ids to discover what is connected via pci
shell_macro = { path = "src/user/shell_macro" }
[package.metadata.bootimage]
run-args = [
"-device",
"isa-debug-exit,iobase=0xf4,iosize=0x04",
"-serial",
"stdio",
# DISKFLAG for build script (see build/disk_create.py)
"-drive", "file=build/fat32-gpt.img,format=raw",
"-drive", "file=build/ext2-gpt.img,format=raw",
# ENDDISKFLAG
# NVMe
# "-drive",
# "file=build/ext2-gpt.img,format=raw,if=none,id=nvm",
# "-device",
# "nvme,serial=deadbeef,drive=nvm",
# Network
# "-net",
# "nic,macaddr=00:11:22:33:44:55,model=e1000",
# "-net","user",
# "-net",
# "dump,file=out.pcap",
# "-netdev",
# "user,id=u1",
# "-device",
# "e1000,netdev=u1",
# "-object",
# "filter-dump,id=f1,netdev=u1,file=dump.pcap",
# "-netdev", "tap,id=mynet0,ifname=tap0,script=no,downscript=no", "-device", "e1000,netdev=mynet0",
# If working on APIC and IPI/SMP: (sets amount of cores to 4)
# Multiprocessing
#TODO When APIC feature automatically set -smp 4
"-smp",
"4",
"-vga", "std"
]
test-args = ["-display", "none"]
test-success-exit-code = 33
test-timeout = 300
[features]
default = ["pci-ids", "fs", "apic"]
pci-ids = ["dep:pci-ids"]
ata = []
fs = ["ata", "dep:ntfs", "dep:binrw"]
apic = []
smp = ["apic"]
[profile.dev.package."*"]
opt-level = "z"
[profile.dev]
opt-level = 0 # Optimize for size
strip = true
# lto = true
panic = "abort" # disable stack unwinding on panic
# https://github.com/johnthagen/min-sized-rust
[profile.release]
opt-level = "z" # Optimize for size
strip = true
lto = true
panic = "abort" # disable stack unwinding on panic