notdanilo / ligen-core

Rust Language Interface Generator Core
Apache License 2.0
1 stars 0 forks source link

Wrong Generator library path #1

Open notdanilo opened 4 years ago

notdanilo commented 4 years ago
https://github.com/danguafer/ligen-core/blob/devenv/src/generator.rs
l60:        let library = lib::Library::new(format!("{}/../ligen_{}", crate::get_path(), name));

has the following issues:

  1. "/../" isn't interpreted as expected on Linux
  2. name needs to be lowercase
  3. it lacks file extension
  4. lacks lib prefix

for instance:

if crate::get_path() == "./target/debug/ligen" and name == "CPP" it will result ./target/debug/ligen/../ligen_CPP instead of ./target/debug/libligen_cpp.so