-
Notifications
You must be signed in to change notification settings - Fork 1k
C and C++ bindings to Tokenizers #1888
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
base: main
Are you sure you want to change the base?
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
ArthurZucker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very open to this! let's make sure we have a big compat with expectations in terms of the funcs we bind
| @@ -0,0 +1,133 @@ | |||
| use std::ffi::{CStr, CString}; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok ffi perfect
| } | ||
|
|
||
| #[no_mangle] | ||
| pub extern "C" fn tokenizers_encode( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think we need decode, batch encode batch encode fast etc and asyc? I don't know how best to define these all but basically the same surface as python!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick review! Happy to know you're interested/open to this effort.
I will get back after surfacing more functionality to C++.
CPP bindings coverage improvement
Adding in bindings for two more languages!
bindings/cppbindings/cC is an intermediate step to bind C++ and Rust: i.e., C++ <--> C <--> Rust.
--