summaryrefslogtreecommitdiff
path: root/rust/src
AgeCommit message (Collapse)Author
2025-05-12[Rust] Improve `FileAccessor`Mason Reed
- Add unit tests - Expose read/write functionality - Add some much needed documentation when passing to memory map
2025-05-12[Rust] Metadata API improvementsMason Reed
- Don't use Result for some or none values - Fix freeing of key value store objects - Improve ergonomics a little bit - Add unit tests
2025-05-12[Rust] Construct a `SectionBuilder` from a `Section`Mason Reed
2025-05-12[Rust] Correct impls for `Section`Mason Reed
Previously we were comparing the section raw pointer and hashing it
2025-05-12[Rust] Retain core string for section stringsMason Reed
Might want to key off the section string in the core, so we should give it back as a `BnString`
2025-05-12[Rust] Reduce usage of `IntoCStr` in function signaturesMason Reed
This is being done to reduce complexity in function signatures, specifically many of the strings we are passing ultimately should be new types themselves instead of "just strings", things such as type ids. Another place which was confusing was dealing with filesystem related APIs, this commit turns most of those params into a stricter `Path` type. This is bringing the rust api more inline with both python and C++, where the wrapper eagerly converts the string into the languages standard string type. Special consideration must be made for symbols or other possible non utf-8 objects. This commit will be followed up with one that adds the `IntoCStr` bound on API's we want to keep as invalid utf-8 so we can for example, get section by name on a section with invalid utf-8.
2025-05-12[Rust] Rename `AsCStr` to `IntoCStr`Mason Reed
2025-05-12[Rust] Misc clippy lintsMason Reed
2025-05-12[Rust] More cleanup regarding `BnString`Mason Reed
- Removed `to_string` shortcut from `BnString`. - Misc formatting
2025-05-12[Rust] Make `Section::name` return `BnString`Mason Reed
Section names come from the binary itself, we want to preserve the name as is
2025-05-12[Rust] Simplify usage surrounding c stringsMason Reed
`cstring.as_ref().as_ptr() as *const c_char` -> `cstring.as_ptr()` `cstring.as_ref().as_ptr() as *mut _` -> `cstring.as_ptr()` `cstring.as_ptr() as *const c_char` -> `cstring.as_ptr()` With a few fixes for cstrings that might be dropped prematurely.
2025-05-12[Rust] Simplify `BnStrCompatible` traitMason Reed
Followup to https://github.com/Vector35/binaryninja-api/pull/5897/ This simplifies usage of the trait in user code, should just be able to `to_cstr` to get the cstr repr and then call `as_ptr`. Co-authored-by: Michael Krasnitski <michael.krasnitski@gmail.com>
2025-05-12[Rust] Simplify enterprise initializationMason Reed
We don't need to introduce extra global state when the goal is to not release floating licenses in shutdown.
2025-05-12[Rust] Misc clippy lintsMason Reed
2025-05-12[Rust] More cleanupMason Reed
2025-05-12[Rust] Remove unused fileMason Reed
2025-05-12[Rust] Return `String` instead of `BnString` for cases where lossy ↵Mason Reed
conversion can be tolerated Still need to go and audit all usage, but realistically the most important places to give the user control are with symbols, where the data can come from non utf8 sources This is still incomplete, I just looked for usage of -> BnString so any other variant was omitted.
2025-05-12[Rust] Remove Architecture trait bound on LLIL related structuresMason Reed
2025-05-12[Rust] Pretty print LLIL sub expressionsMason Reed
2025-05-07[Rust] Add Function::variable_typeMark Rowe
2025-05-04[Rust] Fix a pre-existing formatting issueMark Rowe
CI is complaining about it.
2025-05-04[Rust] Avoid leaking a reference within {Medium,High}LevelILFunction::ssa_formMark Rowe
Return a Ref<_> so that the underlying core object will have its reference count decremented when the caller drops the object.
2025-04-29Fix memory leak in when calling `Metadata::get_value_store` in Rust APIMason Reed
Forgot to free the `BNMetadataValueStore` object returned by core
2025-04-26Misc rust formattingMason Reed
2025-04-26Add generate_ssa_form to LowLevelILFunctionMark Rowe
2025-04-25std::function<bool(size_t,size_t)> ==> ProgressFunctionGlenn Smith
2025-04-23Add Function::Analyze API to perform on-demand function analysis.Brian Potchik
2025-04-10Fix function type construction leaking in Rust APIMason Reed
2025-04-08Misc rust formattingMason Reed
2025-04-08Fix workflow Rust API not returning refcounted objectsMason Reed
IDK why this was not done prior, leaking the returned core activity and workflow object.
2025-04-01Rust: Better support for floating licensesGlenn Smith
2025-03-28belated copyright year updateJordan Wiens
2025-03-19Fix possible double free with platform recognizer in Rust APIMason Reed
2025-03-10Add missing nullptr check for `cb_free_type_list` in Rust APIMason Reed
2025-03-06Add API to insert Activities after a specified Activity.Brian Potchik
2025-02-25Misc Rust formattingMason Reed
2025-02-25Check for enterprise keychain environment variable in Rust ↵Mason Reed
`headless::license_location` We also likely need to check the _actual_ keychain (not the environment variable) later.
2025-02-25Fix misc rust doc testMason Reed
2025-02-25Make `register_platform_recognizer` return by ref in Rust APIMason Reed
2025-02-25Fix BnString usage of `as_ref` instead of `as_str`Mason Reed
Fixes `BnString::len` and `BnString::is_empty` incorrectly reporting 1 and true on empty null terminated string.
2025-02-24Remove `is_floating_point` from `Type` impl DebugMason Reed
It is unnecessary
2025-02-24Add SVD Loader PluginMason Reed
2025-02-24Fix default scope for settings QueryOptions in Rust APIMason Reed
2025-02-24Add `BinaryViewExt::comment_at` and `BinaryViewExt::set_comment_at`Mason Reed
How did we not have this before?
2025-02-24Implement Rust MemoryMapMason Reed
Also split out SegmentFlags and fix some UB with the section creation
2025-02-24Add platform recognizer to Rust APIMason Reed
2025-02-18Remove function from Debug impl of MediumLevelILLiftedInstruction in Rust APIMason Reed
Causing unneeded noise in the debug print
2025-02-18Fix the lifted GotoLabel in Rust printing the function in Debug implMason Reed
This was causing a lot of extra noise, where the function is kept just to ref for the tag name
2025-02-18Fix Rust TagReference incorrectly holding a Tag referenceMason Reed
This caused a crash when a user called function.tags() on a function with tags
2025-02-17Fix misc Rust formattingMason Reed