Skip to main content

All Questions

Tagged with
0 votes
0 answers
35 views

How can I use imported memory in Rust code targeting `wasm32-unknown-unknown`?

I have the following Rust code: use wasmer::{ imports, AsStoreRef, Function, FunctionEnv, FunctionEnvMut, Instance, Memory, MemoryType, Module, Store, }; const WAT_CODE: &str = r#" (...
Archy's user avatar
  • 310
0 votes
0 answers
32 views

Getting console errors when trying to run model in browser using rust, wasm and wonnx

I'm attempting to embed some text as vectors in the browser using rust, webassembly and wonnx. When I try and run my model in the demo, I get these errors in the console: wonnx_embeddings_repro_bg.js:...
Jacob Marshall's user avatar
0 votes
0 answers
36 views

Npm cannot find an executable while running the create-wasm-app JavaScript project template

I have been following a Rust + WebAssembly Tutorial and on the 2nd part of the 2nd chapter, after looking into the files and telling you how to build them, the tutorial asks you to run this command: ...
Waffleleroo's user avatar
-1 votes
0 answers
27 views

How to Integrate Wasmer (WASM) with Swift iOS Project?

I am working on an iOS project where I need to integrate a WebAssembly (Wasm) module using the Wasmer runtime. I have successfully compiled my code into a .wasm file, but I am struggling with ...
Artisan Craft's user avatar
1 vote
1 answer
49 views

Compiling Raylib-Rust game to WASM

I've successfully compiled my game to WASM with the flags: EMCC_CFLAGS="-sUSE_GLFW=3 -sGL_ENABLE_GET_PROC_ADDRESS -sASYNCIFY -sASSERTIONS --preload-file src/resources" cargo build --release -...
coolguy123's user avatar
-1 votes
1 answer
46 views

How can I determine if a key is pressed in Dioxus?

I'm working on a dioxus desktop app where I have a long list of check boxes. I want to be able to shift select to check off a range of them at once but can't figure out how to determine if the shift ...
crfellows's user avatar
0 votes
0 answers
65 views

How do I work with a large (~3gb) file in web assembly

A bit of background: I would like to avoid using stdweb, because it seems to be unmaintained. use web_sys::{File as WebFile}; // What I get pub fn process_emails(file: WebFile, json_file_path: &...
Jacob Marshall's user avatar
0 votes
1 answer
65 views

how do I import my webassembly into nextjs

as you can see in the picture I copied the contents of pkg to the public nextjs projects folder. The nextjs app is initialized inside my rust lib project. [package] name = "chess" version = &...
hacker man's user avatar
2 votes
1 answer
47 views

How to compile a wasm via rust to access the Global Val?

Currently, I am working on a project which uses the wasmtime (a wasm runtime implemented by rust) to load and initiate some wasm modules. And I would like a wasm module to access the global val. So I ...
jiangNan langzi's user avatar
0 votes
1 answer
45 views

Does WASM Bindgen copy &mut [u8] zero times or twice?

From JavaScript, I call this Rust function. Does Bindgen copy the memory twice or zero times? #[wasm_bindgen] pub fn mod_u8_slice(input_output: &mut [u8]) { input_output.iter_mut().for_each(|x|...
Carl's user avatar
  • 373
0 votes
0 answers
42 views

Cors Issues - Nextjs and wasm scripts

I am trying to rewrite deployed Wasm app to nextjs route. Actually I have tried different approaches, but it always fails. Here's probably the simplest app I wanted to rewrite. Here's the entry point: ...
Wiktor Kujawa's user avatar
2 votes
1 answer
60 views

Build wasm with import memory wasm

I want to write code in rust which I will then compile into wasm so that it uses import memory. In the compiled file the wasm from rust want to see similar code (module (import "host" &...
Danila's user avatar
  • 73
2 votes
0 answers
32 views

After 'cargo install wasm-pack' do I need to manually update chrome & chromedriver?

I'm on Windows 11. When I cargo install wasm-pack it installs chromedriver v 114, but v 114 doesn't work with the current version of Chrome. I want to be able to run tests via wasm-pack test --chrome -...
Carl's user avatar
  • 373
0 votes
0 answers
24 views

How to pass parameters to the chromedriver when running Rust tests

I'm trying to reproduce an example of Rust-application by following the step-by-step instructions. Everything was going fine before the start of testing. I stopped at the last line of this page. Only ...
Konstantin Makarov's user avatar
0 votes
0 answers
47 views

Calling wasm code from rust through wasm-bindgen

I have inherited a .wasm binary that was initially compiled from Rust with wasm-bindgen. I need to call this binary from Rust. For this sake, I'm using wasmtime. I have dutifully bound all the exports,...
Yoric's user avatar
  • 4,051

15 30 50 per page
1
2 3 4 5
27