Skip to main content

Installation

Method 1 - Git Submodule

Add the luau-cargo-semver repository as a git submodule (Git Submodules explanation):

git submodule add https://github.com/Tim7775/luau-cargo-semver.git/ .lune/luau-cargo-semver

Scripts in the .lune folder can now require Semver as follows:

local Semver = require("./luau-cargo-semver/lib/Semver")

Method 2 - Wally package (Roblox)

Add Semver to your wally.toml dependency list:

[dependencies]
Semver = "tim7775/semver@1"

Then run wally install within your project.

Semver can now be required like any other module grabbed from Wally.

ℹ️ Note:
Not familiar with Wally? Wally is a package manager (like npm) for the Roblox ecosystem. To get started, check out the Wally repository.

Method 3 - Manual (Roblox)

  1. Visit the latest release
  2. Under Assets, click luau-cargo-semver.rbxm
  3. Open Roblox Studio and drag the file into the explorer

Method 4 - npm (roblox-ts)

Run the following command to install the cargo-semver roblox-ts package:

npm install @rbxts/cargo-semver

Semver can now be imported and used as follows:

import Semver from "@rbxts/cargo-semver"
const [ok, message] = Semver.validateVersion("1.0.0")