Giter Club home page Giter Club logo

Comments (5)

noib3 avatar noib3 commented on May 28, 2024

cargo b --example api --features "neovim-0-8" compiles just fine on my machine. You might be using an older commit of nvim-oxi.

from nvim-oxi.

fedoranvar avatar fedoranvar commented on May 28, 2024

@noib3 finally, was able to test it.

i'm using latest commt for that time
but still receiving errors:

logs
error[E0432]: unresolved import `std::ffi::c_int`
 --> crates/luajit-bindings/src/error.rs:1:5
  |
1 | use std::ffi::c_int;
  |     ^^^^^^^^^^^^^^^ no `c_int` in `ffi`

error[E0432]: unresolved imports `std::ffi::c_char`, `std::ffi::c_double`, `std::ffi::c_int`
 --> crates/luajit-bindings/src/ffi.rs:4:16
  |
4 | use std::ffi::{c_char, c_double, c_int, c_void};
  |                ^^^^^^  ^^^^^^^^  ^^^^^ no `c_int` in `ffi`
  |                |       |
  |                |       no `c_double` in `ffi`
  |                no `c_char` in `ffi`
                                                                                    
error[E0432]: unresolved import `std::ffi::c_int`
 --> crates/luajit-bindings/src/function.rs:2:16
  |
2 | use std::ffi::{c_int, CStr};
  |                ^^^^^ no `c_int` in `ffi`
                                                                                    
error[E0432]: unresolved import `std::ffi::c_char`
 --> crates/luajit-bindings/src/macros.rs:1:5
  |
1 | use std::ffi::c_char;
  |     ^^^^^^^^^^^^^^^^ no `c_char` in `ffi`
                                                                                    
error[E0432]: unresolved imports `std::ffi::c_char`, `std::ffi::c_int`
 --> crates/luajit-bindings/src/pushable.rs:1:16
  |
1 | use std::ffi::{c_char, c_int};
  |                ^^^^^^  ^^^^^ no `c_int` in `ffi`
  |                |
  |                no `c_char` in `ffi`
                                                                                    
error[E0432]: unresolved import `std::ffi::c_int`
 --> crates/luajit-bindings/src/utils.rs:1:16
  |
1 | use std::ffi::{c_int, CStr};
  |                ^^^^^ no `c_int` in `ffi`
                                                                                    
error[E0412]: cannot find type `c_int` in module `std::ffi`
  --> crates/luajit-bindings/src/error.rs:58:24
   |
58 |         idx: std::ffi::c_int,
   |                        ^^^^^ not found in `std::ffi`
   |
help: consider importing one of these items
   |
1  | use core::ffi::c_int;
   |
1  | use std::os::raw::c_int;
   |
help: if you import `c_int`, refer to it directly
   |
58 -         idx: std::ffi::c_int,
58 +         idx: c_int,
   |
                                                                                    
error[E0412]: cannot find type `c_char` in module `std::ffi`
  --> crates/luajit-bindings/src/macros.rs:9:64
   |
9  |         concat!($s, "\0") as *const str as *const [::std::ffi::c_char]
   |                                                                ^^^^^^ not found in `std::ffi`
...
72 |             lua_getglobal(lstate, cstr!("print"));
   |                                   -------------- in this macro invocation
   |
   = note: this error originates in the macro `cstr` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing one of these items
   |
1  | use core::ffi::c_char;
   |
1  | use std::os::raw::c_char;
   |
help: if you import `c_char`, refer to it directly
   |
9  -         concat!($s, "\0") as *const str as *const [::std::ffi::c_char]
9  +         concat!($s, "\0") as *const str as *const [c_char]
   |

error[E0412]: cannot find type `c_char` in module `std::ffi`
  --> crates/luajit-bindings/src/macros.rs:10:35
   |
10 |             as *const ::std::ffi::c_char
   |                                   ^^^^^^ not found in `std::ffi`
...
72 |             lua_getglobal(lstate, cstr!("print"));
   |                                   -------------- in this macro invocation
   |
   = note: this error originates in the macro `cstr` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing one of these items
   |
1  | use core::ffi::c_char;
   |
1  | use std::os::raw::c_char;
   |
help: if you import `c_char`, refer to it directly
   |
10 -             as *const ::std::ffi::c_char
10 +             as *const c_char
   |
                                                                                    
error[E0308]: mismatched types
   --> crates/luajit-bindings/src/poppable.rs:198:33
    |
192 | impl<K, V> Poppable for HashMap<K, V>
    |      - this type parameter
...
198 |         if lua_gettop(state) == 0 {
    |                                 ^ expected type parameter `K`, found integer
    |
    = note: expected type parameter `K`
                         found type `{integer}`

error[E0308]: mismatched types
   --> crates/luajit-bindings/src/poppable.rs:211:46
    |
192 | impl<K, V> Poppable for HashMap<K, V>
    |      - this type parameter
...
211 |                 while lua_next(state, -2) != 0 {
    |                                              ^ expected type parameter `K`, found integer
    |
    = note: expected type parameter `K`
                         found type `{integer}`

Some errors have detailed explanations: E0308, E0412, E0432.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `luajit-bindings` due to 11 previous errors
warning: build failed, waiting for other jobs to finish...

and also is there an example for using nvim-oxi in dependencies , but not to compiling from git?

thank you!

from nvim-oxi.

noib3 avatar noib3 commented on May 28, 2024

You're using an older version of Rust.

and also is there an example for using nvim-oxi in dependencies , but not to compiling from git?

nvim-oxi = { version = "0.2", features = ["neovim-0-8"] }?

from nvim-oxi.

fedoranvar avatar fedoranvar commented on May 28, 2024

now it's compiled, but when i'm tryin to require it it throws an error
image

tried with 0.8 and nightly versions of neovim

from nvim-oxi.

SCJangra avatar SCJangra commented on May 28, 2024

@fedoranvar rename the function api to foo and rename your libfoo.so to foo.so

from nvim-oxi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.