Skip to content

Conversation

@Havret
Copy link
Contributor

@Havret Havret commented Dec 10, 2025

I ran into a classic "it works on my machine" scenario while working on the new Merge Operator support (see #42) for my RocksDb.Extensions wrapper library. My tests were green on macOS, but the Linux CI build was failing mysteriously.

After some digging, I realized the issue was in how we handled the success output parameter in the C# interop layer.

The underlying RocksDB native API expects the success indicator to be a boolean-like value (0 or 1) stored in an unsigned char*, but we were marshalling it as an IntPtr. While macOS was lenient with this, Linux was not having it.

I've updated the implementation to correctly marshal this as a byte, ensuring it works cross-platform.

Reference: RocksDB C Header definition

@theolivenbaum could you please take a look at this?

@theolivenbaum theolivenbaum merged commit f8ea823 into curiosity-ai:master Dec 10, 2025
@theolivenbaum
Copy link
Contributor

Looks good, thanks for the contribution! And yeah the header to native generation is sometimes not correct. I need to investigate another solution I used for a friend project that uses a compiler based pass to generate the bindings

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