Git Product home page Git Product logo

Comments (7)

bnjbvr avatar bnjbvr commented on June 26, 2024

The only information I get is that it returns exit code 2, fwiw.

from ittapi.

bnjbvr avatar bnjbvr commented on June 26, 2024

Also credits to @Jake-Shadle for noticing that the OS cfg! might be busted in cross-compilation environments: we should try to use https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts instead.

from ittapi.

bnjbvr avatar bnjbvr commented on June 26, 2024

I think I understand a bit more what's going on, after using cargo build -vv the error's details are printed out to stderr, and it complains about the C file not being found. That's because on Windows, the symbolic links don't seem to work, so the src and include paths can't be read. On the other hand, if we use just relative paths to ../src and ../include, that compiles fine on both Windows and Linux.

However, with that relative path, we can't package the crate anymore, because it references files that are external to the source directory. With the symbolic links solution, cargo package seems to copy the content of the symlinked files, which seems sufficient. So that means that the current solution would work if we only packaged from a Linux install, and then the packaged crate would compile Just Fine on Linux & Windows.

It's not ideal though, because it makes local development and testing of ittapi-rs on Windows painful. Wonder if there would be other ways that work on all platforms, and allow testing/publishing from every platform.

from ittapi.

bnjbvr avatar bnjbvr commented on June 26, 2024

A small reorganization of the code could maybe work: the interesting C source files would be moved to the Rust directory, and the C code itself would contain symlinks to those C files. Will try that.

from ittapi.

abrown avatar abrown commented on June 26, 2024

@bnjbvr, with #41 merged and #44 in the queue, this issue should be on the way to being closed. I think the remaining part may be to (1) do some more testing in a Windows environment (I have done this but I would like a double-check if possible), and (2) publish a new version of the crate--perhaps v0.2.0? (cc: @jlb6740)

from ittapi.

bnjbvr avatar bnjbvr commented on June 26, 2024

Could confirm it worked with the canonical doc example in wasmtime on Windows 👍

from ittapi.

abrown avatar abrown commented on June 26, 2024

Closing, seee latest 0.2.0 release of the Rust crate.

from ittapi.

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.