Code Monkey home page Code Monkey logo

infinite-money-printer's Introduction

Infinite Money Printer

Infinite Money Printer is a free, open-source, web-based incremental game.

Build Instructions

Setup

  1. Install Rust (we recommend using rustup to manage Rust toolchains; the following instructions assume you are using rustup).

  2. Install the standard Rust libraries for the wasm32-unknown-unknown target:

    rustup target add wasm32-unknown-unknown
  3. Install the wasm-bindgen-cli crate, which is used to generate bindings between Rust (WebAssembly) and JavaScript:

    cargo install wasm-bindgen-cli

Compilation

  1. From within the root source directory, invoke Cargo to build the infinite-money-printer-core crate:

    cargo build -p infinite-money-printer-core --target wasm32-unknown-unknown
  2. Invoke wasm-bindgen-cli to generate the Rust ←→ JavaScript bindings:

    wasm-bindgen --out-dir ./pkg --target web --split-linked-modules --reference-types ./target/wasm32-unknown-unknown/debug/infinite_money_printer_core.wasm

Note that cargo build defaults to debug builds. For release builds, you’ll need to add --release to the cargo build command and point wasm-bindgen-cli to the corresponding WebAssembly module:

cargo build --release -p infinite-money-printer-core --target wasm32-unknown-unknown
wasm-bindgen --out-dir ./pkg --target web --split-linked-modules --reference-types ./target/wasm32-unknown-unknown/release/infinite_money_printer_core.wasm

Native App

Infinite Money Printer is designed to run in either a web browser, or a native app via Tauri. The above instructions apply to both situations, but the latter requires some extra steps:

  1. If you are cross-compiling the native app, install the standard Rust libraries for each desired target:

    rustup target add <triple>
  2. Install the tauri-cli crate, which is used to pack and compile the native app:

    cargo install tauri-cli@"^2.0.0-beta"
  3. After compiling the WebAssembly modules (see Compilation above), invoke tauri-cli to compile the native app.

    1. You can test the native app locally before generating a release build:

      cargo tauri dev
    2. Once you’re ready, use tauri-cli to generate the release build (append --target <triple> if cross-compiling):

      cargo tauri build

infinite-money-printer's People

Contributors

faultyram avatar

Watchers

 avatar

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.