If I use FFI with Deno Jupyter, will it not print the shared lib's stdout? (like Rust println!())
If I use FFI with Deno Jupyter, will it not print the shared lib's stdout?
This is an example of how it looks normally vs in Jupyter
No output in Jupyter, just finishes execution while normally it prints the training progress each epoch.
![No description](https://cdn.answeroverflow.com/1198116919643996181/image.png)
![No description](https://cdn.answeroverflow.com/1198116919904055447/image.png)
5 Replies
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the information you've provided, it's possible that the standard output from the shared library you're using through FFI (Foreign Function Interface) might not be captured or displayed in the same way in Deno Jupyter as it is in a standard terminal environment.
In a typical terminal environment, output from a shared library called via FFI should be displayed to stdout, including anything printed using
println!()
in Rust. However, Jupyter notebooks often capture stdout and display it in the notebook interface, and there could be differences in how this is handled compared to a standard terminal.
If you're not seeing output in Jupyter that you would normally see in a terminal, it could be due to the way Jupyter captures and displays output. This behavior is not specific to Deno, but rather to how Jupyter interfaces with executed code.
Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of this advice. It might be helpful to look into Jupyter's documentation or community forums for more information on how it handles stdout from external libraries and FFI calls.Correct. As of now Deno Jupyter is not able to capture external lib output.
are there any plans to make it possible?
It's possible to do, but we might not have bandwidth to do it for a few months
ah understandable