Currently, compiling the project relies heavily on the cmake, rendering
CMakeLists.txt so large. That's not so friendly for starters to play with it.
It would be nice if the the CMakeLists.txt is slimmed down, delegating part of
its job to cargo workspaces, which would make the CMakeLists.txt easier to
understand.
Therefore comes the proposal of arranging the project structure as follows
(only `examples`, `services` folders is of interest)
```text
|-teaclave
|-...
|-examples // A CARGO WORKSPACE
|-CMakeLists.txt // passing env variables to help building examples
|-Cargo.toml // just list the examples of interest, and exclude any
dislikes
|-...
|-services
|-apps // A CARGO WORKSPACE, gathering all untrusted applications
driven by enclaves
|-CMakeLists.txt // passing env variables to help building apps
|-Cargo.toml // lists all apps
|-access_control // the app part of the access control service
|-authentication // the app part of the authentication service
|-execution // the app part of the execution service
|-frontend // the app part of frontend service
|-management // the app part of the management service
|-scheduler // the app part of the scheduler service
|-storage // the app part of the storage service
|-enclaves // A CARGO WORKSPACE, gathering all trusted enclaves
|-CMakeLists.txt // passing env variables to help building enclaves
|-Cargo.toml // lists all enclaves
|-access_control // the enclave part of the access control
service
|-authentication // the enclave part of the authentication
service
|-execution // the enclave part of the execution service
|-frontend // the enclave part of frontend service
|-management // the enclave part of the management service
|-scheduler // the enclave part of the scheduler service
|-storage // the enclave part of the storage service
```
Pro:
- Crates serving similar functions are categorized into the same workspace
- It's clear to see the trusted and untrusted parts
- The utility cmake function like `add_cargo_build_target` can be removed
- Some utility scripts such as `setup_cmake_tomls` and `parse_cargo_package.py`
can be removed
- The Cargo.*.toml in cmake/tomls designated for the virtual cargo workspaces
now go into the actual
place, rather than the ones built indirectly by cmake
- Delegating some jobs from cmake to cargo should make the CMakeLists.txt not
so large, which is
good for guys interested to dig into the project
Just some personal ideas ~
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/236