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

Contribute an example with more libgit2 calls #65

Open
iliakan opened this issue Feb 7, 2023 · 1 comment
Open

Contribute an example with more libgit2 calls #65

iliakan opened this issue Feb 7, 2023 · 1 comment

Comments

@iliakan
Copy link

iliakan commented Feb 7, 2023

I'd like to contribute an example with multiple libgit2 calls, rather than single lg2 point of entry.
As of now, I have "git init" + "git add" working.

It needs more exports in build.sh,
something like this:

emcmake cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_C_FLAGS="$EXTRA_CMAKE_C_FLAGS \
 -g -sINLINING_LIMIT -O0 --pre-js $(pwd)/pre.js $POST_JS -sEXPORTED_FUNCTIONS=['_main','_git_strarray_print','_git_index_add_bypath','_malloc','_git_repository_open_ext','_git_repository_init','_git_libgit2_init','_git_repository_index','_git_index_add_all'] -s \"EXTRA_EXPORTED_RUNTIME_METHODS=['FS','callMain','ccall','cwrap','lengthBytesUTF8','stringToUTF8','writeArrayToMemory','getValue','setValue']\" -lnodefs.js -lidbfs.js -s INVOKE_RUN=0 -s ALLOW_MEMORY_GROWTH=1 -s TOTAL_MEMORY=512MB -s STACK_SIZE=131072" -DREGEX_BACKEND=regcomp -DSONAME=OFF -DUSE_HTTPS=OFF -DBUILD_SHARED_LIBS=OFF -DTHREADSAFE=OFF -DUSE_SSH=OFF -DBUILD_CLAR=OFF -DBUILD_EXAMPLES=ON ../libgit2

Please note: more EXPORTED_FUNCTIONS and EXTRA_EXPORTED_RUNTIME_METHODS.
Should I leave it like this or put them in a kind of variable?

Most of these exports are only needed for my example.

@petersalomonsen
Copy link
Owner

For this repo, I'd like to keep the single lg2 point of entry, and try to make sure that the CLI commands exposed are as similar to real GIT as possible ( though with limitations ). You can create your own fork with such exports if you want, but I would prefer not to include it in this repository.

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