Closed GilShoshan94 closed 1 year ago
Do you know how to write a UDR in Rust for Firebird 4 ?
Unfortunately no. I never tried to write an UDF.
Do you have a example you can share or can you point me to a ressource on how it can be achieved please ?
Do you have experience writing UDFs in other languages? Firebird has a doc about it.
To do this in rust, you can write a C API.
Tonight I will try make some tests and share it here.
Do you know how to write a UDR in Rust for Firebird 4 ?
Unfortunately no. I never tried to write an UDF.
Do you have a example you can share or can you point me to a ressource on how it can be achieved please ?
Do you have experience writing UDFs in other languages? Firebird has a doc about it.
To do this in rust, you can write a C API.
Tonight I will try make some tests and share it here.
Do you have experience writing UDFs in other languages?
No, not yet. Thank you for the ressource.
I don't have a lot of experience in C nor C++, I know mainly Rust and Python. And in Rust I do mainly Tokio stuff, I didn't had the chance to try embedded stuff yet, nor trying to FFI with C.
I found this ressource too to write a UDR if it can help: https://scm.ibphoenix.com:3000/public/MyFirstUDRKit
I appreciate you looking into this. Thank you.
I don't have lot of experience with UDF too, so this is my two cents.
UdfAccess
on firebird.conf
;lib
section on your crate project. Like on setting up a project;#[no_mangle]
pub extern "C" fn check_status() -> u8 {
9
}
target/debug/....so
file to your UDF path;declare external function f_check_status
returns int by value
entry_point 'check_status' module_name 'YOURLIB';
commit;
select f_check_status() from RDB$DATABASE;
Thank you @fernandobatels ! This helped me.
Hi @fernandobatels,
It's not an issue, just a question.
Do you know how to write a UDR in Rust for Firebird 4 ? Do you have a example you can share or can you point me to a ressource on how it can be achieved please ?
Thank you