Giter VIP home page Giter VIP logo

Comments (5)

Dushistov avatar Dushistov commented on September 28, 2024

Hi, @spease!

error: Can not put/generate foreign lang helpers: update of c++\rust_interface\rust_str.h failed: the system cannot find the path specified. (os error 3)

I'm not sure what the proper way is to get past this error. It looks like I might be able to just copy the file over, but that seems rather inelegant and undesirable as my local copy would eventually fall out of sync with the library copy...

You don't need copy rust_str.h over, it is part of rust_swig binary (bundled as resource to rust_swig.rlib) so rust_swig always has it. The problem is in the path that you specify as output (c++\rust_interface\rust_str.h), rust_swig doesn't create directories for you, so you have to create them by hands or add to build.rs appropriate code.

from flapigen-rs.

spease avatar spease commented on September 28, 2024

Sorry, I don’t think I understand. You say they’re bundled with it, but I have to specify a path in build.rs. How do I specify a path to the resources? Is there an example somewhere?

from flapigen-rs.

Dushistov avatar Dushistov commented on September 28, 2024

You say they’re bundled with it, but I have to specify a path in build.rs.
How do I specify a path to the resources? Is there an example somewhere?

You don't need to specify a path to the resource.
You actually should not care about rust_str.h at all.
I mean something wrong with output, not with input.

I mean that message:

error: Can not put/generate foreign lang helpers: update of c++\rust_interface\rust_str.h failed: the system cannot find the path specified. (os error 3)

tells you that something is wrong with "c++\rust_interface" directory,
it doesn't exist, or you use the wrong slash character (\ instead of /),
or this path is not relative to the root of the crate.

I attached a minimal example of a crate that works for me (cargo build).
Does it work for you?

foo.zip

from flapigen-rs.

Dushistov avatar Dushistov commented on September 28, 2024

There is now detailed documentation: https://dushistov.github.io/rust_swig/ ,
plus error message about not created directory I made more clear.

from flapigen-rs.

spease avatar spease commented on September 28, 2024

from flapigen-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.