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

Update to allow for platform dependent libs in CGO #18

Merged
merged 2 commits into from
Jun 12, 2024
Merged

Update to allow for platform dependent libs in CGO #18

merged 2 commits into from
Jun 12, 2024

Conversation

jmoney
Copy link
Contributor

@jmoney jmoney commented Jun 4, 2024

This simplifies other go programs usage of this library. Currently, you have to copy the libtokenizers.a file to $(go env GOMODCACHE)/daulet/tokenizers@${version}. The change here forces the user to specify where to load this library from instead of it being required to be at a certain place.

Makefile Show resolved Hide resolved
README.md Show resolved Hide resolved
tokenizer.go Show resolved Hide resolved
@daulet
Copy link
Owner

daulet commented Jun 5, 2024

hm interesting, let me test it in a larger repo, see how it works before merging

@jmoney jmoney requested a review from daulet June 6, 2024 13:42
Makefile Show resolved Hide resolved
@jmoney
Copy link
Contributor Author

jmoney commented Jun 7, 2024

hey @daulet , so what do you think of this PR? Do you believe it allows more ease of use of these bindings that we can merge and release?

@daulet
Copy link
Owner

daulet commented Jun 12, 2024

hey @daulet , so what do you think of this PR? Do you believe it allows more ease of use of these bindings that we can merge and release?

Yes, I think making this build time parameter satisfies all use cases, however i find it annoying to specify LD flags every time i go test, is there a way to simplify that?

@daulet
Copy link
Owner

daulet commented Jun 12, 2024

i suppose we could just use CGO_LDFLAGS

Copy link
Owner

@daulet daulet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

@daulet daulet merged commit d503b5b into daulet:main Jun 12, 2024
1 check passed
@jmoney jmoney deleted the jsm.pull-request branch June 12, 2024 01:56
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

Successfully merging this pull request may close these issues.

2 participants