Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the build system to statically link libchat directly into liblogoschat.so, eliminating the need for dynamic linking. The changes move library path configuration from nimble tasks into Makefile and Nix files, and standardize naming by renaming librln to librlnDrv.
Changes:
- Static linking of liblibchat.a instead of dynamic linking
- Removal of CONVERSATIONS_LIB environment variable and runtime library path handling
- Renaming of librln to librlnDrv for consistency with libchatDrv naming convention
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| vendor/libchat | Updates submodule to version that supports static linking |
| nix/shell.nix | Removes CONVERSATIONS_LIB environment variable setup |
| nix/default.nix | Adds static library linking flags and removes dynamic library path configuration |
| flake.nix | Renames librln to librlnDrv for consistency |
| Makefile | Adds static library linking and multiple definition handling for tests and liblogoschat targets |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I don't see any blockers for this, except the make build doesn't work. Out of curiosity Is Nix replacing the Makefile or will they live in parallel? |
e02a98b to
e98b1ac
Compare
jazzz
left a comment
There was a problem hiding this comment.
Clearing the path for this.
Once tests are working I don't see any issues with this
f933197 to
b5069cf
Compare
@jazzz The approach has changed, see updated description, please re-review 🙏 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 11 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
84918d0 to
62cb08f
Compare
62cb08f to
f5aa1a7
Compare
| @@ -0,0 +1,12 @@ | |||
| [package] | |||
| name = "rust-bundle" | |||
There was a problem hiding this comment.
| name = "rust-bundle" | |
| name = "logos-chat-rust-bundle" |
rust-bundle/Cargo.toml
Outdated
| edition = "2024" | ||
|
|
||
| [lib] | ||
| name = "rust_bundle" |
There was a problem hiding this comment.
| name = "rust_bundle" | |
| name = "logos_chat_rust_bundle" |
igor-sirotin
left a comment
There was a problem hiding this comment.
Ah it's a static linking, sot the library name is internal, I don't care then
f5aa1a7 to
1dd30d0
Compare
Add rust-bundle, a single staticlib crate that depends on both libchat and rln as rlibs. This ensures rustc links Rust std exactly once, eliminating duplicate symbol errors on all platforms. Nim targets link against liblogos_chat_bundle.a; Nix uses a bundleDrv instead of separate libchat and rln derivations. Reference: https://doc.rust-lang.org/reference/linkage.html#mixed-rust-and-foreign-codebases
1dd30d0 to
274e5c0
Compare
Add rust-bundle, a single staticlib crate that depends on both libchat
and rln as rlibs. This ensures rustc links Rust std exactly once,
eliminating duplicate symbol errors on all platforms. Nim targets link
against liblogos_chat_bundle.a; Nix uses a bundleDrv instead of
separate libchat and rln derivations.
Reference: https://doc.rust-lang.org/reference/linkage.html#mixed-rust-and-foreign-codebases
Requires: logos-messaging/libchat#61