Demo editing tools with js bindings
  • Rust 96.5%
  • Nix 3.5%
Find a file
2026-10-28 00:40:28 +01:00
.forgejo/workflows fix release ci 2026-10-26 00:41:53 +01:00
nix nix package 2026-10-25 23:15:51 +01:00
wasm 0.2.4 2026-10-28 00:40:28 +01: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 nix cross builds 2026-10-25 23:57:33 +01:00
flake.nix nix cross builds 2026-10-25 23:57:33 +01: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
README.md document out path 2026-10-26 00:50:35 +01:00

Demo editor

Command line editor

You can download the latest release from the releases page.

Building

cd wasm
cargo b --release --features cli

binary can be found at target/release/edit

Usage

edit [options] <path.dem> [output-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();
}

WASM bindings

Building

cd wasm
wasm-pack build -s demostf -t web

Build package can be found at pkg.