Skip to content
This repository was archived by the owner on Feb 27, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ strip = "debuginfo"
codegen-units = 1
panic = "abort"

[features]
salustsm = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are separate binary targets, do we still need a feature flag? If we want a feature flag + separate binary targets, is there a way to automatically set the feature based on which binary we're building?

Also some bikeshedding: I feel like "tsm_only" is a better name than "salustsm", as it's more obvious what the flag is doing (stripping out the non-TSM components).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feature flags can be enabled by default, but it does require the flag to be defined AFAIK. The nomenclature was arbitrary, so perhaps, we can just see what feels best in the channel.


[[bin]]
name = "salus-tsm"
path = "src/salus_tsm.rs"
required-features = ["salustsm"]

[[bin]]
name = "salus"
path = "src/main.rs"
Comment on lines +18 to +23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of main.rs and salus_tsm.rs, can we put main in both names so that it's obvious that they're both the "main" modules of their respective binaries?


[dependencies]
arrayvec = { version = "0.7.2", default-features = false }
assertions = { path = "./assertions" }
Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,17 @@ guestvm:
tellus: guestvm
cargo build $(CARGO_FLAGS) --package test_workloads --bin tellus --release

.PHONY: salus_tsm
salus_tsm:
cargo build $(CARGO_FLAGS) --release --bin salus-tsm --features="salustsm"

# Runnable targets:
#
# run_tellus_gdb: Run Tellus as the host VM with GDB debugging enabled.
# run_tellus: Run Tellus as the host VM.
# run_linux: Run a bare Linux kernel as the host VM.
# run_debian: Run a Linux kernel as the host VM with a Debian rootfs.
# run_salus_tsm: Runs the Salus-TSM binary (currently a stub).

run_tellus_gdb: tellus_bin salus_debug
$(QEMU_BIN) \
Expand Down Expand Up @@ -141,6 +146,12 @@ run_debian: salus
-device e1000e,netdev=usernet \
$(EXTRA_QEMU_ARGS)

run_salus_tsm: salus_tsm
$(QEMU_BIN) \
$(MACH_ARGS) \
-kernel $(RELEASE_BINS)salus-tsm \
$(EXTRA_QEMU_ARGS)
Comment on lines +149 to +153
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have an internal discussion about how this Makefile target is expected to be used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure..will add this and the below to the thread.


.PHONY: lint
lint:
cargo clippy -- -D warnings -Wmissing-docs
Expand Down
Loading