Git Product home page Git Product logo

pnrust's Introduction

PNRust

A Rust integration for GameMaker.

Package Structure

The rust directory contains all the Rust code that makes PNRust possible. It is comprised of the following subtrees:

  • modules, the directory where all your PNRust modules are stored.
  • pn-rust, a crate shared by all PNRust modules.
  • pn_rust_dll, a DLL that powers PNRust.
  • generate-dll, a binary that generates the glue that holds the module system together.

Getting Started

First of all, you need to copy rs_build.bat, rust, the PNRust extension, and the pn_rust script to your game folder. Use "Add existing" for the latter two.

Before you can use PNRust, you need to call rs_init somewhere in your game's code.

After that, create a new module in rust/modules. Check out the example module for more info.

Once you make any changes to the Rust code, run rs_build.bat. You should run it inside an open command prompt to see any build errors.

See the next section to learn how to install the necessary Rust build tools.

GML example:

rs_init()

// Assuming you've exported `my_function` from, e.g., `my_great_module`.
var result = rs_call("my_function", [69])

show_debug_message("my_function: " + string(result))

Rust Build Tools

First, you need to install rustup. Get the stable branch and add it to your PATH.

After that, install the stable-i686-pc-windows-gnu toolchain by running this inside a command prompt:

rustup toolchain install stable-i686-pc-windows-gnu --profile minimal

pnrust's People

Contributors

nonk123 avatar

Stargazers

Mayhem.Fntrck 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.