Skip to content

Commit 27d1a2b

Browse files
committed
review feedback
1 parent 71c43d5 commit 27d1a2b

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/viam/sdk/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ target_sources(viamsdk
132132
rpc/dial.cpp
133133
rpc/server.cpp
134134
rpc/private/viam_grpc_channel.cpp
135-
rpc/private/viam_rust_utils_stubs.cpp
136135
services/discovery.cpp
137136
services/generic.cpp
138137
services/mlmodel.cpp
@@ -267,11 +266,15 @@ target_link_libraries(viamsdk
267266
PRIVATE Threads::Threads
268267
)
269268

270-
# TODO(RSDK-10366): Currently, rust_utils is not published for windows, so don't link to it.
269+
# TODO(RSDK-10366): Currently, rust_utils is not published for
270+
# windows, so don't link to it. Instead, link a stub implementation
271+
# that just calls `abort`.
271272
if (NOT WIN32)
272273
target_link_libraries(viamsdk
273274
PRIVATE viam_rust_utils
274275
)
276+
else()
277+
target_sources(viamsdk PRIVATE rpc/private/viam_rust_utils_stubs.cpp)
275278
endif()
276279

277280
if (APPLE)

src/viam/sdk/rpc/private/viam_rust_utils_stubs.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
#include <cstdlib>
44

5-
// TODO(RSDK-10366): Currently, rust_utils is not published for windows
6-
// so we just implement the associated entry points as `abort`.
7-
#ifdef _WIN32
85
void* init_rust_runtime() {
96
abort();
107
}
@@ -20,4 +17,3 @@ void free_string(const char*) {
2017
char* dial(const char*, const char*, const char*, const char*, bool, float, void*) {
2118
abort();
2219
}
23-
#endif

0 commit comments

Comments
 (0)