• Stars
    star
    109
  • Rank 319,077 (Top 7 %)
  • Language
    Rust
  • License
    MIT License
  • Created about 5 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Command line tool to manage Roblox assets

Tarmac


Heads up! This repository was recently migrated from the rojo-rbx org to the Roblox org. Not much else has changed.

Tarmac is a resource compiler and asset manager for Roblox projects. It helps enable hermetic place builds when used with tools like Rojo.

Tarmac is inspired by projects like Webpack that make it easy to reference assets from code.

Installation

Installing with Foreman

The recommended way to install Tarmac is with Foreman.

Add an entry to the [tools] section of your foreman.toml file:

foreman = { source = "Roblox/tarmac", version = "0.7.0" }

Installing from GitHub Releases

Pre-built binaries are available for 64-bit Windows, macOS, and Linux from the GitHub releases page.

Installing from Source

Tarmac requires Rust 1.39.0 or newer to build.

You can build the latest release of Tarmac from crates.io:

cargo install tarmac

or build the latest work from the master branch:

cargo install --git https://github.com/Roblox/tarmac

Basic Example

The examples folder contains small, working projects using different features from Tarmac.

Tarmac is configured by a TOML file in the root of a project named tarmac.toml. Tarmac uses this file to determine where to look for assets and what to do with them.

To tell Tarmac to manage PNG files in a folder named assets, you can use:

name = "basic-tarmac-example"

# Most projects will define some 'inputs'.
# This tells Tarmac where to find assets that we'll use in our game.
[[inputs]]
glob = "assets/**/*.png"
codegen = true
codegen-path = "src/assets.lua"
codegen-base-path = "assets"

Run tarmac sync --target roblox to have Tarmac upload any new or updated assets that your project depends on. You may need to pass a .ROBLOSECURITY cookie explicitly via the --auth argument.

Tarmac will generate Lua code in src/assets.lua that looks something like this:

-- This file was @generated by Tarmac. It is not intended for manual editing.
return {
	foo = {
		bar = "rbxassetid://238549023",
		baz = "rbxassetid://238549024",
	}
}

These files will be turned into ModuleScript instances by tools like Rojo. From there, it's easy to load this module and reference the assets within:

local assets = require(script.Parent.assets)

local decal = Instance.new("Decal")
decal.Texture = assets.foo.bar

Command Line Interface

For more information, run tarmac --help.

Global Options

These options can be specified alongside any subcommands and are all optional.

  • --help, -h
    • Prints help information about Tarmac and exits.
  • --version, -V
    • Prints version information about Tarmac and exits.
  • --auth <cookie>
    • Explicitly defines the authentication cookie Tarmac should use to communicate with Roblox.
    • If not specified, Tarmac will attempt to locate one from the local system.
  • --verbose, -v
    • Enables more verbose logging. Can be specified up to three times, which will increase verbosity further.

tarmac sync

Detects changes to assets in the local project and attempts to synchronize them with an external service, like the Roblox cloud.

Usage:

tarmac sync [<config-path>] \
	--target <roblox|debug|none>
	--retry <number>
	--retry-delay <60>

To sync the project in your current working directory with the Roblox cloud, use:

tarmac sync --target roblox

To validate that all inputs are already synced, use the none target:

tarmac sync --target none

When tarmac gets rate limited while syncing to Roblox, use the --retry argument to automatically attempt to re-upload. This will tell tarmac how many times it can attempt to re-upload each asset. The --retry-delay sets the number of seconds to wait between each attempt.

tarmac sync --target roblox --retry 3

tarmac upload-image

Uploads a single image as a decal and prints the ID of the resulting image asset to stdout.

Usage:

tarmac upload-image <image-path> \
	--name <asset-name> \
	--description <asset-description>

Example:

tarmac upload-image foo.png --name "Foo" --description "Foo is a placeholder name."

tarmac asset-list

Outputs a list of all of the asset IDs referenced by the project. Each ID is separated by a newline.

Usage:

tarmac asset-list [<config-path>] \
	--output <file-path>

Example:

tarmac asset-list --output asset-list.txt

tarmac create-cache-map

Creates a mapping from asset IDs back to their source files. Also downloads packaged images to a given folder, generating links to those assets as well.

The mapping file is JSON.

Usage:

tarmac create-cache-map [<config-path>] \
	--index-file <file-path> \
	--cache-dir <cache-folder>

Example:

tarmac create-cache-map --index-file assets.json --cache-dir asset-cache

tarmac help

Prints help information about Tarmac itself, or the given subcommand.

Usage:

tarmac help [<subcommand>]

Project Format

  • name, string
    • The name of the Tarmac project, used in logging and error reporting.
  • max-spritesheet-size, (int, int), optional
    • The maximum spritesheet size that Tarmac should use. Defaults to (1024, 1024), the maximum image size supported by Roblox.
  • asset-cache-path, path, optional
    • If defined, Tarmac will re-download uploaded images to a local folder at the given path. Files in this folder not associated with assets in the project will be deleted.
  • asset-list-path, path, optional
    • If defined, Tarmac will write a list of asset URLs used by the project to the given file. One URL is printed per line.
  • upload-to-group-id, int, optional
    • If defined, Tarmac will attempt to upload all assets to the given Roblox Group. If unable, syncing will fail.
  • inputs, list<InputConfig>, optional
    • A list of inputs that Tarmac will process.
  • includes, list<path>, optional
    • A list of additional paths to search recursively for additional projects in. The inputs from discovered projects will be merged into this project, and other settings ignored.
    • When a tarmac.toml file is found, Tarmac will include it and its includes and stop traversing that directory.

InputConfig

  • glob, string
    • A path glob that should include any files for this input group.
    • Tarmac uses the globset library and supports any syntax it supports.
  • codegen, bool, optional
    • Whether Tarmac should generate Lua code for the assets contained in this input group. Defaults to false.
  • codegen-path, path, optional
    • If defined and codegen is true, Tarmac will merge all generated Lua code for this input group into a single file.
  • codegen-base-path, path, optional
    • Defines the base path for generating Lua code when codegen-path is also defined. Defaults to the directory containing tarmac.toml.

License

Tarmac is available under the MIT license. See LICENSE.txt for details.

More Repositories

1

luau

A fast, small, safe, gradually typed embeddable scripting language derived from Lua
C++
3,084
star
2

roact

A view management library for Roblox Lua similar to React
Lua
562
star
3

creator-docs

Open Source Creator Documentation
TypeScript
299
star
4

react-lua

A comprehensive translation of upstream React 17.x into Luau. This is a read-only mirror.
Lua
274
star
5

Core-Scripts

All of ROBLOX's core client scripts.
Lua
248
star
6

rodux

A state management library for Roblox Lua inspired by Redux
Lua
246
star
7

nomad-driver-containerd

Nomad task driver for launching containers using containerd.
Go
214
star
8

testez

BDD-style test and assertion library for Roblox Lua
Lua
183
star
9

foreman

Toolchain manager for Roblox projects
Rust
168
star
10

roblox-blender-plugin

A Blender plugin to upload selected assets in Blender to Roblox using Roblox's Open Cloud API.
Python
113
star
11

avatar

Avatar templates and assets available to our external developers
Lua
99
star
12

StudioWidgets

Lua
91
star
13

roact-rodux

A connector between Roact and Rodux, similar to react-redux
Lua
82
star
14

future-is-bright

Prototyping future Roblox lighting technology
60
star
15

js-to-lua

Conversion tool for migrating JS/TS code into Luau. This is a read-only mirror
TypeScript
54
star
16

voice-safety-classifier

Voice safety classifier
Python
51
star
17

nomad-driver-iis

Nomad task driver for running windows IIS services.
Go
50
star
18

Studio-Tools

Built-in ROBLOX Studio Lua plugins
49
star
19

nomad-node-problem-detector

NNPD - nomad-node-problem-detector
Go
47
star
20

Old-Open-Source-Levels

A repository of ROBLOX levels that are free to manipulate however you wish
36
star
21

rs-consul

This crate provides access to a set of strongly typed apis to interact with consul (https://www.consul.io/)
Rust
34
star
22

material-update-beta

29
star
23

rblx_nurd

Open Source Nomad Usage Resource Dashboard
Go
28
star
24

Wiki-Lua-Libraries

Lua
26
star
25

avatar-evolution

Prototyping the future of games and avatars on Roblox
23
star
26

setup-foreman

GitHub Action to install Foreman, a toolchain manager for Roblox tools
TypeScript
21
star
27

dash

A collection of core utilities expanding the capabilities of Luau. This is a read-only mirror.
Lua
17
star
28

cryo

A collection of methods for working with immutable data in a functional way for Luau. This is a read-only mirror.
Lua
15
star
29

luau-regexp

A regular expression library for Luau. This is a read-only mirror.
Lua
15
star
30

jest-roblox

Delightful testing for Luau. This is a read-only mirror.
Lua
15
star
31

signal-lua

A well-structured, well-tested, and well-documented Luau signal implementation. This is a read-only mirror.
Lua
14
star
32

cla-signature-bot

GitHub Action for self-contained handling of CLA signatures
TypeScript
14
star
33

Catalog

The virtual gear items which make up the Roblox catalog
14
star
34

luau-polyfill

A set of utilities to mimic common JS polyfills needed for translating projects from JS to Luau. This is a read-only mirror.
Lua
13
star
35

rbx-test-files

A repository of small Roblox model and place files to exercise implementations
Lua
13
star
36

graphql-lua

A reference implementation of GraphQL for Luau. This is a read-only mirror.
Lua
12
star
37

chalk-lua

Terminal string styling library for Luau. This is a read-only mirror.
Lua
11
star
38

otter

Declarative animation library for Luau. This is a read-only mirror.
Lua
10
star
39

zen-observable-lua

An Implementation of Observables for Luau. This is a read-only mirror.
Lua
10
star
40

roact-navigation

A declarative navigation system for App UI, built on top of Roact. This is a read-only mirror.
Lua
9
star
41

rhysd-github-action-benchmark

GitHub Action for continuous benchmarking to keep performance Copied from https://github.com/rhysd/github-action-benchmark
TypeScript
9
star
42

picomatch-lua

Blazing fast and accurate glob matcher written in Luau. This is a read-only mirror.
Lua
8
star
43

UnicodeVisualizerPlugin

Deprecated Roblox Studio plugin for visualizing strings of unicode. Use the web version. https://tiffnix.com/unicode/
Lua
8
star
44

symbol-luau

A simple, stable implementation of Symbol in Luau. This is a read-only mirror.
Lua
7
star
45

TweenService-Editor

TweenService Visual Editor plugin for Roblox Studio
Lua
6
star
46

luau-tag-utils

Utility functions to query Instances from tags attached with CollectionService. This is a read-only mirror.
Lua
5
star
47

apollo-client-lua

Apollo Client for GraphQL translated to Luau. This is a read-only mirror.
Lua
5
star
48

chef-teamcity

TeamCity Chef cookbook
Ruby
4
star
49

cla-bot-store

Storage repository for CLA bot. Public so that forks can check the signature file directly.
4
star
50

dom-testing-library-lua

Simple and complete testing utilities that encourage good testing practices. This is a read-only mirror.
Lua
3
star
51

roact-performance-benchmarks

Performance benchmarks for Roact. This a read-only mirror
Lua
3
star
52

test-repo-2022080901

3
star
53

graphql-tag-lua

A Luau template literal tag that parses GraphQL queries. This is a read-only mirror.
Lua
3
star
54

data-tools

Java
2
star
55

strongdm-contrib

contributions to strongdm to help with security operations and automation
Python
2
star
56

react-testing-library-lua

Simple and complete testing utilities that encourage good testing practices. This is a read-only mirror.
Lua
1
star
57

chef-xcode

Ruby
1
star
58

.github

GitHub Meta-Repo
1
star
59

action-creator-docs-automation

GitHub Actions for Creator Docs
1
star