Skip to content

Commit

Permalink
fix rust ffi lib placement
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurpaulino committed Jan 13, 2023
1 parent d8f9dbf commit 2a397cb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lakefile.lean
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ extern_lib libffi (pkg : Package) := do
extern_lib some_rust_lib (pkg : Package) := do
proc { cmd := "cargo", args := #["build", "--release"], cwd := pkg.dir }
let name := nameToStaticLib "some_rust_lib"
return (pure $ pkg.dir / "target" / "release" / name)
let srcPath := pkg.dir / "target" / "release" / name
IO.FS.createDirAll pkg.libDir
let tgtPath := pkg.libDir / name
IO.FS.writeBinFile tgtPath (← IO.FS.readBinFile srcPath)
return (pure tgtPath)

0 comments on commit 2a397cb

Please sign in to comment.