binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

impl rust Collaboration and Remote API

Open rbran opened this issue 1 year ago • 1 comments

Unimplemented and other notes:

  • BNRemoteFileDownload - Returns the c++ std::vector from the core API, but don't provide any way to free it.
  • BNCollaborationSnapshotDownloadSnapshotFile - Returns the c++ std::vector from the core API, but don't provide any way to free it.
  • BNRemoteRequest - Parameters are complex c++ types, and no direct way to manage it.
  • BNAnalysisMergeConflictGetPathItem - Implementation with downcast to u64 is unclear.
  • Remote::connect - Not fully implemented because it depends on enterprise and SecretsProvider.
  • Remote - Methods in python preemptively calls pull_files/pull_folders/pull_user_permissions/open, but C++ don't. Python was followed.
  • RemoteProject::upload_new_file - Was ported from remotebrowser.cpp, this file is not public, so I decided not to implement it.

rbran avatar Jul 19 '24 17:07 rbran

It's probably better to leave Result<T, ()> for now, because it's very likely that an Error type will be implemented and it will be replaced byResult<T, BnError> .

Although it's not ideal, it's the current API behavior: https://github.com/Vector35/binaryninja-api/blob/04b58f9cbcc4c4f6bb75ddb13225c2dcfb3d989e/rust/src/metadata.rs#L284

rbran avatar Jul 19 '24 19:07 rbran

This PR was merged with the rust refactor, https://github.com/Vector35/binaryninja-api/commit/6a63c17853009ce7a0071458e39c140a09440230. Thank you @rbran!

emesare avatar Jan 25 '25 06:01 emesare