Skip to content
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

Request: move main modules into a subdir of components #3

Open
masoncj opened this issue Jan 3, 2017 · 1 comment
Open

Request: move main modules into a subdir of components #3

masoncj opened this issue Jan 3, 2017 · 1 comment

Comments

@masoncj
Copy link

masoncj commented Jan 3, 2017

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.

@nkolban
Copy link
Owner

nkolban commented Jan 3, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants