Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

cdylib_name not specified error (unclear error message) #92

Open
avioletheart opened this issue Sep 5, 2024 · 1 comment
Open

cdylib_name not specified error (unclear error message) #92

avioletheart opened this issue Sep 5, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@avioletheart
Copy link

I am getting this error while trying to generate bindings:

[nix-shell:~/src/pluralkit/pluralkit]$ RUST_BACKTRACE=1 uniffi-bindgen-cs lib/commands/src/commands.udl 
thread 'main' panicked at bindgen/src/gen_cs/mod.rs:79:14:
`cdylib_name` not specified
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::option::expect_failed
   3: uniffi_bindgen_cs::gen_cs::Config::cdylib_name
   4: <uniffi_bindgen_cs::gen_cs::CsWrapper as askama::Template>::render_into
   5: uniffi_bindgen_cs::gen_cs::generate_bindings
   6: <uniffi_bindgen_cs::BindingGenerator as uniffi_bindgen::BindingGenerator>::write_bindings
   7: uniffi_bindgen::generate_external_bindings
   8: uniffi_bindgen_cs::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

here is my udl file:

namespace commands {
    ParsedCommand? parse_command(string input);
};
dictionary ParsedCommand {
	boolean ok;
	string command_ref;
	sequence<string> args;
	record<string, string?> flags;
};
@arg0d
Copy link
Contributor

arg0d commented Sep 5, 2024

The error message is not very helpful, we should improve that. You need to specify cdylib_name in ./uniffi.toml file.

@arg0d arg0d added the enhancement New feature or request label Sep 5, 2024
@arg0d arg0d changed the title cdylib_name not specified error cdylib_name not specified error (unclear error message) Sep 5, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants