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

Feature Request: variant with separate jsmn.h and jsmn.c #228

Open
rdpoor opened this issue Sep 24, 2022 · 4 comments
Open

Feature Request: variant with separate jsmn.h and jsmn.c #228

rdpoor opened this issue Sep 24, 2022 · 4 comments

Comments

@rdpoor
Copy link

rdpoor commented Sep 24, 2022

As much as I admire the "single jsmn.h file does it all" approach, our workflow and testing methodologies require separate headers (.h) and executables (.c).

Consequently, I find myself periodically pulling down the latest jsmn,h and then teasing out the functions for a jsmn.c file. It's not particularly difficult, but it would be nice if that pair of files were readily available, perhaps in its own directory.

(If you're willing to entertain such an approach, I'm willing to create a pull request...)

@someburner
Copy link

I would just track your own version prior to 18e9fe4

@BenBE
Copy link
Contributor

BenBE commented Sep 25, 2022

I'd very much appreciate having the header and implementation stuff separate.

While single-file libraries make somewhat sense with C++ (re template instantiation) they are just annoying with plain C as they cause additional work on the build system side.

@wnoliveira
Copy link

wnoliveira commented Mar 30, 2023

I don't know if there is an intention to change the philosophy of this library from a single header to a source and a header file.
I've used in a project a version with minor increments and the change to a .c and .h.

@zserge if you find it interesting, I can make a pull-request. If not, for those who want this feature, you can use the repo https://github.com/programacao-eletronica/jsmn .

@rdpoor
Copy link
Author

rdpoor commented Jan 12, 2024

Hah! I didn't see @wnoliveira 's note until after I forked a two-file implementation as well. Mine differs in that it makes the fewest number of changes to zserge's original repository as possible: https://github.com/rdpoor/jsmn

@BenBE https://github.com/rdpoor/jsmn should be what you're asking for...

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

4 participants