duktape-esp32
duktape-esp32 copied to clipboard
Request: move main modules into a subdir of components
Hello! I'd like to be able to use your duktape extensions, such as the networking code in main/module_os.c
, in my own project. The IDF makefiles support this via a variable EXTRA_COMPONENT_DIRS
.
For instance, by adding this to my Makefile:
DUK_PATH := /path/to/duktape-esp32
EXTRA_COMPONENT_DIRS := ${DUK_PATH}/components
I can compile the duktape interpreter into my project.
It's also possible to add a bare source dir via SRCDIRS
. However, since your main
directory contains a app_main()
routine, I have to rely on ordering to override this.
Would you consider moving the module
files and associated sources and includes into a subdirectory of components
? Then your main
dir would just contain the duktape_main.c
file? I could then include your modules in my project just with the above. Thanks.
Howdy ... I hadn't anticipate that this project would provide "components" for re-use in other projects. That said, I'm glad you found stuff that might be of use to you. By putting the sources under "components" then I am tacitly saying that I anticipate them to be used as components in other projects (like yours for example) and I don't believe that's where this project is currently going. Things are very much in flux right now and anything and everything is liable for change without concern of who or what I might break downstream as I hadn't anticipate a "downstream".
What I'd like to recommend is that at this time, just copy any files you may need and don't explicitly depend on "my" latest and greatest. That way if it works for you just now, it will work for you in the future. Periodically, you can compare the relatively few files that I think you might be using against the latest and see if you need to merge them.
Perhaps there are areas where we can collaborate? What is the nature of your project? Is it Duktape on ESP32 based?