Skip to content

fails to build using wasmtime #6

Description

@jtmoon79

filepath fails to build using wasmtime. This means rust target wasm32-wasi cannot be built.

error[E0046]: not all trait items implemented, missing: `path`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/filepath-0.1.2/src/lib.rs:67:1
   |
64 |     fn path(&self) -> io::Result<PathBuf>;
   |     -------------------------------------- `path` from trait
...
67 | impl FilePath for File {
   | ^^^^^^^^^^^^^^^^^^^^^^ missing `path` in implementation

For more information about this error, try `rustc --explain E0046`.
error: could not compile `filepath` due to previous error

Reproduction

  1. recreate an Ubuntu 22 environment in docker
    docker -it ubuntu:22.04 bash
    
  2. install stuff
    apt update
    apt install curl wget gcc unzip xz-utils xzip
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    . ~/.cargo/env
    rustup toolchain install 1.67.1
    rustup target add wasm32-wasi
    cargo install cargo-wasi
    curl https://wasmtime.dev/install.sh -sSf | bash
    . ~/.bashrc
    wget https://github.com/evilpie/filepath/archive/refs/heads/master.zip
    unzip master.zip
    cd filepath-master
    cargo wasi test --color=always -- --color=always
    
    installed wasmtime-v18.0.3-x86_64-linux.tar.xz
    using filepath at commit a0138f0
  3. result
    $ cargo wasi test --color=always -- --color=always
    info: downloading component 'rust-std' for 'wasm32-wasi'
    info: installing component 'rust-std' for 'wasm32-wasi'
        Updating crates.io index
       Compiling filepath v0.1.2 (/filepath-master)
    error[E0046]: not all trait items implemented, missing: `path`
      --> src/lib.rs:67:1
       |
    64 |     fn path(&self) -> io::Result<PathBuf>;
       |     -------------------------------------- `path` from trait
    ...
    67 | impl FilePath for File {
       | ^^^^^^^^^^^^^^^^^^^^^^ missing `path` in implementation
    
    For more information about this error, try `rustc --explain E0046`.
    error: could not compile `filepath` (lib) due to 1 previous error
    warning: build failed, waiting for other jobs to finish...
    error: could not compile `filepath` (lib test) due to 1 previous error
    

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions