Closed kentezrabetita closed 7 months ago
Hi @kentezrabetita, I managed to include a child process running Python or Rust code via a call from IPC.
I'm about to push it tomorrow or Thursday in another branch, then do a PR to the examples folder of Nextron.
You will be able to use the analogy in .ts, .js easily, but for Python, you need to have Python or Rust installed on the target machine to ruin your app. As I said, if you only use js/ts, no need, it is already packed in Nextron, you just.
Hey @bm777, that's awesome news! I appreciate your work on this and thanks for the good heads up. Looking forward to your PR!
@kentezrabetita Here is the example running Python code via IPC on top of the basic lang javascript example.
https://github.com/saltyshiomix/nextron/assets/29865600/be3305cb-85a2-4890-a396-5aa0847dedf9
you not passed channel when called child.send()
@JesTery58 can you be more precise please?
do child.send() function want a channel ?
Hello,
I am experiencing an issue related to the execution of a child process in the packaged version of my Nextron application. The child process works as expected in the development environment, but fails to execute when the application is packaged. I am currently testing on an M1 Mac.
The file structure in the main directory is as follows:
In my
ipc.ts
file, I fork a child process fromworker.ts
:In the
worker.ts
file, I handle the 'message' event from the main process:In development, the main process successfully sends the message and the child process performs as expected. However, in the packaged app, the child process doesn't seem to be executing.
Despite adding 'exit' and 'error' event handlers to the child process, no error messages or exit codes have been generated.
Upon examining the built version of the app in the
./app
directory, I noticed the absence of aworker.js
file or other files that i've added. However, references to the worker code exist inbackground.js
. This leads me to suspect that the issue might be related to the way I'm referencing the worker file inconst child = fork('./main/worker.ts')
;.Any guidance on this issue would be greatly appreciated, particularly on getting the child process to work correctly in the packaged app.
Thank you!