Giter Site home page Giter Site logo

ewpratten / animal-loader Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 19 KB

A Native Mod Loader for Don't Starve Together

License: GNU General Public License v3.0

Rust 53.84% Makefile 9.76% Lua 36.40%
dont-starve dont-starve-together game-modding lua-ffi rust lua

animal-loader's Introduction

A Native Mod Loader

Build Clippy

animal-loader (A not-so-acronym for "A Native Mod Loader") is an experimental, unfinished project to allow the @kleientertainment games Don't Starve and Don't Starve Together to load native mods written in rust, and support WebAssembly plugins.

I started this project with very little knowledge of how LUA handles FFI, and quickly learned my way around the system, then was immediately hit with the roadblock of Klei disabling dynamic library loading in their game (which requires a re-compile to enable). So, I decided to just leave this project as-is in case it benefits someone else, or I need some of the code here later.

How it works

At runtime, the game loads this animal-loader like any other mod. The mod's LUA script then modifies the interpreter's package.cpath to include Facebook's luaffifb as a C module. This C module then loads animal-loader's main Rust source code via LUA <--> Rust FFI.

The goal was to have the Rust code then perform its own mod-loading step, and pull in WASM modules containing other mods, but I never managed to get to this step.

Installation

Make sure you have Rust's cargo and LUA's luarocks installed, then:

# Build the mod to ./build
make

# Copy the mod files into the game's mods folder (Linux)
cp -r ./build ~/.local/share/Steam/steamapps/common/Don\'t\ Starve\ Together/mods/animal_loader

Then launch the game, and enable the mod.

animal-loader's People

Contributors

ewpratten avatar

Watchers

 avatar  avatar  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.