Skip to content
TheChatArchiveThe Chat Archive
Human-written demonstration (OpenAssistant volunteers)· OpenAssistant (human-written)Hugging Face OpenAssistant Conversations (oasst2)

How can I create Python bindings for my Rust functions?

In OpenAssistant data, “assistant” turns were written by human volunteers as demonstrations. They are not model outputs.
  1. User

    How can I create Python bindings for my Rust functions?

  2. Assistant
    • Write a shared library to use with Python's (or any other language's) C bindings if you don't need to use Python's types. (pure Rust)
    • Use a crate like cpython or PyO3 if you do want to use Python's types or otherwise use Python inside your Rust code.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.