Closed ralphwetzel closed 1 year ago
True. We tend to assume a network (especially for Node-RED)!) But the original Pico doesn't have networking. Not immediately sure what the best solution is but will take a look.
@phoddie -- Did you find time to decide on a way forward for this issue? Couldn't we opt in the network related manifests (for Pico targets) based on a configuration item defined in the platform manifest?
Sorry, no great solution yet. The correct solution is to break up manifest_io so that projects only include what they need. That's a big undertaking, so it hasn't happened yet.
Yes, you could probably workaround it by including the networking bits on devices that don't need them. I just hesitate to commit that for fear it stays that way for a long time.
I would be perfectly fine with Moddable / Node-RED MCU requesting connectivity and supporting only boards with that feature. After all, Node-RED focuses on IoT.
So the Raspberry Pi Pico would not be supported, only the Raspberry Pi Pico W.
Thanks, @rei-vilo. That's a good point. I do still think there are many interesting uses of Node-RED on devices without a network connection, so I'd like this to work eventually. It isn't really a technical limitation. There's just some untangling of the build system, which we want to do anyway to save space by excluding unused code in the firmware.
An option could be to build all the libraries and ask the linker to ignore those not used.
Unfortunately, it isn't that easy. That works for native code (and we take advantage of that often!). Once a native function is referenced by a script binding, the native linker (gcc, etc) can't strip it.
@phoddie: Great job! 👍 This works now as well on devices without networking capabilities!
Excellent. Thank you for confirming. Much of the credit goes to @mkellner.
@phoddie -- Fortunately @rei-vilo ran his tests with a Raspberry Pi Pico W. All other Pico target fail to build (at least on my system) with
despite I'm not using (for this test) any node that needs networking capabilities. I think, this is due to the fact that
manifest_runtime.json
, included by default, includes various other manifests that depend on the embedded socket/network code.Simple test case: