Git Product home page Git Product logo

rust-exp's Introduction

Rust Experiments

This project contains a number of experiments in the simulation / graphics category. I frequently write Haskell projects where I delegate the performance critical, numerical code to C/C++ or offload it to the GPU. I wanted to try using Rust as a safer and more functional alternative. The application itself is written in Haskell, doing the display, user interaction and non-inner-loop parts with the actual computations done in a Rust library.

rust-exp

Experiments include...

  • Software rasterizer using half-space functions, doing perspective and sub-pixel correct, gap-less rasterization, depth buffering, switchable between vertex and pixel shading, many different shaders implemented, does IBL based on pre-filtered irradiance cubemaps, different environments included, a selection of scenes, many with baked ambient occlusion or radiosity, build-in benchmarking, gamma corrected output, selectable backgrounds, parallelized
  • Gravitational N-Body simulation, both a brute force O(N^2) and the O(n log n) Barnes-Hut algorithm are implemented, adjustable time step and cutoff criteria, rendering of alpha blended particles with tails, parallelized, multiple interesting initial configurations to choose from
  • The famous 'Game of Life' cellular automata, optimized and parallelized implementation, library of recallable patterns

If you want to read actual algorithm descriptions and references for these experiments, including more, higher quality images visit the following link to my website

Rust projects on Blitzcode.net

The Haskell application itself might also be of interests. It features a pluggable experiment framework, modern OpenGL 3/4.x style rendering, text, quad rendering, screenshots, framebuffer system, FPS counter, GLSL, logging etc. A good starting point for your own Haskell + OpenGL adventures. Also see my other Haskell and GLSL program containing my distance field / ray marching related experiments.

Building

This project uses the Stack / Cabal tools (stack build) for building the Haskell code and Cargo (cargo build --release) for building the Rust code. There's a top-level Makefile invoking both, simply do

make

once you have Stack and Cargo / Rust installed.

Legal

This program is published under the MIT License.

Author

Developed by Tim C. Schroeder, visit my website to learn more.

rust-exp's People

Contributors

blitzcode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rust-exp's Issues

error while loading shared libraries: librust_exp.so

After running make and executing the produced rust-exp executable, I'm getting the following error

~/dev/rust-exp/.stack-work/install/x86_64-linux/lts-5.4/7.10.3/bin/rust-exp: error while loading shared libraries: librust_exp.so: cannot open shared object file: No such file or directory

Here is the output when running make
results.txt

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.