Giter Site home page Giter Site logo

wargo-loader's Introduction

wargo-loader's People

Contributors

ianjsikes avatar lord avatar mrdziuban avatar sorin-davidoi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

wargo-loader's Issues

UglifyJS getting errors

I have been trying out WebAssembly and the wargo build is working well but I would really like to see if I can get this to work with uglify.
this is my error

Invalid assignment [./~/wargo-loader??ref--0!./src/main.rs:5,0][main_d6f3bb21cd455f866c7c.js:86707,47]

and this is what I am doing with my code before all that nonsense hashing.

if (typeof WebAssembly === 'object') {
  if (process.env.NODE_ENV === 'development') {
    setTimeout(() => {
      UberFunctions = getBinaryFunctions(window.Module)
      window.UberFunctions = UberFunctions
    }, 1000)
  } else {
    const wasm = require('../src/main.rs')
    wasm.initialize({ noExitRuntime: true })
    .then(mod => {
      UberFunctions = getBinaryFunctions(mod)
      window.UberFunctions = UberFunctions
      console.log(UberFunctions.add(1, 2), UberFunctions.subtract(5, 4), UberFunctions.multiply(20, 500), UberFunctions.divide(24.48, 400), 24.48 / 400)
    })
  }
  setTimeout(() => {
    console.log(UberFunctions.add(1, 2), UberFunctions.subtract(5, 4), UberFunctions.multiply(20, 500), UberFunctions.divide(24.48, 400), 24.48 / 400)
  }, 1000)
}

Do you have any suggestions. Makes building rust to WASM super fast great tool!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.