-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat(wasip3): implement wasi:filesystem
#11406
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
base: main
Are you sure you want to change the base?
feat(wasip3): implement wasi:filesystem
#11406
Conversation
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
for consistency with refactors for sockets Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
0d0e2b7
to
e8f3f0c
Compare
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
e8f3f0c
to
103ab41
Compare
if !file.perms.contains(FilePerms::READ) { | ||
return Err(types::ErrorCode::NotPermitted.into()); | ||
} | ||
bail!("TODO: read_via_stream") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mind filing an issue for this if the intention is to leave this before landing?
FutureReader<Result<(), ErrorCode>>, | ||
)> { | ||
let dir = store.get_dir(&fd)?; | ||
bail!("TODO: read_directory") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to above, mind filing an issue for this? (unless the intention is to fill out in this PR)
// NOTE: `Dir::rename_at` will check permissions as well, but we're doing it here early to | ||
// preserve legacy behavior |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a difference from WASIp3 intentionally? Or just an artifact of a test doing two invalid things at once and which error is coming out is now different?
atim: NewTimestamp, | ||
mtim: NewTimestamp, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where it makes sense for types like this I think it'd also be reasonable to use the cap-std types directly and avoid having a layer of abstraction which is wasmtime-wasi specific (e.g. directly convert bindgen-generated types to cap-std types).
I don't think it makes sense for all types, but for some like this it might be reasonable to skip the extra enum here.
Refs bytecodealliance/wasip3-prototyping#228
Looks like reads will benefit from quite a bit of refactoring, which I did not manage to get to this week yet.
Keeping this open as draft for now until that's done (I'll get back to it next week)