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 solution and/or docs for making it easy to pull in resulting libs to init.vim/init.lua #13

Open
turboladen opened this issue Dec 16, 2021 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@turboladen
Copy link
Owner

Right now, for pulling in turboladen/init.rs (my init.rs, defined using the crates here), I've got this at the top of my init.vim:

lua << RUST
local ffi = require("ffi")

ffi.cdef [[
    void init(void);
  ]]

local project_path = "/Users/steve.loveless/Development/projects/init.rs"
local suffix = ffi.os == "OSX" and ".dylib" or ".so"

local lib = ffi.load(project_path .. "/target/release/libinit_rs" .. suffix)
lib.init()
RUST

...but this is neither flexible, nor easily-distributed. I share my dotfiles across computers using YADM and would like to commit my changes made to init.rs (or should that project really just be one in ~/.config/nvim/? 🤔) so they can be used on my other environments.

Either make a tool/whatever that makes this easier, or at least document how to use existing tools to automate this.

@turboladen turboladen added this to the 0.1.0 - init.rs milestone Dec 16, 2021
@turboladen turboladen self-assigned this Dec 16, 2021
@turboladen turboladen added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant