Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

133
Visualizações
How to import WasmMemory without a bundler?

I was following the tutorial on making a WASM application with Rust. I decided on not using a bundler, but I stumbled upon a question. When using a bundler, to access WASM's memory, I can simply import { memory } from "<package>/<package>_bg", but without it, I can't make it work. What I'm doing:

import init , * as wasm from "./wasm/inner.js";

async function run() {
    await init();

    window.wasm = wasm;
    wasm.debug_mode();
}

run();

This code works, and I can call Rust's functions easily. The problem is accessing WASM's memory. How do I get a reference to it, or something? Is it even possible? I stumbled upon the possibility of doing let wasm = await init();, but the methods inside this object don't work, neither does the memory object inside of it.

Thanks in advance!

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda