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

feat(syswall): Adding syswall capability to wazero #56

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

ritesh089
Copy link
Contributor

Today, when users use the time package in wapc, an incorrect timestamp is returned.
This PR provides the option to use Syswall.

@pkedy
Copy link
Member

pkedy commented Sep 29, 2023

Hi @ritesh089 and thanks for another PR!

waPC was created before WASI really existed. I'm thinking access to time and rand are benign and should instead be allowed by default. Things like FS access is more sensitive and would need special (but that is beside the point). Why not use this for the wazero config and remove the wazero-specific setting in engine.go?

		WithRandSource(rand.Reader).
		WithSysNanosleep().
		WithSysNanotime().
		WithSysWalltime()

@ritesh089
Copy link
Contributor Author

I agree . Updated the PR . Please let me know if I need to make any additional changes on this.

Copy link
Member

@pkedy pkedy left a comment

Choose a reason for hiding this comment

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

LGTM

@pkedy pkedy merged commit 89be944 into wapc:master Sep 29, 2023
2 checks passed
@pkedy
Copy link
Member

pkedy commented Sep 29, 2023

@ritesh089 released your recent PRs as v0.6.2. Enjoy!

https://github.com/wapc/wapc-go/releases/tag/v0.6.2

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