Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

error: custom attribute panicked #27

Closed
grian32 opened this issue Nov 7, 2021 · 1 comment · Fixed by #28
Closed

error: custom attribute panicked #27

grian32 opened this issue Nov 7, 2021 · 1 comment · Fixed by #28

Comments

@grian32
Copy link
Contributor

grian32 commented Nov 7, 2021

full stack trace:

error: custom attribute panicked
 --> src/lib.rs:3:1
  |
3 | #[deno_bindgen]
  | ^^^^^^^^^^^^^^^
  |
  = help: message: called `Result::unwrap()` on an `Err` value: Error("EOF while parsing a value", line: 1, column: 0)

repro code:

#[deno_bindgen::deno_bindgen]
fn greet() -> i32 {
    return 42;
}

Fixed by deleting bindings.json in project root

@khanhankkhan
Copy link

khanhankkhan commented Mar 11, 2023

I'm having this issue come up. Deleting bindings.json (and the bindings/bindings.ts) did not solve for me.

error: custom attribute panicked
--> src/lib.rs:13:1
|
13 | #[deno_bindgen]
| ^^^^^^^^^^^^^^^
|
= help: message: not implemented

the fix for me was to remove the '&' from the function signature, and changed

#[deno_bindgen]
fn my_init(inp:&i32) {}

to

#[deno_bindgen]
fn my_init(inp:i32) {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants