diff --git a/crates/rerun_c/src/lib.rs b/crates/rerun_c/src/lib.rs index 5a8f56cb70afc..e814a9dd530c2 100644 --- a/crates/rerun_c/src/lib.rs +++ b/crates/rerun_c/src/lib.rs @@ -740,7 +740,6 @@ fn rr_log_file_from_path_impl( let entity_path_prefix = entity_path_prefix.as_str("entity_path_prefix").ok(); stream - // TODO(cmc): expose settings .log_file_from_path(filepath, entity_path_prefix.map(Into::into), timeless) .map_err(|err| { CError::new( @@ -782,7 +781,6 @@ fn rr_log_file_from_contents_impl( let entity_path_prefix = entity_path_prefix.as_str("entity_path_prefix").ok(); stream - // TODO(cmc): expose settings .log_file_from_contents( filepath, std::borrow::Cow::Borrowed(contents), diff --git a/examples/cpp/external_data_loader/main.cpp b/examples/cpp/external_data_loader/main.cpp index efefe9ae3e8e9..286e4d9f739c3 100644 --- a/examples/cpp/external_data_loader/main.cpp +++ b/examples/cpp/external_data_loader/main.cpp @@ -16,7 +16,7 @@ void set_time_from_args(const rerun::RecordingStream& rec, cxxopts::ParseResult& auto pos = time_str.find('='); if (pos != std::string::npos) { auto timeline_name = time_str.substr(0, pos); - int64_t time = std::stoi(time_str.substr(pos + 1)); + int64_t time = std::stol(time_str.substr(pos + 1)); rec.set_time_seconds(timeline_name, time); } } @@ -28,7 +28,7 @@ void set_time_from_args(const rerun::RecordingStream& rec, cxxopts::ParseResult& auto pos = sequence_str.find('='); if (pos != std::string::npos) { auto timeline_name = sequence_str.substr(0, pos); - int64_t sequence = std::stoi(sequence_str.substr(pos + 1)); + int64_t sequence = std::stol(sequence_str.substr(pos + 1)); rec.set_time_sequence(timeline_name, sequence); } } @@ -100,18 +100,26 @@ file with Rerun (`rerun file.cpp`). std::string text = "## Some C++ code\n```cpp\n" + body.str() + "\n```\n"; + auto application_id = std::string_view("rerun_example_external_data_loader"); + if (args.count("application-id")) { + application_id = args["application-id"].as(); + } auto recording_id = std::string_view(); if (args.count("recording-id")) { recording_id = args["recording-id"].as(); } - const auto rec = rerun::RecordingStream("rerun_example_external_data_loader", recording_id); + const auto rec = rerun::RecordingStream(application_id, recording_id); // The most important part of this: log to standard output so the Rerun Viewer can ingest it! rec.to_stdout().exit_on_failure(); set_time_from_args(rec, args); + auto entity_path = std::string(filepath); + if (args.count("entity-path-prefix")) { + entity_path = args["entity-path-prefix"].as() + "/" + filepath; + } rec.log_with_timeless( - filepath, + entity_path, args["timeless"].as(), rerun::TextDocument(text).with_media_type(rerun::MediaType::markdown()) );