Demo editing tools with js bindings
  • Rust 98%
  • Nix 2%
Find a file
2026-09-09 23:53:13 +02:00
js add count_ticks method 2022-10-26 22:57:41 +02:00
wasm cargo updates 2026-09-09 23:24:05 +02:00
.envrc init 2022-09-10 16:46:33 +02:00
.gitignore player count fix wip 2025-10-09 00:46:00 +02:00
flake.lock flake update 2026-09-09 23:20:01 +02:00
flake.nix flake update 2026-09-09 23:20:01 +02:00
LICENSE_APACHE init 2022-09-10 16:46:33 +02:00
LICENSE_MIT init 2022-09-10 16:46:33 +02:00
out.txt init 2022-09-10 16:46:33 +02:00
package-lock.json node updates 2026-09-09 23:53:13 +02:00
package.json node updates 2026-09-09 23:53:13 +02:00
README.md builder updates 2025-06-18 22:24:11 +02:00
tsconfig.json node updates 2026-09-09 23:53:13 +02:00
webpack.config.js node updates 2026-09-09 23:53:13 +02:00

Demo editor

Command line editor

Building

cd wasm
cargo b --release --features cli

binary can be found at target/release/edit

Usage

edit [options] <path.dem>

See edit --help for the available options.

Rust api

use edit::{edit, EditOptions, TickRange};

fn main() {
    let options = EditOptions::builder()
        .unlock_pov(true)
        .remove_invalid_deletes(self.remove_invalid_deletes)
        .cut(TickRange {
            from: from.into(),
            to: to.into(),
        }).build();
    let input = fs::read("in.demo").unwrap();
    let output = edit(&input, options);
    fs::write("out.dem", output).unwrap();
}