diff --git a/.claude/shared b/.claude/shared index fb49dae48b..763fb4c986 160000 --- a/.claude/shared +++ b/.claude/shared @@ -1 +1 @@ -Subproject commit fb49dae48b8c2b756fbe9f0f2f7f5ca01e72febd +Subproject commit 763fb4c9865a0625716de8cde80d4af1b5edcef7 diff --git a/quest/m1/README.md b/quest/m1/README.md index b97087b518..a58dc8767e 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -143,6 +143,7 @@ transport, benchmark tooling); worktrees isolate commits, not semantics. - [Kotlin JVM exit](/quest/m1/kt-jvm-exit.md) - a Kotlin/JVM program exits cleanly whatever the moq-ffi runtime thread is doing, like Python does since #3766 - [Dart publish](/quest/m1/dart-publish.md) - the packages are built and dry-run clean but exist nowhere consumers can install from - [Dart codec parity](/quest/m1/dart-codecs.md) - Dart is the one binding that cannot originate media +- [libmoq CMake library](/quest/m1/libmoq-cmake-lib.md) - the in-tree CMake build links the `libmoq.a` cargo reports, not a hardcoded `target/` path - [libmoq fetch](/quest/m1/libmoq-fetch.md) - libmoq gains an additive cached-group fetch entry point - [moq-mux on wasm32](/quest/m1/mux-wasm-target.md) - the crate's two wasm blockers are fixed and the target stays in the clippy lane - [#2850](/quest/m1/2850-js-net-give-reader-a-synchronous-decode-so-the-publisher.md) - js/net: decode messages synchronously from buffered bytes and delete the publisher read-ahead queue diff --git a/quest/m1/libmoq-cmake-lib.md b/quest/m1/libmoq-cmake-lib.md new file mode 100644 index 0000000000..ba5caa3103 --- /dev/null +++ b/quest/m1/libmoq-cmake-lib.md @@ -0,0 +1,27 @@ +# [XS] libmoq CMake finds the library cargo built + +## Goal + +`rs/libmoq/CMakeLists.txt` links the static library cargo actually produced, +whatever `CARGO_TARGET_DIR`, `--target` triple, or profile the build uses. +Today `BUILD_RUST_LIB` assumes `target//libmoq.a`, so any other +layout links a stale library or fails to find one. + +## Plan + +- `cmake/cargo-build.cmake` already parses cargo's JSON messages to find + `moq.h` in its hashed `OUT_DIR`. Read the libmoq `compiler-artifact` + message's staticlib filename from the same output and copy it beside the + header in the CMake binary dir, `ONLY_IF_DIFFERENT`. `RUST_LIB` then points + there. Chosen over forcing `--target-dir` into the build dir, which loses + the shared workspace cache, and over `cargo metadata`, which still guesses + the triple and profile subdirectories. +- The `BUILD_RUST_LIB=OFF` prebuilt path is unchanged. +- Regression test in CI: the existing `cpp/obs` build against `MOQ_LOCAL` + runs with `CARGO_TARGET_DIR` outside `target/`, so a hardcoded path fails + the build. Update `rs/libmoq/README.md` and `doc/lib/c` if they describe + the path. + +## Related + +- [libmoq shutdown](/quest/m1/libmoq-shutdown.md) - the other libmoq packaging fix OBS needs