jcbhmr added the bug label to Issue #7775.
jcbhmr opened issue #7775:
Thanks for filing a bug report! Please fill out the TODOs below.
Note: if you want to report a security issue, please read our security policy!
Test Case
TODO: upload Wasm file here
no wasm. just rust.Steps to Reproduce
- TODO: first, ...
- TODO: second, ...
- Etc...
- crate a new cargo project
- add wasmtime with the component-model feature
- use the below wit in the wit/ folder with bindgen!()
- see error
package jcbhmr:hello-world-rust-wasm-component-lib; interface my-box { resource my-box { constructor(value: u32); value: func() -> u32; } set-global: func(value: my-box); global-value: func() -> u32; } world example { export my-box; }
Expected Results
it to either auto-rename it due to duplication or otherwise scope it so that this collision doesn't happen
Actual Results
![image](https://github.com/bytecodealliance/wasmtime/assets/61068799/c1f6ab0f-f013-4cb3-9a71-b05ff7e4884c)
Versions and Environment
Wasmtime version or commit: 16.0.0
Operating system: Windows (using WSL)
Architecture: x86_64
Extra Info
Anything else you'd like to add?
jcbhmr edited issue #7775:
Thanks for filing a bug report! Please fill out the TODOs below.
Note: if you want to report a security issue, please read our security policy!
Test Case
TODO: upload Wasm file here
no wasm. just rust.Steps to Reproduce
- TODO: first, ...
- TODO: second, ...
- Etc...
- crate a new cargo project
- add wasmtime with the component-model feature
- use the below wit in the wit/ folder with bindgen!()
- see error
package jcbhmr:hello-world-rust-wasm-component-lib; interface my-box { resource my-box { constructor(value: u32); value: func() -> u32; } set-global: func(value: my-box); global-value: func() -> u32; } world example { export my-box; }
Expected Results
it to either auto-rename it due to duplication or otherwise scope it so that this collision doesn't happen
Actual Results
![image](https://github.com/bytecodealliance/wasmtime/assets/61068799/c1f6ab0f-f013-4cb3-9a71-b05ff7e4884c)
jcbhmr@PIG-2016:~/Documents/rswasmtest$ cargo build Compiling rswasmtest v0.1.0 (/home/jcbhmr/Documents/rswasmtest) error[E0428]: the name `MyBox` is defined multiple times --> src/main.rs:4:1 | 4 | bindgen!(); | ^^^^^^^^^^ `MyBox` redefined here | = note: `MyBox` must be defined only once in the type namespace of this module = note: this error originates in the macro `bindgen` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0116]: cannot define inherent `impl` for a type outside of the crate where the type is defined --> src/main.rs:4:1 | 4 | bindgen!(); | ^^^^^^^^^^ impl for type defined outside of crate. | = note: define and implement a trait or new type instead = note: this error originates in the macro `bindgen` (in Nightly builds, run with -Z macro-backtrace for more info) Some errors have detailed explanations: E0116, E0428. For more information about an error, try `rustc --explain E0116`. error: could not compile `rswasmtest` (bin "rswasmtest") due to 2 previous errors
Versions and Environment
Wasmtime version or commit: 16.0.0
Operating system: Windows (using WSL)
Architecture: x86_64
Extra Info
Anything else you'd like to add?
jcbhmr edited issue #7775:
Thanks for filing a bug report! Please fill out the TODOs below.
Note: if you want to report a security issue, please read our security policy!
Test Case
TODO: upload Wasm file here
no wasm. just rust.Steps to Reproduce
- TODO: first, ...
- TODO: second, ...
- Etc...
- crate a new cargo project
- add wasmtime with the component-model feature
- use the below wit in the wit/ folder with bindgen!()
- see error
package jcbhmr:hello-world-rust-wasm-component-lib; interface my-box { resource my-box { constructor(value: u32); value: func() -> u32; } set-global: func(value: my-box); global-value: func() -> u32; } world example { export my-box; }
use wasmtime::component::*; use wasmtime::{Config, Engine, Store}; bindgen!();
Expected Results
it to either auto-rename it due to duplication or otherwise scope it so that this collision doesn't happen
Actual Results
![image](https://github.com/bytecodealliance/wasmtime/assets/61068799/c1f6ab0f-f013-4cb3-9a71-b05ff7e4884c)
jcbhmr@PIG-2016:~/Documents/rswasmtest$ cargo build Compiling rswasmtest v0.1.0 (/home/jcbhmr/Documents/rswasmtest) error[E0428]: the name `MyBox` is defined multiple times --> src/main.rs:4:1 | 4 | bindgen!(); | ^^^^^^^^^^ `MyBox` redefined here | = note: `MyBox` must be defined only once in the type namespace of this module = note: this error originates in the macro `bindgen` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0116]: cannot define inherent `impl` for a type outside of the crate where the type is defined --> src/main.rs:4:1 | 4 | bindgen!(); | ^^^^^^^^^^ impl for type defined outside of crate. | = note: define and implement a trait or new type instead = note: this error originates in the macro `bindgen` (in Nightly builds, run with -Z macro-backtrace for more info) Some errors have detailed explanations: E0116, E0428. For more information about an error, try `rustc --explain E0116`. error: could not compile `rswasmtest` (bin "rswasmtest") due to 2 previous errors
Versions and Environment
Wasmtime version or commit: 16.0.0
Operating system: Windows (using WSL)
Architecture: x86_64
Extra Info
Anything else you'd like to add?
jcbhmr edited issue #7775:
Thanks for filing a bug report! Please fill out the TODOs below.
Note: if you want to report a security issue, please read our security policy!
Test Case
TODO: upload Wasm file here
no wasm. just rust.Steps to Reproduce
- TODO: first, ...
- TODO: second, ...
- Etc...
- crate a new cargo project
- add wasmtime with the component-model feature
- use the below wit in the wit/ folder with bindgen!()
- see error
package jcbhmr:hello-world-rust-wasm-component-lib; interface my-box { resource my-box { constructor(value: u32); value: func() -> u32; } set-global: func(value: my-box); global-value: func() -> u32; } world example { export my-box; }
use wasmtime::component::*; use wasmtime::{Config, Engine, Store}; bindgen!();
Expected Results
it to either auto-rename it due to duplication or otherwise scope it so that this collision doesn't happen
Actual Results
![image](https://github.com/bytecodealliance/wasmtime/assets/61068799/c1f6ab0f-f013-4cb3-9a71-b05ff7e4884c)
jcbhmr@PIG-2016:~/Documents/rswasmtest$ cargo build Compiling rswasmtest v0.1.0 (/home/jcbhmr/Documents/rswasmtest) error[E0428]: the name `MyBox` is defined multiple times --> src/main.rs:4:1 | 4 | bindgen!(); | ^^^^^^^^^^ `MyBox` redefined here | = note: `MyBox` must be defined only once in the type namespace of this module = note: this error originates in the macro `bindgen` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0116]: cannot define inherent `impl` for a type outside of the crate where the type is defined --> src/main.rs:4:1 | 4 | bindgen!(); | ^^^^^^^^^^ impl for type defined outside of crate. | = note: define and implement a trait or new type instead = note: this error originates in the macro `bindgen` (in Nightly builds, run with -Z macro-backtrace for more info) Some errors have detailed explanations: E0116, E0428. For more information about an error, try `rustc --explain E0116`. error: could not compile `rswasmtest` (bin "rswasmtest") due to 2 previous errors
Versions and Environment
Wasmtime version or commit: 16.0.0
Operating system: Windows 10 using WSL
Architecture: x86_64
Extra Info
Anything else you'd like to add?
alexcrichton closed issue #7775:
Thanks for filing a bug report! Please fill out the TODOs below.
Note: if you want to report a security issue, please read our security policy!
Test Case
TODO: upload Wasm file here
no wasm. just rust.Steps to Reproduce
- TODO: first, ...
- TODO: second, ...
- Etc...
- crate a new cargo project
- add wasmtime with the component-model feature
- use the below wit in the wit/ folder with bindgen!()
- see error
package jcbhmr:hello-world-rust-wasm-component-lib; interface my-box { resource my-box { constructor(value: u32); value: func() -> u32; } set-global: func(value: my-box); global-value: func() -> u32; } world example { export my-box; }
use wasmtime::component::*; use wasmtime::{Config, Engine, Store}; bindgen!();
Expected Results
it to either auto-rename it due to duplication or otherwise scope it so that this collision doesn't happen
Actual Results
![image](https://github.com/bytecodealliance/wasmtime/assets/61068799/c1f6ab0f-f013-4cb3-9a71-b05ff7e4884c)
jcbhmr@PIG-2016:~/Documents/rswasmtest$ cargo build Compiling rswasmtest v0.1.0 (/home/jcbhmr/Documents/rswasmtest) error[E0428]: the name `MyBox` is defined multiple times --> src/main.rs:4:1 | 4 | bindgen!(); | ^^^^^^^^^^ `MyBox` redefined here | = note: `MyBox` must be defined only once in the type namespace of this module = note: this error originates in the macro `bindgen` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0116]: cannot define inherent `impl` for a type outside of the crate where the type is defined --> src/main.rs:4:1 | 4 | bindgen!(); | ^^^^^^^^^^ impl for type defined outside of crate. | = note: define and implement a trait or new type instead = note: this error originates in the macro `bindgen` (in Nightly builds, run with -Z macro-backtrace for more info) Some errors have detailed explanations: E0116, E0428. For more information about an error, try `rustc --explain E0116`. error: could not compile `rswasmtest` (bin "rswasmtest") due to 2 previous errors
Versions and Environment
Wasmtime version or commit: 16.0.0
Operating system: Windows 10 using WSL
Architecture: x86_64
Extra Info
Anything else you'd like to add?
Last updated: Dec 23 2024 at 13:07 UTC