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)
- Visit the latest release
- Under Assets, click
luau-cargo-semver.rbxm
- 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")