Erdem
Erdem
DDeno
Created by Erdem on 10/7/2024 in #help
deno bindgen doesnt work
// add.rs
use deno_bindgen::deno_bindgen;

#[deno_bindgen]
fn add(a: f64, b: f64) -> f64 {
a + b
}
// add.rs
use deno_bindgen::deno_bindgen;

#[deno_bindgen]
fn add(a: f64, b: f64) -> f64 {
a + b
}
[erdem@archerien hexput]$ deno_bindgen
Compiling hexput v0.1.0 (/home/erdem/Documents/GitHub/hexput)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.18s
Initializing hexput
Error: Custom { kind: Other, error: "failed to load library: Could not obtain symbol from the library: /home/erdem/Documents/GitHub/hexput/target/debug/libhexput_add.so: undefined symbol: init_deno_bindgen" }
[erdem@archerien hexput]$ deno_bindgen
Compiling hexput v0.1.0 (/home/erdem/Documents/GitHub/hexput)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.18s
Initializing hexput
Error: Custom { kind: Other, error: "failed to load library: Could not obtain symbol from the library: /home/erdem/Documents/GitHub/hexput/target/debug/libhexput_add.so: undefined symbol: init_deno_bindgen" }
[package]
name = "hexput"
version = "0.1.0"
edition = "2021"

[lib]
name = "hexput_add"
path = "./src/add.rs"
crate-type = ["cdylib"]

[dependencies]
deno_bindgen = { version = "0.8.1" }
logos = "0.14.2"
serde = { version = "1.0.210", features = ["derive"] }
[package]
name = "hexput"
version = "0.1.0"
edition = "2021"

[lib]
name = "hexput_add"
path = "./src/add.rs"
crate-type = ["cdylib"]

[dependencies]
deno_bindgen = { version = "0.8.1" }
logos = "0.14.2"
serde = { version = "1.0.210", features = ["derive"] }
[erdem@archerien hexput]$ nm target/debug/libhexput_add.so
00000000000010f0 T add
w __cxa_finalize@GLIBC_2.2.5
0000000000004000 d __dso_handle
0000000000003e08 d _DYNAMIC
0000000000001148 t _fini
0000000000003fc8 d _GLOBAL_OFFSET_TABLE_
w __gmon_start__
0000000000002000 r __GNU_EH_FRAME_HDR
0000000000001000 t _init
w _ITM_deregisterTMCloneTable
w _ITM_registerTMCloneTable
0000000000004008 d __TMC_END__
0000000000001110 t _ZN10hexput_add3add12__inner_impl17h75a111521a7f889dE
0000000000001130 t _ZN3std3sys3pal4unix4args3imp15ARGV_INIT_ARRAY12init_wrapper17hc3d7aa770aa1f135E
0000000000003df0 d _ZN3std3sys3pal4unix4args3imp15ARGV_INIT_ARRAY17hb26928069a44f956E
0000000000004010 b _ZN3std3sys3pal4unix4args3imp4ARGC17h12f24d4fe1f4b93fE.0
0000000000004018 b _ZN3std3sys3pal4unix4args3imp4ARGV17hb757a1eeec9e1510E.0
[erdem@archerien hexput]$ nm target/debug/libhexput_add.so
00000000000010f0 T add
w __cxa_finalize@GLIBC_2.2.5
0000000000004000 d __dso_handle
0000000000003e08 d _DYNAMIC
0000000000001148 t _fini
0000000000003fc8 d _GLOBAL_OFFSET_TABLE_
w __gmon_start__
0000000000002000 r __GNU_EH_FRAME_HDR
0000000000001000 t _init
w _ITM_deregisterTMCloneTable
w _ITM_registerTMCloneTable
0000000000004008 d __TMC_END__
0000000000001110 t _ZN10hexput_add3add12__inner_impl17h75a111521a7f889dE
0000000000001130 t _ZN3std3sys3pal4unix4args3imp15ARGV_INIT_ARRAY12init_wrapper17hc3d7aa770aa1f135E
0000000000003df0 d _ZN3std3sys3pal4unix4args3imp15ARGV_INIT_ARRAY17hb26928069a44f956E
0000000000004010 b _ZN3std3sys3pal4unix4args3imp4ARGC17h12f24d4fe1f4b93fE.0
0000000000004018 b _ZN3std3sys3pal4unix4args3imp4ARGV17hb757a1eeec9e1510E.0
6 replies