{"repo":"tqchen/ffi-navigator","free":true,"listed":false,"github":"https://github.com/tqchen/ffi-navigator","clone":"git clone https://github.com/tqchen/ffi-navigator.git","description":null,"language":"Python","stars":249,"topics":["tvm","language-server","vscode-extension","ffi"],"license":"Apache-2.0","category":"dev-tools","readme_excerpt":"FFI Navigator Most modern IDEs support find function definition within the same language(e.g. python or c++). However, it is very hard to do that for cross-language FFI calls. While solving this general problem can be very technically challenging, we can get around it by building a project-specific analyzer that matches the FFI registration code patterns and recovers the necessary information. This project is an example of that. Currently, it supports the PackedFunc FFI in the Apache TVM project. It is implemented as a language server that provides getDefinition function for FFI calls and returns the location of the corresponding C++ API in the TVM project. It complements the IDE tools that support navigation within the same language. We also have preliminary support for MXNet, DGL, and PyTorch, so we can do goto-definition from Python to C++ in these projects too. Installation Install python package VSCode See vscode-extension Emacs Install lsp-mode Add the following configuration - Use commands like M-x lsp-find-definition and M-x lsp-find-references If you use eglot instead, check out this PR. eglot does not support multiple servers per language at the moment, the PR above contains a workaround. Other editors/IDEs It should be straightforward to add support for other editors or IDEs that have a LSP client implementation. Please refer to this site for the availability of clients. Since ffi-navigator is intended to be used with other general purpose servers such as pyls, you","default_branch":null,"files":null,"tree":[],"storefront":"/r/tqchen","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tqchen/ffi-navigator/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}