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

Add function exports for RPC API to libquilc #890

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kartik-s
Copy link
Contributor

@kartik-s kartik-s commented Jul 20, 2023

This PR is a proof-of-concept that demonstrates calling API functions that are currently exposed via the RPC interface through a shared library. An example Python script is included which illustrates usage.

Also see quil-lang/sbcl-librarian#43.

Build instructions on macOS

  1. Get a local copy of the SBCL source. This directory will be your SBCL_HOME in later steps.
  2. Build SBCL
sh make.sh

If on an Intel Mac, check out the x86-null-tn branch first, then:

sh make.sh --without-compact-instance-header --without-immobile-space --without-immobile-code
  1. Build libsbcl.so
sh make-shared-library.sh
  1. In quilc/lib/,
SBCL_HOME=<directory from step 1, defaults to ~/sbcl in the Makefile> make
  1. Run the example:
SBCL_HOME=<directory from step 1>
PYTHONPATH=. DYLD_LIBRARY_PATH=$SBCL_HOME/src/runtime python3 ./tests/python/rpc_functions.py

@kartik-s kartik-s marked this pull request as draft July 20, 2023 18:21
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.

1 participant