bbqsrc / cargo-ndk

Compile Rust projects against the Android NDK without hassle
Apache License 2.0
712 stars 64 forks source link

No .so files found in path #146

Closed anonyein closed 3 months ago

anonyein commented 3 months ago

I try to compile the project https://github.com/caoccao/swc4j/tree/main/rust and I am confused with the result. could you help me? After command "cargo ndk -t armeabi-v7a -t arm64-v8a -o ./jniLibs build --release" by PowerShell on Windows, the result lists as follows

....
Compiling swc_fast_graph v0.24.1 Compiling swc_graph_analyzer v0.25.1 Compiling swc_ecma_loader v0.48.1 Compiling swc_macros_common v0.3.13 Compiling env_filter v0.1.2 Compiling env_logger v0.11.5 Compiling jni v0.21.1 Compiling swc_ecma_visit v0.103.3 Compiling swc_ecma_parser v0.148.1 Compiling swc_ecma_codegen v0.154.3 Compiling swc_ecma_utils v0.133.3 Compiling swc_ecma_compat_common v0.10.1 Compiling swc_ecma_transforms_base v0.143.3 Compiling dprint-swc-ext v0.18.0 Compiling swc_ecma_transforms_classes v0.132.1 Compiling swc_ecma_compat_es2018 v0.10.2 Compiling swc_ecma_transforms_react v0.189.2 Compiling swc_ecma_compat_es2019 v0.10.1 Compiling swc_ecma_compat_es3 v0.10.2 Compiling swc_ecma_compat_es2021 v0.10.1 Compiling swc_ecma_compat_es2017 v0.10.2 Compiling swc_ecma_compat_es2016 v0.10.1 Compiling swc_ecma_transforms_optimization v0.204.2 Compiling swc_ecma_compat_es2022 v0.10.2 Compiling swc_ecma_compat_es2015 v0.10.2 Compiling swc_ecma_transforms_proposal v0.177.1 Compiling swc_ecma_compat_es2020 v0.10.2 Compiling swc_bundler v0.233.3 Compiling swc_ecma_compat_bugfixes v0.10.0 Compiling swc_ecma_transforms_typescript v0.194.2 Compiling swc_ecma_transforms_compat v0.169.2 Compiling deno_ast v0.41.1 Compiling swc4j v1.0.0 (D:\swc4j-main\rust) Finished release profile [optimized] target(s) in 1m 29s Copying libraries to D:\swc4j-main\rust\jniLibs error: No .so files found in path "D:\swc4j-main\rust\target\armv7-linux-androideabi\release" error: Did you set the crate-type in Cargo.toml to include 'cdylib'? error: For more info, see https://doc.rust-lang.org/cargo/reference/cargo-targets.html#library.

bbqsrc commented 3 months ago

Ask the crate author.