Merge #284
284: Move `libtock_platform` and `libtock_runtime` out of `core/`. r=hudson-ayers a=jrvanwhy
`libtock_platform` was originally built in `core/` because I intended to replace `libtock_core`'s modules one-by-one with replacements built on `libtock_platform`. However, this plan changed when we decided to build the new `libtock-rs` directly against Tock 2.0 rather than Tock 1.0, as that made `libtock_core` and `libtock_platform` fundamentally incompatible.
Instead, these crates should be in the root of the repository. When we remove Tock 1.0 support from `libtock-rs`, we will remove the `core/` directory entirely.
To make this change, I did:
1. `git mv core/platform .`
2. `git mv core/runtime .`
3. Remove `core/` from the crate paths in `./Cargo.toml`
4. Remove the `libtock_platform` dependency from `core/Cargo.toml`
Co-authored-by: Johnathan Van Why <jrvanwhy@google.com>
diff --git a/Cargo.toml b/Cargo.toml
index 4e2df4b..70200fd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -86,8 +86,8 @@
members = [
"codegen",
"core",
- "core/platform",
- "core/runtime",
+ "platform",
+ "runtime",
"test_runner",
"tools/print_sizes",
]
diff --git a/core/Cargo.toml b/core/Cargo.toml
index c6dec5e..4198573 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -18,4 +18,3 @@
[dependencies]
libtock_codegen = { path = "../codegen" }
-libtock_platform = { path = "platform" }
diff --git a/core/platform/Cargo.toml b/platform/Cargo.toml
similarity index 100%
rename from core/platform/Cargo.toml
rename to platform/Cargo.toml
diff --git a/core/platform/src/async_traits.rs b/platform/src/async_traits.rs
similarity index 100%
rename from core/platform/src/async_traits.rs
rename to platform/src/async_traits.rs
diff --git a/core/platform/src/command_return.rs b/platform/src/command_return.rs
similarity index 100%
rename from core/platform/src/command_return.rs
rename to platform/src/command_return.rs
diff --git a/core/platform/src/command_return_tests.rs b/platform/src/command_return_tests.rs
similarity index 100%
rename from core/platform/src/command_return_tests.rs
rename to platform/src/command_return_tests.rs
diff --git a/core/platform/src/error_code.rs b/platform/src/error_code.rs
similarity index 100%
rename from core/platform/src/error_code.rs
rename to platform/src/error_code.rs
diff --git a/core/platform/src/lib.rs b/platform/src/lib.rs
similarity index 100%
rename from core/platform/src/lib.rs
rename to platform/src/lib.rs
diff --git a/core/platform/src/raw_syscalls.rs b/platform/src/raw_syscalls.rs
similarity index 100%
rename from core/platform/src/raw_syscalls.rs
rename to platform/src/raw_syscalls.rs
diff --git a/core/platform/src/return_variant.rs b/platform/src/return_variant.rs
similarity index 100%
rename from core/platform/src/return_variant.rs
rename to platform/src/return_variant.rs
diff --git a/core/platform/src/syscalls.rs b/platform/src/syscalls.rs
similarity index 100%
rename from core/platform/src/syscalls.rs
rename to platform/src/syscalls.rs
diff --git a/core/platform/src/syscalls_impl.rs b/platform/src/syscalls_impl.rs
similarity index 100%
rename from core/platform/src/syscalls_impl.rs
rename to platform/src/syscalls_impl.rs
diff --git a/core/platform/src/yield_types.rs b/platform/src/yield_types.rs
similarity index 100%
rename from core/platform/src/yield_types.rs
rename to platform/src/yield_types.rs
diff --git a/core/runtime/Cargo.toml b/runtime/Cargo.toml
similarity index 100%
rename from core/runtime/Cargo.toml
rename to runtime/Cargo.toml
diff --git a/core/runtime/asm/asm_riscv32.S b/runtime/asm/asm_riscv32.S
similarity index 100%
rename from core/runtime/asm/asm_riscv32.S
rename to runtime/asm/asm_riscv32.S
diff --git a/core/runtime/asm/start_prototype.rs b/runtime/asm/start_prototype.rs
similarity index 100%
rename from core/runtime/asm/start_prototype.rs
rename to runtime/asm/start_prototype.rs
diff --git a/core/runtime/build.rs b/runtime/build.rs
similarity index 100%
rename from core/runtime/build.rs
rename to runtime/build.rs
diff --git a/core/runtime/extern_asm.rs b/runtime/extern_asm.rs
similarity index 100%
rename from core/runtime/extern_asm.rs
rename to runtime/extern_asm.rs
diff --git a/core/runtime/layouts/apollo3.ld b/runtime/layouts/apollo3.ld
similarity index 100%
rename from core/runtime/layouts/apollo3.ld
rename to runtime/layouts/apollo3.ld
diff --git a/core/runtime/layouts/hail.ld b/runtime/layouts/hail.ld
similarity index 100%
rename from core/runtime/layouts/hail.ld
rename to runtime/layouts/hail.ld
diff --git a/core/runtime/layouts/hifive1.ld b/runtime/layouts/hifive1.ld
similarity index 100%
rename from core/runtime/layouts/hifive1.ld
rename to runtime/layouts/hifive1.ld
diff --git a/core/runtime/layouts/imxrt1050.ld b/runtime/layouts/imxrt1050.ld
similarity index 100%
rename from core/runtime/layouts/imxrt1050.ld
rename to runtime/layouts/imxrt1050.ld
diff --git a/core/runtime/layouts/msp432.ld b/runtime/layouts/msp432.ld
similarity index 100%
rename from core/runtime/layouts/msp432.ld
rename to runtime/layouts/msp432.ld
diff --git a/core/runtime/layouts/nrf52.ld b/runtime/layouts/nrf52.ld
similarity index 100%
rename from core/runtime/layouts/nrf52.ld
rename to runtime/layouts/nrf52.ld
diff --git a/core/runtime/layouts/nrf52840.ld b/runtime/layouts/nrf52840.ld
similarity index 100%
rename from core/runtime/layouts/nrf52840.ld
rename to runtime/layouts/nrf52840.ld
diff --git a/core/runtime/layouts/nucleo_f429zi.ld b/runtime/layouts/nucleo_f429zi.ld
similarity index 100%
rename from core/runtime/layouts/nucleo_f429zi.ld
rename to runtime/layouts/nucleo_f429zi.ld
diff --git a/core/runtime/layouts/nucleo_f446re.ld b/runtime/layouts/nucleo_f446re.ld
similarity index 100%
rename from core/runtime/layouts/nucleo_f446re.ld
rename to runtime/layouts/nucleo_f446re.ld
diff --git a/core/runtime/layouts/opentitan.ld b/runtime/layouts/opentitan.ld
similarity index 100%
rename from core/runtime/layouts/opentitan.ld
rename to runtime/layouts/opentitan.ld
diff --git a/core/runtime/layouts/stm32f3discovery.ld b/runtime/layouts/stm32f3discovery.ld
similarity index 100%
rename from core/runtime/layouts/stm32f3discovery.ld
rename to runtime/layouts/stm32f3discovery.ld
diff --git a/core/runtime/libtock_layout.ld b/runtime/libtock_layout.ld
similarity index 100%
rename from core/runtime/libtock_layout.ld
rename to runtime/libtock_layout.ld
diff --git a/core/runtime/src/lib.rs b/runtime/src/lib.rs
similarity index 100%
rename from core/runtime/src/lib.rs
rename to runtime/src/lib.rs
diff --git a/core/runtime/src/startup.rs b/runtime/src/startup.rs
similarity index 100%
rename from core/runtime/src/startup.rs
rename to runtime/src/startup.rs
diff --git a/core/runtime/src/syscalls_impl_riscv.rs b/runtime/src/syscalls_impl_riscv.rs
similarity index 100%
rename from core/runtime/src/syscalls_impl_riscv.rs
rename to runtime/src/syscalls_impl_riscv.rs