Skip to content

2.0: rewrite in Rust #1153

@Sk7Str1p3

Description

@Sk7Str1p3

Why

#918, #789

Approaches:

  • App, not script

    For now, disko is bash script calling nix eval, which is launching commands via shell. This produces bad (i mean BAD) tracing, low performance and hard maintenance. Rust implementation will call functions from libraries directly - there are many crates for interacting with various filesystems, partition tables, luks and lvm, etc...
  • Direct usage without nix eval

    Same reasons as in first statement. Solution is quite easy - we use Nix only to convert config to JSON or TOML, and use generated config, or even parse nix config directly.

Also, i hope it's easier to implement some features in rust than bash:

  • Boot time formatting (Boot time disko formatting #917)
  • Gentle partitioning
    • This means it will not just wipe partition, but try to convert it first. For example, MBR can be converted into GPT, ext4 into btrfs and so on. No guaranties on proper convertion without data loss though, user will be warned

Result:

  • Better trace
  • Faster and flexible partitioning
  • Features that would be difficult to implement on bash

@Mic92 @Lassulus

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions