Skip to content

Doestfhe support compiled deployment on wasm? #1111

@vladilen11

Description

@vladilen11

Does tfhe support compiled deployment on wasm? I'm trying to reference the tfhe lib in the wasm environment.

code:

tfhe = { version = "0.6.1", features = [ "boolean","shortint", "integer", "aarch64-unix"] }

build log:

  --- stderr
     Compiling getrandom v0.2.12
     Compiling concrete-csprng v0.4.0
     Compiling tfhe v0.6.1
  error: the wasm*-unknown-unknown targets are not supported by default, you may need to enable the "js" feature. For more information see: https://docs.rs/getrandom/#webassembly-support
     --> /Users/feng/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/getrandom-0.2.12/src/lib.rs:291:9
      |
  291 | /         compile_error!("the wasm*-unknown-unknown targets are not supported by \
  292 | |                         default, you may need to enable the \"js\" feature. \
  293 | |                         For more information see: \
  294 | |                         https://docs.rs/getrandom/#webassembly-support");
      | |________________________________________________________________________^

  error[E0433]: failed to resolve: use of undeclared crate or module `imp`
     --> /Users/feng/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/getrandom-0.2.12/src/lib.rs:347:9
      |
  347 |         imp::getrandom_inner(dest)?;
      |         ^^^ use of undeclared crate or module `imp`

  For more information about this error, try `rustc --explain E0433`.
  error: could not compile `getrandom` (lib) due to 2 previous errors
  warning: build failed, waiting for other jobs to finish...
  error: failed to run custom build command for `concrete-csprng v0.4.0`

  Caused by:
    process didn't exit successfully: `/Users/feng/Desktop/obelisk/substrate/substrate-node-template/target/release/wbuild/node-template-runtime/target/release/build/concrete-csprng-12ac4374190b88c7/build-script-build` (exit status: 101)
    --- stderr
    thread 'main' panicked at /Users/feng/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/concrete-csprng-0.4.0/build.rs:42:17:
    Feature `seeder_unix` requires target_family `unix`, current cfg: `wasm`
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature_requestSomething I need does not exist

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions