-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add readonly dirs to allowed_paths #733
Conversation
Plugin:
|
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.
This is awesome! All the changes make sense reading through them. I think it would be nice to get the go-sdk working too so we can make sure the behavior is the same. But this seems pretty much ready!
I did notice this PR also adds a submodule to corrosion-src
- it doesn't seem like that's needed?
runtime/examples/fs.rs
Outdated
@@ -0,0 +1,32 @@ | |||
use extism::*; | |||
fn main() { | |||
let url = Wasm::file("D:/x/rust/fs/target/wasm32-wasi/debug/fs.wasm"); |
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.
We could add fs.wasm
to the wasm
directory and use a relative path
This is a rough POC for allowing people to whitelist a dir as readonly. When the source path is prefixed with
ro:
, the dir is considered as readonly. This preserved backward compatibility. This suggestion came up in extism/go-sdk#1 (comment)Readonly:
Writable: