-
Hi, This is an amazing crate! Solves so many problems I was facing when using deno_core directly. I'm wondering how I can specify permissions for the fs feature in rustyscript. There is no example for it and I couldn't find an option in |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I have not dive deep but you try rustyscript::RuntimeOptions {
extension_options: rustyscript::ExtensionOptions {
filesystem: <instance of deno_fs::FileSystemRc>
<...>
}
<...>
} |
Beta Was this translation helpful? Give feedback.
-
I figured it out, you can use AllowlistWebPermissions: let runtime_permissions = Arc::new(AllowlistWebPermissions::default());
runtime_permissions.allow_open(
<file_path>,
true,
false,
); Earlier I tried |
Beta Was this translation helpful? Give feedback.
I figured it out, you can use AllowlistWebPermissions:
Earlier I tried
allow_read
and that didn't work butallow_open
does.