Use the world SDK for cargo builds and seed it only when missing

This commit is contained in:
Sausage Worker
2026-10-28 08:39:36 +00:00
parent dc81f78c20
commit 9ef73e6bc7
4 changed files with 138 additions and 54 deletions
+7 -2
View File
@@ -516,8 +516,13 @@ builds `/plugins/notes/source/`:
its caller ends (under the normal process stopping deadline).
- A call to `cargo.build` gets a process ID, a folder in `/proc`, and journal
entries, like other calls.
- `/plugins/cargo/sdk/` shows the source of the SDK. The dependency
`sausage-plugin = "0.1"` points to the same files in the host's cache.
- `/plugins/cargo/sdk/` is the SDK used by builds. The dependency
`sausage-plugin = "0.1"` points directly to this folder, including its macros
and interface crate. Edits apply to the next build without a host restart.
- The host seeds a missing SDK folder from its embedded copy at startup or
before a build. An existing folder is never overwritten or repaired, even
after a host upgrade. To reset to the host's bundled SDK, remove the whole
folder; the next startup or build re-seeds it. Back up local edits first.
- Compiled crates stay in the host's cache, outside the world, and all worlds
share them. So a second build compiles only what changed.
- Build scripts can compile C: `CC_wasm32_wasip2` and `AR_wasm32_wasip2`