Skip to main content

Crate use_bun

Crate use_bun 

Source
Expand description

§use-bun

Bun runtime metadata primitives for RustUse.

§Experimental

use-bun is experimental while use-js remains below 0.3.0.

§Example

use use_bun::{BunCommand, BunLockfile, BunVersion};

let version: BunVersion = "1.1.8".parse()?;

assert_eq!(version.major(), 1);
assert_eq!("install".parse::<BunCommand>()?, BunCommand::Install);
assert_eq!(BunLockfile::Binary.as_str(), "bun.lockb");

§Scope

  • Bun version labels.
  • Common command labels.
  • Lockfile labels.

§Non-goals

  • Running Bun.
  • Package installation.
  • Lockfile parsing.

§License

Licensed under either Apache-2.0 or MIT.

Structs§

BunVersion
Bun version metadata.

Enums§

BunCommand
Common Bun command labels.
BunCommandParseError
Error returned while parsing Bun command labels.
BunLockfile
Common Bun lockfile labels.
BunVersionParseError
Error returned while parsing a Bun version.