gdlib

Crates.iogdlib
lib.rsgdlib
version0.2.7
created_at2025-09-05 18:19:20.702105+00
updated_at2026-01-06 02:40:18.071223+00
descriptionRust library for editing Geometry Dash savefiles
homepage
repositoryhttps://github.com/ArrowSlashArrow/gdlib
max_upload_size
id1825900
size8,042,978
(ArrowSlashArrow)

documentation

README

GDLib

A library to interface with GD savefiles built in rust.

Capabilities

  • Create and edit levels with full control
  • Make objects with custom properties
  • Read and write to Geometry Dash .dat savefiles
  • Fast and lightweight

Examples

Install this crate through cargo add gdlib

Example code:

use gdlib::gdlevel::{Level, Levels};
use gdlib::gdobj::{misc, triggers, GDObjConfig};

// Fetch levels from your CCLocalLevels.dat file
let mut levels = Levels::from_local().unwrap();

// Create a new Level object
let mut new_level = Level::new("New Level", "You", None, None);

// Add objects to new_level
new_level.add_object(triggers::triggers::move_trigger(
    GDObjConfig::default().pos(45.0, 45.0).groups([1234]), 
    triggers::MoveMode::Default(triggers::DefaultMove {
        dx: 45.0,
        dy: 54.0,
        x_lock: None,
        y_lock: None
    }), 
    0.50, 1, false, true, Some((MoveEasing::ElasticInOut, 1.50))
));
new_level.add_object(misc::default_block(GDObjConfig::default().pos(15.0, 15.0)));

// Add level to master Levels object and export back to savefile
levels.add_level(new_level);
levels.export_to_savefile_with_backup().unwrap();
Commit count: 85

cargo fmt