Skip to content

Commit b1e8526

Browse files
committed
fix unix://, another arch fix
1 parent 11e56e9 commit b1e8526

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,20 +281,30 @@ elseif(NOT WIN32 OR rust_utils_supported_windows_arch) # TODO(RSDK-10366): Curre
281281
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
282282
set(lvru_system_name "macosx")
283283
endif()
284+
284285
set(lvru_system_processor ${CMAKE_SYSTEM_PROCESSOR})
285286
if (WIN32 AND rust_utils_supported_windows_arch)
287+
message(WARNING "windows and rust-utils-supported architecture is true")
286288
set(lvru_system_processor "x86_64")
287289
endif()
290+
message(WARNING "system processor is ${lvru_system_processor}")
291+
292+
set(shared_library_prefix CMAKE_SHARED_LIBRARY_PREFIX)
293+
if (WIN32)
294+
set(shared_library_prefix "lib")
295+
endif()
296+
288297
file(
289298
DOWNLOAD
290-
https://github.com/viamrobotics/rust-utils/releases/latest/download/${CMAKE_SHARED_LIBRARY_PREFIX}viam_rust_utils-${lvru_system_name}_${lvru_system_processor}${CMAKE_STATIC_LIBRARY_SUFFIX}
299+
https://github.com/viamrobotics/rust-utils/releases/latest/download/${shared_library_prefix}viam_rust_utils-${lvru_system_name}_${lvru_system_processor}${CMAKE_STATIC_LIBRARY_SUFFIX}
291300
${viam_rust_utils_file}
292301
STATUS lvru_status
293302
)
294303
list(GET lvru_status 0 lvru_status_code)
295304
list(GET lvru_status 1 lvru_status_string)
296305

297306
if(NOT lvru_status_code EQUAL 0)
307+
message(WARNING "We aren't trying to get rust-utils for some reason. Win32? ${WIN32}. system processor? ${lvru_system_processor}")
298308
message(FATAL_ERROR "No local viam_rust_utils found and failed to download: ${lvru_status_string}")
299309
endif()
300310
else()

src/viam/examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ char *path = dial("<your robot uri here>", "<your authentication type>", "<your
5656
Then to obtain a robot client do :
5757

5858
``` c++
59-
std::string address("unix://");
59+
std::string address("unix:");
6060
address += path;
6161
RobotServiceClient client(grpc::CreateChannel(address, grpc::InsecureChannelCredentials()));
6262
```

src/viam/sdk/robot/client.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ std::shared_ptr<RobotClient> RobotClient::at_address(const std::string& address,
317317

318318
std::shared_ptr<RobotClient> RobotClient::at_local_socket(const std::string& address,
319319
const Options& options) {
320-
const std::string addr = "unix://" + address;
320+
const std::string addr = "unix:" + address;
321321
const char* uri = addr.c_str();
322322
const std::shared_ptr<grpc::Channel> channel =
323323
sdk::impl::create_viam_channel(uri, grpc::InsecureChannelCredentials());

src/viam/sdk/robot/client.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class RobotClient {
7777
/// @brief Creates a robot client connected to the robot at the provided local socket.
7878
/// @param address The local socket of the robot (a .sock file, etc.).
7979
/// @param options Options for connecting and refreshing.
80-
/// Creates a direct connection to the robot using the `unix://` scheme.
80+
/// Creates a direct connection to the robot using the `unix:` scheme.
8181
/// Only useful for connecting to robots across Unix sockets.
8282
static std::shared_ptr<RobotClient> at_local_socket(const std::string& address,
8383
const Options& options);

0 commit comments

Comments
 (0)