consensus-shipyard / ipc

Apache License 2.0
33 stars 30 forks source link

Add `wasm` support for `fvm_shared` #1038

Open dtbuchholz opened 1 week ago

dtbuchholz commented 1 week ago

Issue type

Feature Request

Have you reproduced the bug with the latest dev version?

Yes

Version

0.1.0

Custom code

Yes

OS platform and distribution

Mac OS Sonoma 14.3

Describe the issue

Summary

When using fvm_shared and compiling to a wasm32, non-default features are pulled in due to the crypto feature flag. This flag pulls in the filecoin-proofs-api, which leads to problems on a wasm build.

You can see additional conversations here and here.

Details

You'll see the error (below) complaining about the positioned-io and fs2 libraries. If you tease out patches for a wasm32 build, you'll then run into an issue with sha2_asm, which does not support wasm. That is, it's a cascading transitive dependency problem that stems from the merkletree library, which gets pulled in via the filecoin-proofs-api. You can run the cargo tree command in the Basin repo for more details.

Repro steps

  1. Clone the Basin repo, which uses fvm_shared in the adm_sdk crate: git clone https://github.com/textileio/basin
  2. Checkout the dtb/wasm-support branch, which tries to do a simple enum export from the adm_sdk
  3. Try to compile to wasm: wasm-pack build --target nodejs wasm

Relevant log output

> wasm-pack build --target nodejs wasm
[INFO]: 🎯  Checking for the Wasm target...
[INFO]: 🌀  Compiling to Wasm...
    Blocking waiting for file lock on package cache
   Compiling positioned-io v0.3.3
   Compiling sha2-asm v0.6.3
   Compiling fs2 v0.4.3
   Compiling impl-rlp v0.3.0
   Compiling fixed-hash v0.8.0
   Compiling tiny-keccak v2.0.2
   Compiling impl-serde v0.4.0
   Compiling mio v0.8.11
error[E0433]: failed to resolve: use of undeclared type `SeekFrom`
  --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/positioned-io-0.3.3/src/raf.rs:78:29
   |
78 |         let pos = file.seek(SeekFrom::Current(0))?;
   |                             ^^^^^^^^ use of undeclared type `SeekFrom`
   |
help: consider importing this enum
   |
7  + use io::SeekFrom;
   |

error[E0433]: failed to resolve: use of undeclared type `SeekFrom`
  --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/positioned-io-0.3.3/src/raf.rs:94:30
   |
94 |         match self.file.seek(SeekFrom::Start(self.pos)) {
   |                              ^^^^^^^^ use of undeclared type `SeekFrom`
   |
help: consider importing this enum
   |
7  + use io::SeekFrom;
   |

error[E0433]: failed to resolve: use of undeclared crate or module `sys`
  --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fs2-0.4.3/src/lib.rs:98:9
   |
98 |         sys::duplicate(self)
   |         ^^^ use of undeclared crate or module `sys`

   Compiling socket2 v0.5.6
   Compiling base64 v0.21.7
error[E0433]: failed to resolve: use of undeclared crate or module `sys`
   --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fs2-0.4.3/src/lib.rs:101:9
    |
101 |         sys::allocated_size(self)
    |         ^^^ use of undeclared crate or module `sys`

error[E0433]: failed to resolve: use of undeclared crate or module `sys`
   --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fs2-0.4.3/src/lib.rs:104:9
    |
104 |         sys::allocate(self, len)
    |         ^^^ use of undeclared crate or module `sys`

error[E0433]: failed to resolve: use of undeclared crate or module `sys`
   --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fs2-0.4.3/src/lib.rs:107:9
    |
107 |         sys::lock_shared(self)
    |         ^^^ use of undeclared crate or module `sys`

error[E0433]: failed to resolve: use of undeclared crate or module `sys`
   --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fs2-0.4.3/src/lib.rs:110:9
    |
110 |         sys::lock_exclusive(self)
    |         ^^^ use of undeclared crate or module `sys`

error[E0433]: failed to resolve: use of undeclared crate or module `sys`
   --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fs2-0.4.3/src/lib.rs:113:9
    |
113 |         sys::try_lock_shared(self)
    |         ^^^ use of undeclared crate or module `sys`

error[E0433]: failed to resolve: use of undeclared crate or module `sys`
   --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fs2-0.4.3/src/lib.rs:116:9
    |
116 |         sys::try_lock_exclusive(self)
    |         ^^^ use of undeclared crate or module `sys`

error[E0433]: failed to resolve: use of undeclared crate or module `sys`
   --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fs2-0.4.3/src/lib.rs:119:9
    |
119 |         sys::unlock(self)
    |         ^^^ use of undeclared crate or module `sys`

error[E0433]: failed to resolve: use of undeclared crate or module `sys`
   --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fs2-0.4.3/src/lib.rs:126:5
    |
126 |     sys::lock_error()
    |     ^^^ use of undeclared crate or module `sys`

error[E0433]: failed to resolve: use of undeclared crate or module `sys`
   --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fs2-0.4.3/src/lib.rs:169:5
    |
169 |     sys::statvfs(path.as_ref())
    |     ^^^ use of undeclared crate or module `sys`

For more information about this error, try `rustc --explain E0433`.
error: could not compile `fs2` (lib) due to 10 previous errors
warning: build failed, waiting for other jobs to finish...
error[E0599]: no method named `seek` found for struct `File` in the current scope
    --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/positioned-io-0.3.3/src/raf.rs:78:24
     |
78   |         let pos = file.seek(SeekFrom::Current(0))?;
     |                        ^^^^ method not found in `File`
     |
    ::: /Users/dtb/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/io/mod.rs:1897:8
     |
1897 |     fn seek(&mut self, pos: SeekFrom) -> Result<u64>;
     |        ---- the method is available for `File` here
     |
     = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
     |
1    + use std::io::Seek;
     |

error[E0599]: no method named `seek` found for struct `File` in the current scope
    --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/positioned-io-0.3.3/src/raf.rs:94:25
     |
94   |         match self.file.seek(SeekFrom::Start(self.pos)) {
     |                         ^^^^ method not found in `File`
     |
    ::: /Users/dtb/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/io/mod.rs:1897:8
     |
1897 |     fn seek(&mut self, pos: SeekFrom) -> Result<u64>;
     |        ---- the method is available for `File` here
     |
     = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
     |
1    + use std::io::Seek;
     |

error[E0277]: the trait bound `&RandomAccessFile: WriteAt` is not satisfied
   --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/positioned-io-0.3.3/src/raf.rs:141:27
    |
141 |         WriteAt::write_at(&mut &*self, pos, buf)
    |         ----------------- ^^^^^^^^^^^ the trait `WriteAt` is not implemented for `&RandomAccessFile`
    |         |
    |         required by a bound introduced by this call
    |
help: consider removing the leading `&`-reference
    |
141 -         WriteAt::write_at(&mut &*self, pos, buf)
141 +         WriteAt::write_at(&*self, pos, buf)
    |

error[E0277]: the trait bound `&RandomAccessFile: WriteAt` is not satisfied
   --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/positioned-io-0.3.3/src/raf.rs:145:24
    |
145 |         WriteAt::flush(&mut &*self)
    |         -------------- ^^^^^^^^^^^ the trait `WriteAt` is not implemented for `&RandomAccessFile`
    |         |
    |         required by a bound introduced by this call
    |
help: consider removing the leading `&`-reference
    |
145 -         WriteAt::flush(&mut &*self)
145 +         WriteAt::flush(&*self)
    |

error: failed to run custom build command for `sha2-asm v0.6.3`

Caused by:
  process didn't exit successfully: `/Users/dtb/adm/adm/target/release/build/sha2-asm-e7862434e1e5e20e/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sha2-asm-0.6.3/build.rs:19:9:
  Unsupported target architecture
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Some errors have detailed explanations: E0277, E0433, E0599.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `positioned-io` (lib) due to 6 previous errors
Error: Compiling your crate to WebAssembly failed
Caused by: Compiling your crate to WebAssembly failed
Caused by: failed to execute `cargo build`: exited with exit status: 101
  full command: cd "wasm" && "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown"
raulk commented 6 days ago

@dtbuchholz The dtb/wasm-support branch doesn't exist any longer under https://github.com/textileio/basin. I'm attempting to reproduce in order to poke around at the dependency tree.

dtbuchholz commented 1 day ago

@raulk sorry for the delay here—we had an offsite last week and weren't really connected to the internet much! also, I'm not sure what happened to the old wasm setup, so I've just recreated it. you can find it here: dtb/wasm-support. I'm using the wasm-pack boilerplate with a single Basin SDK import:

use wasm_bindgen::prelude::*;

use adm_sdk::network::Network;

#[wasm_bindgen]
extern "C" {
    fn alert(s: &str);
}

#[wasm_bindgen]
pub fn initialize_network() {
    Network::Testnet.init();
    alert("initialized network");
}

now, it looks like the first time your run wasm-pack, it complains about blst (i.e., without the dependency errors mentioned above): warning: blst@0.3.11: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'

then, all subsequent build attempts will complain about the aforementioned positioned-io etc. dependencies.

here are the logs:

first time building
The following warnings were emitted during compilation:

warning: blst@0.3.11: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
warning: blst@0.3.11: 1 error generated.

error: failed to run custom build command for `blst v0.3.11`

Caused by:
  process didn't exit successfully: `/Users/dtb/textile/basin/target/release/build/blst-b200d02c0b326ff6/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=BLST_TEST_NO_STD
  Using blst source directory /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/blst-0.3.11/blst
  cargo:rerun-if-changed=/Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/blst-0.3.11/blst/src
  TARGET = Some("wasm32-unknown-unknown")
  HOST = Some("aarch64-apple-darwin")
  cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown
  CC_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown
  CC_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown
  CFLAGS_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown
  CFLAGS_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown
  CC_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown
  CC_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown
  CFLAGS_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown
  CFLAGS_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown
  CC_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown
  CC_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown
  CFLAGS_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown
  CFLAGS_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown
  CC_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown
  CC_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown
  CFLAGS_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown
  CFLAGS_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown
  CC_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown
  CC_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown
  CFLAGS_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown
  CFLAGS_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
  cargo:warning=1 error generated.

  --- stderr

  error occurred: Command "clang" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-Wall" "-Wextra" "-ffreestanding" "-D__BLST_NO_ASM__" "-DSCRATCH_LIMIT=(45 * 1024)" "-o" "/Users/dtb/textile/basin/target/wasm32-unknown-unknown/release/build/blst-d7105b903104e7e9/out/23f7fac37c814c3c-server.o" "-c" "/Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/blst-0.3.11/blst/src/server.c" with args clang did not execute successfully (status code exit status: 1).

warning: build failed, waiting for other jobs to finish...
Error: Compiling your crate to WebAssembly failed
Caused by: Compiling your crate to WebAssembly failed
Caused by: failed to execute `cargo build`: exited with exit status: 101
  full command: cd "/Users/dtb/textile/basin/wasm" && "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown"
subsequent builds
error[E0433]: failed to resolve: use of undeclared type `SeekFrom`
  --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/positioned-io-0.3.3/src/raf.rs:78:29
   |
78 |         let pos = file.seek(SeekFrom::Current(0))?;
   |                             ^^^^^^^^ use of undeclared type `SeekFrom`
   |
help: consider importing this enum
   |
7  + use io::SeekFrom;
   |

error[E0433]: failed to resolve: use of undeclared type `SeekFrom`
  --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/positioned-io-0.3.3/src/raf.rs:94:30
   |
94 |         match self.file.seek(SeekFrom::Start(self.pos)) {
   |                              ^^^^^^^^ use of undeclared type `SeekFrom`
   |
help: consider importing this enum
   |
7  + use io::SeekFrom;
   |

error[E0599]: no method named `seek` found for struct `File` in the current scope
    --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/positioned-io-0.3.3/src/raf.rs:78:24
     |
78   |         let pos = file.seek(SeekFrom::Current(0))?;
     |                        ^^^^ method not found in `File`
     |
    ::: /Users/dtb/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/io/mod.rs:1919:8
     |
1919 |     fn seek(&mut self, pos: SeekFrom) -> Result;
     |        ---- the method is available for `File` here
     |
     = help: items from traits can only be used if the trait is in scope
help: trait `Seek` which provides `seek` is implemented but not in scope; perhaps you want to import it
     |
1    + use std::io::Seek;
     |

error[E0599]: no method named `seek` found for struct `File` in the current scope
    --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/positioned-io-0.3.3/src/raf.rs:94:25
     |
94   |         match self.file.seek(SeekFrom::Start(self.pos)) {
     |                         ^^^^ method not found in `File`
     |
    ::: /Users/dtb/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/io/mod.rs:1919:8
     |
1919 |     fn seek(&mut self, pos: SeekFrom) -> Result;
     |        ---- the method is available for `File` here
     |
     = help: items from traits can only be used if the trait is in scope
help: trait `Seek` which provides `seek` is implemented but not in scope; perhaps you want to import it
     |
1    + use std::io::Seek;
     |

error[E0277]: the trait bound `&RandomAccessFile: WriteAt` is not satisfied
   --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/positioned-io-0.3.3/src/raf.rs:141:27
    |
141 |         WriteAt::write_at(&mut &*self, pos, buf)
    |         ----------------- ^^^^^^^^^^^ the trait `WriteAt` is not implemented for `&RandomAccessFile`
    |         |
    |         required by a bound introduced by this call
    |
help: consider removing the leading `&`-reference
    |
141 -         WriteAt::write_at(&mut &*self, pos, buf)
141 +         WriteAt::write_at(&*self, pos, buf)
    |

error[E0277]: the trait bound `&RandomAccessFile: WriteAt` is not satisfied
   --> /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/positioned-io-0.3.3/src/raf.rs:145:24
    |
145 |         WriteAt::flush(&mut &*self)
    |         -------------- ^^^^^^^^^^^ the trait `WriteAt` is not implemented for `&RandomAccessFile`
    |         |
    |         required by a bound introduced by this call
    |
help: consider removing the leading `&`-reference
    |
145 -         WriteAt::flush(&mut &*self)
145 +         WriteAt::flush(&*self)
    |

Some errors have detailed explanations: E0277, E0433, E0599.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `positioned-io` (lib) due to 6 previous errors
warning: build failed, waiting for other jobs to finish...
The following warnings were emitted during compilation:

warning: blst@0.3.11: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
warning: blst@0.3.11: 1 error generated.

error: failed to run custom build command for `blst v0.3.11`

Caused by:
  process didn't exit successfully: `/Users/dtb/textile/basin/target/release/build/blst-b200d02c0b326ff6/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=BLST_TEST_NO_STD
  Using blst source directory /Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/blst-0.3.11/blst
  cargo:rerun-if-changed=/Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/blst-0.3.11/blst/src
  TARGET = Some("wasm32-unknown-unknown")
  HOST = Some("aarch64-apple-darwin")
  cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown
  CC_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown
  CC_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown
  CFLAGS_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown
  CFLAGS_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown
  CC_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown
  CC_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown
  CFLAGS_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown
  CFLAGS_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown
  CC_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown
  CC_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown
  CFLAGS_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown
  CFLAGS_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown
  CC_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown
  CC_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown
  CFLAGS_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown
  CFLAGS_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown
  CC_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown
  CC_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown
  CFLAGS_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown
  CFLAGS_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
  cargo:warning=1 error generated.

  --- stderr

  error occurred: Command "clang" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-Wall" "-Wextra" "-ffreestanding" "-D__BLST_NO_ASM__" "-DSCRATCH_LIMIT=(45 * 1024)" "-o" "/Users/dtb/textile/basin/target/wasm32-unknown-unknown/release/build/blst-d7105b903104e7e9/out/23f7fac37c814c3c-server.o" "-c" "/Users/dtb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/blst-0.3.11/blst/src/server.c" with args clang did not execute successfully (status code exit status: 1).

Error: Compiling your crate to WebAssembly failed
Caused by: Compiling your crate to WebAssembly failed
Caused by: failed to execute `cargo build`: exited with exit status: 101
  full command: cd "/Users/dtb/textile/basin/wasm" && "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown"
dtbuchholz commented 1 day ago

re: your question in the PR—i may have linked to a private repo before. here's the public builtin-actors repo, and here's the forked ipc repo that uses it. but, the dependency graph for cargo tree -i builtin-actors doesn't log anything in the basin repo, actually.

basin does, however, use fendermint actors and IPC actor ABIs and IPC APIs from the ipc repo. I'm not sure if that's relevant, though, but figured i'd mention it.