Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ReadOnlySpan<byte> input for Disassemble #26

Open
darkf opened this issue May 29, 2019 · 3 comments · May be fixed by #44
Open

Support ReadOnlySpan<byte> input for Disassemble #26

darkf opened this issue May 29, 2019 · 3 comments · May be fixed by #44
Assignees

Comments

@darkf
Copy link

darkf commented May 29, 2019

It would let us use memory from anywhere (including other native pointers) and Span<byte>s without copying to a byte[] array. It makes it more in-line with the standard library which often supports both, too.

@9ee1 9ee1 self-assigned this May 29, 2019
@9ee1
Copy link
Owner

9ee1 commented May 29, 2019

Hello. ReadOnlySpan<T> is only supported on .NET Core right now. It is not supported on .NET Standard, which is the target framework the library currently targets when it compiles. I would either have to add .NET Core as an extra target framework and conditionally compile an overload that accepts a ReadOnlySpan<T> as an argument or wait until .NET Standard 2.1 is released, which will support ReadOnlySpan<T>. Let me explore those options and get back to you.

@9ee1 9ee1 added this to the Capstone.NET 2.1.0 milestone May 29, 2019
@9ee1 9ee1 removed this from the Capstone.NET 2.1.0 milestone Sep 29, 2022
@ds5678
Copy link
Contributor

ds5678 commented Dec 14, 2023

The System.Memory package backports it to .NET Standard, so conditional compilation would be unnecessary.

https://www.nuget.org/packages/System.Memory/#supportedframeworks-body-tab

@ds5678
Copy link
Contributor

ds5678 commented Dec 14, 2023

I took a brief look into the issue, and the use of delegates seems to be the primary barrier to ReadOnlySpan<byte> support.

@ds5678 ds5678 linked a pull request Dec 14, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants