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

Does Memory<T> type work for dynamic JS->.NET invocation? #412

Open
james-hu opened this issue Dec 18, 2024 · 1 comment
Open

Does Memory<T> type work for dynamic JS->.NET invocation? #412

james-hu opened this issue Dec 18, 2024 · 1 comment

Comments

@james-hu
Copy link

Based on my experiment, I found it doesn't work, this usage may need code generation. byte[] type works well in dynamic JS->.NET invocations.

It would be good if this can be confirmed.

@jasongin
Copy link
Member

Memory<T> should work, assuming T is a type (such as byte) that is compatible with JS typed-arrays; there are some test cases for it in TestCases/napi-dotnet/collections.js

Can you share some code snippets showing what you are trying to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants