Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
m96-chan
commented
Feb 20, 2026
|
|
||
| if (rc != 0) { | ||
| const char *err = oxbitnet_error_message(); | ||
| fprintf(stderr, "Generate error: %s\n", err ? err : "unknown error"); |
Owner
Author
There was a problem hiding this comment.
Added oxbitnet_set_logger(callback, userdata, min_level) — routes internal tracing output through a C callback. The example now uses it instead of raw fprintf.
Adds OxBitNetLogLevel enum, OxBitNetLogFn callback type, and oxbitnet_set_logger(cb, userdata, min_level). Internal tracing events are forwarded through the callback. Example updated to use the logger. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add OxBitNetLogLevel and OxBitNetLogFn to cbindgen export includes - Use only "registry" feature for tracing-subscriber (env-filter unused) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
oxbitnet-fficrate (cdylib+staticlib) providing a stable C ABI foroxbitnetoxbitnet.hvia cbindgen at build timeoxbitnet_load,oxbitnet_free,oxbitnet_generate,oxbitnet_chat,oxbitnet_error_message,oxbitnet_default_generate_options,oxbitnet_default_load_optionsreturn non-zero)examples/chat.cto verify the FFIShared foundation for #5 (Java/Android), #6 (Swift/iOS), #7 (C#), #8 (Haskell).
Test plan
cargo build -p oxbitnet-fficompiles.so+.acargo clippy -p oxbitnet-ffi -- -D warningspasses cleancbindgengeneratesoxbitnet.hwith correct types (no double-prefix)nm -D liboxbitnet_ffi.so)examples/chat.cagainst a real model (manual)🤖 Generated with Claude Code