From fdf9abdac354bb6f4af44365328e3084f1023e2d Mon Sep 17 00:00:00 2001 From: roblabla Date: Tue, 7 Apr 2020 23:31:21 +0000 Subject: [PATCH] Attempt 1 at supporting cdylibs --- src/bin/cargo-nro.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/cargo-nro.rs b/src/bin/cargo-nro.rs index 163f1ab..7019d41 100644 --- a/src/bin/cargo-nro.rs +++ b/src/bin/cargo-nro.rs @@ -252,7 +252,7 @@ fn main() { let iter = cargo_metadata::parse_message_stream(command.stdout.unwrap()); for message in iter { match message { - Ok(Message::CompilerArtifact(ref artifact)) if artifact.target.kind[0] == "bin" => { + Ok(Message::CompilerArtifact(ref artifact)) if artifact.target.kind.contains("bin") || artifact.target.kind.contains("cdylib") => { // Find the artifact's source. This is not going to be pretty. // For whatever reason, cargo thought it'd be a *great idea* to make file URLs use // the non-standard "path+file:///" scheme, instead of, y'know, the ""file:///" everyone