GithubHelp home page GithubHelp logo

graphite's Introduction

Graphite -- CURRENTLY ON HIATUS

1.19.1 Minecraft Server

TODO

  • Complete protocol with all 1.19.1 Minecraft packets
  • Command dispatch system
  • Viewable objects (entities)
  • Allow multiple players to connect (and see each other)
  • Base lib crate that reexports everything
  • ItemStacks with NBT
  • Add layer for modifying the NBT of items easily
  • Player Input Handling (Left/Right Click Air/Block)
  • TextComponent things & macro
  • Allow chunk/world modification
  • Complete missing block placement (walls, double blocks, candles, etc.)
  • "Extras" subproject - raycasting, collision, ...

Subprojects

  • example_server: Example server using various Graphite components
  • server: The minecraft server. Entities, chunks, players, all that good stuff
  • concierge: Component that accepts new connections, handles status and login. Can be used to create proxies, servers, etc.
  • protocol: The minecraft protocol
  • net: Networking components and utilities
  • binary: Zero-copy serialization
  • command: Command dispatch and low-level creation
  • command_derive: Attribute macro to easily create commands
  • sticky: Collection(s) that guarantee the memory-location of its contents

Warning

Project is currently under heavy development, many things are completely non-functional

Building

Make sure to run git submodule update --init --recursive before building/running

How to run the example server

!!! Currently Graphite only supports modern versions of Linux with io_uring !!!
(An alternative network backend will be available eventually, but is not a priority)

$ cargo run --bin example_server

graphite's People

Contributors

moulberry avatar rj00a 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  avatar

graphite's Issues

no readme

a README.md is a great way to tell people what the heck your project is, how to help build it, and how to test what you’ve made. once you’re at the point where others can help, i’d highly recommend making one

Potential OOM bug/exploit in graphite NBT

In crates/graphite_binary/src/nbt/decode.rs the read_list function uses Vec::with_capacity(length as _). However, length has no upper bound. I believe malicious input could potentially allocate i32::MAX * sizeof(usize) bytes.

The other read functions are correctly bounded.

Transmute between `Vec` types in graphite NBT

In crates/graphite_binary/src/nbt/decode.rs there is this

let vec: Vec<u8> = arr_bytes.into();
Ok(unsafe { std::mem::transmute(vec) })

Transmuting between Vec types is incorrect because #[repr(Rust)] types make no guarantee about their layout. The Rustonomicon has this to say:

So how do you know if the layouts are the same? For repr(C) types and repr(transparent) types, layout is precisely defined. But for your run-of-the-mill repr(Rust), it is not. Even different instances of the same generic type can have wildly different layout. Vec<i32> and Vec<u32> might have their fields in the same order, or they might not. The details of what exactly is and is not guaranteed for data layout are still being worked out over at the UCG WG.

Rewrite it in rust

Rust is blazingly fast and memory-efficient: with no runtime or garbage collector, it can power performance-critical services, run on embedded devices, and easily integrate with other languages.

Rust’s rich type system and ownership model guarantee memory-safety and thread-safety — enabling you to eliminate many classes of bugs at compile-time.

Rust has great documentation, a friendly compiler with useful error messages, and top-notch tooling — an integrated package manager and build tool, smart multi-editor support with auto-completion and type inspections, an auto-formatter, and more.

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.