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

Failed to add ffi features #299

Open
eigeen opened this issue Dec 9, 2024 · 2 comments
Open

Failed to add ffi features #299

eigeen opened this issue Dec 9, 2024 · 2 comments

Comments

@eigeen
Copy link

eigeen commented Dec 9, 2024

Describe the bug
Compile failed when adding ffi and deno_ffi features.

rustyscript = { version = "0.11.0", features = ["ffi", "deno_ffi"] }

   Compiling rustyscript v0.11.0
error[E0432]: unresolved import `super::web`
  --> C:\Users\Eigeen\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\rustyscript-0.11.0\src\ext\ffi\mod.rs:1:13
   |
1  | use super::{web::PermissionsContainer, ExtensionTrait};
   |             ^^^ could not find `web` in `super`
   |
note: found an item that was configured out
  --> C:\Users\Eigeen\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\rustyscript-0.11.0\src\ext\mod.rs:55:9
   |
55 | pub mod web;
   |         ^^^
note: the item is gated behind the `web` feature
  --> C:\Users\Eigeen\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\rustyscript-0.11.0\src\ext\mod.rs:54:7
   |
54 | #[cfg(feature = "web")]
   |       ^^^^^^^^^^^^^^^

error[E0433]: failed to resolve: use of undeclared crate or module `deno_permissions`
  --> C:\Users\Eigeen\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\rustyscript-0.11.0\src\ext\ffi\mod.rs:29:55
   |
29 |     fn check_partial_no_path(&mut self) -> Result<(), deno_permissions::PermissionCheckError> {
   |                                                       ^^^^^^^^^^^^^^^^ use of undeclared crate or module `deno_permissions`

error[E0433]: failed to resolve: use of undeclared crate or module `deno_permissions`
  --> C:\Users\Eigeen\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\rustyscript-0.11.0\src\ext\ffi\mod.rs:37:37
   |
37 |     ) -> Result<std::path::PathBuf, deno_permissions::PermissionCheckError> {
   |                                     ^^^^^^^^^^^^^^^^ use of undeclared crate or module `deno_permissions`

Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `rustyscript` (lib) due to 3 previous errors

Platform

  • OS: Windows 11 23H2
@eigeen
Copy link
Author

eigeen commented Dec 9, 2024

Maybe we should update the document that ffi feature needs web feature, not only deno_ffi.

@rscarson
Copy link
Owner

rscarson commented Dec 9, 2024

I should probably pull permissions out of the web feature all together since FFI is now bundled

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

No branches or pull requests

2 participants