GithubHelp home page GithubHelp logo

Add a WASI build about python-launcher HOT 1 CLOSED

brettcannon avatar brettcannon commented on June 29, 2024
Add a WASI build

from python-launcher.

Comments (1)

brettcannon avatar brettcannon commented on June 29, 2024

Turns out that nix isn't supported under WASI. https://docs.rs/wasi/0.10.2+wasi-snapshot-preview1/wasi/index.html also suggests that WASI has no execv() equivalent. Farthest this could go is to break the search code out into its own crate and make sure that can be compiled by WASI.

❯ cargo build --target wasm32-wasi --release
   Compiling python-launcher v1.0.0 (/Users/brettcannon/Repositories/brettcannon/python-launcher)
error[E0432]: unresolved import `nix::unistd`
  --> src/main.rs:38:5
   |
38 | use nix::unistd;
   |     ^^^^^^^^^^^ no `unistd` in the root

error[E0433]: failed to resolve: could not find `errno` in `nix`
  --> src/main.rs:72:54
   |
72 |                     .map_err(|message| log_exit(nix::errno::errno(), message))
   |                                                      ^^^^^ could not find `errno` in `nix`

error[E0433]: failed to resolve: could not find `errno` in `nix`
  --> src/main.rs:79:50
   |
79 |                 .map_err(|message| log_exit(nix::errno::errno(), message))
   |                                                  ^^^^^ could not find `errno` in `nix`

error[E0412]: cannot find type `Result` in crate `nix`
  --> src/main.rs:93:52
   |
93 | fn run(executable: &Path, args: &[String]) -> nix::Result<()> {
   |                                                    ^^^^^^ not found in `nix`

from python-launcher.

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.