Skip to main content

Language server for navigating FFI calls

Project description

FFI Navigator

FFI Navigator is a toolkit that enhances IDEs to navigate around project specific ffi calls. Currently it supports the PackedFunc FFI in the Apache TVM project.

It is implemented as a language server.

Structure

  • python/ffi_navigator The analysis code and language server
  • vscode-extension language server extension for vscode

Installation

Install dependencies

pip install --user attrs python-jsonrpc-server``

Then we need to ake sure ffi_navigator is in your python path in bashrc.

export PYTHONPATH=${PYTHONPATH}:/path/to/ffi-navigator/python

VSCode

See vscode-extension

Emacs

Install lsp-mode

Add the following configuration

(lsp-register-client
 (make-lsp-client
  :new-connection (lsp-stdio-connection '("python3" "-m" "ffi_navigator.langserver"))
  :major-modes '(python-mode c++-mode)
  :server-id 'ffi-navigator))

Set the project root to be /path/to/tvm using M-x lsp-workspace-folders-add [RET] /path/to/tvm Try out the goto definition by opening a python file

  • Move cursor to python/tvm/api.py line 59 _api_internal._min_value, type M-x lsp-find-definition

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ffi-navigator-0.1.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distributions

ffi_navigator-0.1-py3.6.egg (15.5 kB view hashes)

Uploaded Source

ffi_navigator-0.1-py3-none-any.whl (7.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page