noib3/nvim-oxi

Simple code error, help!

Closed this issue · 1 comments

crusj commented
use nvim_oxi as oxi;

#[oxi::module]
fn compare() -> oxi::Result<()> {
    oxi::print!("hello world");
    Ok(())
}
[package]
name = "bookmark"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
crate-type = ["cdylib"]

[dependencies]
nvim-oxi = {version = "0.3.0", features = ["neovim-0-9"]}
cargo b
cp libbookmark.dylib
nvim --headless --noplugin +":lua require'bookmark'" +q
Error detected while processing command line:
E5108: Error executing lua error loading module 'bookmark' from file './bookmark.so':
        dlsym(0x7ff9120cc600, luaopen_bookmark): symbol not found
stack traceback:
        [C]: at 0x0106f912d0
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk

crusj commented

�Function name should be bookmark.