Skip to content

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 force-pushed the call-rpc-functions branch from 72e9b81 to 2a1395a Compare July 20, 2023 17:31
@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