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

Demo usage of C# with DotNet8 #450

Merged
merged 1 commit into from
Jul 31, 2024
Merged

Conversation

andreaTP
Copy link
Collaborator

@andreaTP andreaTP commented Jul 30, 2024

C# it's a single Wasi function away 🙂

(the size of the resulting binary is huge ...)

@andreaTP andreaTP requested review from electrum and bhelx July 30, 2024 12:22
Memory memory = instance.memory();
switch (clockId) {
case WasiClockId.REALTIME:
memory.writeLong(resultPtr, 1L);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have done some reading, but I cannot come up with anything better than "just use 1" ...
I'm open to suggestions!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine to me.

@andreaTP
Copy link
Collaborator Author

(the size of the resulting binary is huge ...)

added a bunch of trimming options and now looks better.

Copy link
Collaborator

@electrum electrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

Memory memory = instance.memory();
switch (clockId) {
case WasiClockId.REALTIME:
memory.writeLong(resultPtr, 1L);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine to me.

@andreaTP andreaTP merged commit ee226c3 into dylibso:main Jul 31, 2024
13 checks passed
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

Successfully merging this pull request may close these issues.

2 participants