-
Notifications
You must be signed in to change notification settings - Fork 259
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
stdio in spin #438
Comments
ref #380 |
I am using the Http Trigger in an application, which has inherited stdio (they are path to stdio files). I want to wire them to spin's stdio, or more specifically, |
I was mistaken - we do expose stdio, but only as buffers ( For your use-case, can you clarify if you want stdio for logging or some other purpose? The Wagi HTTP executor, for example, uses stdin to provide the request to the guest, and parses stdout into the response: Line 54 in 0f51ad0
Line 116 in 0f51ad0
|
@lann ~ We are looking to capture IO to memory. Actually, it seems like #431 implements pretty much all we need. We'd make use of |
@danbugs If you want to pass your own Would that provide the flexibility you need? This area and the current PR draft are very much up for refinement, and it would be great to have your feedback on the right structure. |
@itowlson ~ If I understand this correctly, If that's the case, I don't think we need |
That's exactly right. If you have your WasiFiles already, you can call WAGI does this in a very simple form because it needs different behaviour for stdin, and a slightly different interaction with the buffer for stdout. It's really valuable to know that this is more broadly useful as a public customisation point though! |
|
This is addressed by #763 |
How does application wire it's own stdin/out/err path to spin such that spin pass them to
WasiCtxBuilder
?I found the relevent implementation here:
spin/crates/http/src/spin.rs
Lines 217 to 235 in a9181f7
The text was updated successfully, but these errors were encountered: