Skip to content

Comments

Move all enclave apps to a single workspace#3892

Merged
conradgrobler merged 4 commits intoproject-oak:mainfrom
conradgrobler:enclave-binaries
Apr 25, 2023
Merged

Move all enclave apps to a single workspace#3892
conradgrobler merged 4 commits intoproject-oak:mainfrom
conradgrobler:enclave-binaries

Conversation

@conradgrobler
Copy link
Collaborator

@conradgrobler conradgrobler commented Apr 21, 2023

Fixes #3889

@tiziano88
Copy link
Collaborator

Can you remind me what stops us from merging even those in the main workspace? If it's just that the cargo config files need to be close to the individual crates, couldn't that be solved by just creating a subfolder (may be enclave_apps as you have here), but part of the main workspace? I think the main change would have to be in xtask so that it knows that those crates will have to be compiled from that subfolder. Or is the problem that even in that case, running cargo build from the root repo would try to compile the enclave apps and fail?

@conradgrobler
Copy link
Collaborator Author

That actually works in the same workspace, as long as it is built from within the project directory and the .cargo/config.toml is in the same direcotory or a parent.

It turns out we can even move the restricted kernel and stage 0 to the same workspace, as long as we specify a different linker script path (it seems that ld looks for the linker script relative to the workspace root).

@tiziano88
Copy link
Collaborator

I want to make sure we can keep running cargo build and cargo test from the root workspace though. Does that still work?

@conradgrobler
Copy link
Collaborator Author

It seems stage0 has linking issues when it is in the same workspace, so I will leave it out for now, but I will move everything else into a single workspace.

@conradgrobler conradgrobler changed the title Move all enclave apps to a single workspace Make everything except stage0 a single Rust workspace Apr 24, 2023
@tiziano88
Copy link
Collaborator

It's fine if we need to do something more in order to actually build those binaries correctly, but the default commands must still at least do something sensible.

@conradgrobler
Copy link
Collaborator Author

I want to make sure we can keep running cargo build and cargo test from the root workspace though. Does that still work?

Ah, no it doesn't. I will revert the last commit.

@conradgrobler conradgrobler changed the title Make everything except stage0 a single Rust workspace Make all enclave binaries a single workspace. Apr 24, 2023
@conradgrobler conradgrobler changed the title Make all enclave binaries a single workspace. Move all enclave apps to a single workspace Apr 24, 2023
@conradgrobler conradgrobler requested a review from tiziano88 April 24, 2023 10:08
@conradgrobler conradgrobler marked this pull request as ready for review April 24, 2023 10:15
@conradgrobler
Copy link
Collaborator Author

It's fine if we need to do something more in order to actually build those binaries correctly, but the default commands must still at least do something sensible.

One option here is to specify the default-members property in the workspace, which would mean that cargo build or cargo test would only run those maked as default member. The downside is that we would have to keep remembering to update this field when we add new packages, otherwise they will not be covered by cargo build and cargo test.

@conradgrobler conradgrobler merged commit ca58cc7 into project-oak:main Apr 25, 2023
@conradgrobler conradgrobler deleted the enclave-binaries branch April 25, 2023 07:15
@github-actions
Copy link

Artifact name: quirk_echo_enclave_app
Artifact digest:

sha256:72871a32424c2cff0de80c52128d6493b7ea7039feb501abd0d88d7700810511 ↑ [ent-store]

Provenance digest:

sha256:bf6b38c5cdec3d605a0ca7814b74fa27cf6e572c3b932f446439b8792baa25e3 ↑ [ent-store]

@github-actions
Copy link

Artifact name: oak_echo_raw_enclave_app
Artifact digest:

sha256:0d46f8a6dc9895092c7ce09097f922f7b46307a85708081e8c0ba98364a9ae18 ↑ [ent-store]

Provenance digest:

sha256:b74968dc8c47dbfd007d04bedd3064045c1d20ce9763381d8d1170c6ea67741f ↑ [ent-store]

@github-actions
Copy link

Artifact name: oak_echo_enclave_app
Artifact digest:

sha256:3b3629027c8326ac99a2e0d6a428e44033d146d992958cad9fe5f2333ab22a91 ↑ [ent-store]

Provenance digest:

sha256:f297c2d12381b6873621ade21261ec0ace1ea3f95325aa39b2edfc3b9cd7df0b ↑ [ent-store]

@github-actions
Copy link

Artifact name: oak_restricted_kernel_bin
Artifact digest:

sha256:aff8bf8aa946d1ceb2630b8ff5069cf8d78910456184b92a5a3df768995f4385 ↑ [ent-store]

Provenance digest:

sha256:e7d93ea95e543f7b556e775035decee4daad4ce673366f10f2f3f8b0fe98445a ↑ [ent-store]

@github-actions
Copy link

Artifact name: stage0
Artifact digest:

sha256:d64917c8fb3c89aecd79487417d6a51d788d033dfbae971c10f5819b21d68a8f ↑ [ent-store]

Provenance digest:

sha256:8f6a77d79ec73ba9190b8d2e38bfb3cd3281f3193895d55ded4fdeeff4925175 ↑ [ent-store]

@github-actions
Copy link

Artifact name: oak_restricted_kernel_simple_io_bin
Artifact digest:

sha256:5375c39051739955f6e13990ab0977648b3f9638247228357de405609f9c678c ↑ [ent-store]

Provenance digest:

sha256:728036a2224ba9d0d0d06582d341a90c2c678616e916b352fa1809d47860b7de ↑ [ent-store]

@github-actions
Copy link

Artifact name: oak_functions_enclave_app
Artifact digest:

sha256:c6ea9bc6d8c282ac8123826e71aec0d473d95bc2efe78173f96aa35e43c15620 ↑ [ent-store]

Provenance digest:

sha256:f89614051262f460e7a9c697321d5a4e24df31a8f24f8bb2b89d4d08bba03dbe ↑ [ent-store]

@github-actions
Copy link

Artifact name: oak_tensorflow_enclave_app
Artifact digest:

sha256:1d73e499c212e6ce0ffcfc1d8a9387c968ad35e1b028294fef1b4586582f262f ↑ [ent-store]

Provenance digest:

sha256:e59fe0cf633a30725fd33dfdfcd92ad0633303bfd829b95e0e7475fe2f36c984 ↑ [ent-store]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move all enclave binaries to a separate workspace

2 participants