MUD is a framework for building ambitious onchain applications
MIT License
Bot releases are visible (Hide)
e85dc53: Tables and systems in config output now include a label
property. Labels are now used throughout the codebase as a user-friendly way to reference the given resource: config keys, contract names, generated libraries, etc.
Inside namespaces
config output, keys for tables and systems and their filenames will always correspond to their labels. This should make MUD tooling more intuitive and predictable. For backwards compatibility, tables
config output still uses namespace-prefixed keys.
Labels replace the previous resource name
usage, which is truncated to bytes16
to be used as part of the resource ID and, in the future, may not always be human-readable.
These labels will soon be registered onchain so that developers can initialize a new MUD project from an existing world, generating config and interfaces with user-friendly names.
a10b453: MUD projects can now use multiple namespaces via a new top-level namespaces
config option.
import { defineWorld } from "@latticexyz/world";
export default defineWorld({
namespaces: {
game: {
tables: {
Player: { ... },
Position: { ... },
},
},
guilds: {
tables: {
Guild: { ... },
},
systems: {
MembershipSystem: { ... },
TreasurySystem: { ... },
},
},
},
});
Once you use the top-level namespaces
config option, your project will be in "multiple namespaces mode", which expects a source directory structure similar to the config structure: a top-level namespaces
directory with nested namespace directories that correspond to each namespace label in the config.
~/guilds
├── mud.config.ts
└── src
└── namespaces
├── game
│ └── codegen
│ └── tables
│ ├── Player.sol
│ └── Position.sol
└── guilds
├── MembershipSystem.sol
├── TreasurySystem.sol
└── codegen
└── tables
└── Guild.sol
@arktype/util
and moved evaluate
/satisfy
usages to its show
/satisfy
helpers.glob
dependency.Published by github-actions[bot] 3 months ago
9e05278: Refactored package to use the new Store/World configs under the hood, removing compatibility layers and improving performance.
f640fef: Adjusted SyncToRecsOptions
type intersection to improve TypeScript performance.
3440a86: Refactored syncToRecs
and syncToZustand
to use tables from config namespaces output. This is a precursor for supporting multiple namespaces.
Note for library authors: If you were using createStorageAdapter
from @latticexyz/store-sync/recs
, this helper no longer appends MUD's built-in tables from Store and World packages. This behavior was moved into syncToRecs
for consistency with syncToZustand
and makes createStorageAdapter
less opinionated.
You can achieve the previous behavior with:
import { createStorageAdapter } from "@latticexyz/store-sync/recs";
+import { mudTables } from "@latticexyz/store-sync";
createStorageAdapter({
- tables,
+ tables: { ...tables, ...mudTables },
...
});
Updated dependencies [24e285d]
Updated dependencies [570086e]
Updated dependencies [7129a16]
Updated dependencies [3cbbc62]
Updated dependencies [7129a16]
Updated dependencies [e85dc53]
Updated dependencies [a10b453]
Updated dependencies [69eb63b]
Updated dependencies [e49059f]
Updated dependencies [8d0453e]
Updated dependencies [fb1cfef]
Published by github-actions[bot] 3 months ago
3cbbc62: Moved build scripts to mud build
now that CLI doesn't depend on this package.
Removed generated world interfaces as this package isn't meant to be used as a "world", but as a set of individual modules.
e49059f: Bumped glob
dependency.
Updated dependencies [24e285d]
Updated dependencies [570086e]
Updated dependencies [7129a16]
Updated dependencies [3cbbc62]
Updated dependencies [7129a16]
Updated dependencies [e85dc53]
Updated dependencies [a10b453]
Updated dependencies [69eb63b]
Updated dependencies [e49059f]
Updated dependencies [8d0453e]
Updated dependencies [fb1cfef]
Published by github-actions[bot] 3 months ago
e85dc53: Tables and systems in config output now include a label
property. Labels are now used throughout the codebase as a user-friendly way to reference the given resource: config keys, contract names, generated libraries, etc.
Inside namespaces
config output, keys for tables and systems and their filenames will always correspond to their labels. This should make MUD tooling more intuitive and predictable. For backwards compatibility, tables
config output still uses namespace-prefixed keys.
Labels replace the previous resource name
usage, which is truncated to bytes16
to be used as part of the resource ID and, in the future, may not always be human-readable.
These labels will soon be registered onchain so that developers can initialize a new MUD project from an existing world, generating config and interfaces with user-friendly names.
a10b453: MUD projects can now use multiple namespaces via a new top-level namespaces
config option.
import { defineWorld } from "@latticexyz/world";
export default defineWorld({
namespaces: {
game: {
tables: {
Player: { ... },
Position: { ... },
},
},
guilds: {
tables: {
Guild: { ... },
},
systems: {
MembershipSystem: { ... },
TreasurySystem: { ... },
},
},
},
});
Once you use the top-level namespaces
config option, your project will be in "multiple namespaces mode", which expects a source directory structure similar to the config structure: a top-level namespaces
directory with nested namespace directories that correspond to each namespace label in the config.
~/guilds
├── mud.config.ts
└── src
└── namespaces
├── game
│ └── codegen
│ └── tables
│ ├── Player.sol
│ └── Position.sol
└── guilds
├── MembershipSystem.sol
├── TreasurySystem.sol
└── codegen
└── tables
└── Guild.sol
24e285d: Disabled deploy of Hooks
table, as this was meant to be a generic, codegen-only table.
7129a16: Bumped @arktype/util
and moved evaluate
/satisfy
usages to its show
/satisfy
helpers.
69eb63b: Refactored tablegen in preparation for multiple namespaces and addressed a few edge cases:
filePath
are now resolved relative to the project root (where the mud.config.ts
lives) rather than the current working directory.LibraryName.UserTypeName
).fb1cfef: Refactored how the config handles shorthand table definitions, greatly simplifying the codebase. This will make it easier to add support for multiple namespaces.
Updated dependencies [7129a16]
Updated dependencies [7129a16]
Updated dependencies [e85dc53]
Updated dependencies [8d0453e]
Published by github-actions[bot] 3 months ago
Published by github-actions[bot] 3 months ago
@latticexyz/store-sync
.Published by github-actions[bot] 3 months ago
Published by github-actions[bot] 3 months ago
Published by github-actions[bot] 3 months ago
Published by github-actions[bot] 3 months ago
Published by github-actions[bot] 3 months ago
Published by github-actions[bot] 3 months ago
Published by github-actions[bot] 3 months ago
@arktype/util
and moved evaluate
/satisfy
usages to its show
/satisfy
helpers.Published by github-actions[bot] 3 months ago
glob
dependency.Published by github-actions[bot] 3 months ago
Published by github-actions[bot] 3 months ago
Published by github-actions[bot] 3 months ago
syncToZustand
.Published by github-actions[bot] 3 months ago
a10b453: MUD projects can now use multiple namespaces via a new top-level namespaces
config option.
import { defineWorld } from "@latticexyz/world";
export default defineWorld({
namespaces: {
game: {
tables: {
Player: { ... },
Position: { ... },
},
},
guilds: {
tables: {
Guild: { ... },
},
systems: {
MembershipSystem: { ... },
TreasurySystem: { ... },
},
},
},
});
Once you use the top-level namespaces
config option, your project will be in "multiple namespaces mode", which expects a source directory structure similar to the config structure: a top-level namespaces
directory with nested namespace directories that correspond to each namespace label in the config.
~/guilds
├── mud.config.ts
└── src
└── namespaces
├── game
│ └── codegen
│ └── tables
│ ├── Player.sol
│ └── Position.sol
└── guilds
├── MembershipSystem.sol
├── TreasurySystem.sol
└── codegen
└── tables
└── Guild.sol
3cbbc62: Refactored package to use the new Store/World configs under the hood, removing compatibility layers.
Removed --srcDir
option from all commands in favor of using sourceDirectory
in the project's MUD config.
24e285d: mud deploy
will now correctly skip tables configured with deploy: { disabled: true }
.
2da9e48: Refactored CLI commands to use tables from config namespaces output. This is a precursor for supporting multiple namespaces.
609de11: Refactored mud trace
command to use Viem instead of Ethers and removed Ethers dependencies from the package.
e49059f: Bumped glob
dependency.
Updated dependencies [24e285d]
Updated dependencies [570086e]
Updated dependencies [7129a16]
Updated dependencies [3cbbc62]
Updated dependencies [7129a16]
Updated dependencies [e85dc53]
Updated dependencies [a10b453]
Updated dependencies [69eb63b]
Updated dependencies [e49059f]
Updated dependencies [8d0453e]
Updated dependencies [fb1cfef]
Published by github-actions[bot] 3 months ago
e85dc53: Tables and systems in config output now include a label
property. Labels are now used throughout the codebase as a user-friendly way to reference the given resource: config keys, contract names, generated libraries, etc.
Inside namespaces
config output, keys for tables and systems and their filenames will always correspond to their labels. This should make MUD tooling more intuitive and predictable. For backwards compatibility, tables
config output still uses namespace-prefixed keys.
Labels replace the previous resource name
usage, which is truncated to bytes16
to be used as part of the resource ID and, in the future, may not always be human-readable.
These labels will soon be registered onchain so that developers can initialize a new MUD project from an existing world, generating config and interfaces with user-friendly names.
@arktype/util
and moved evaluate
/satisfy
usages to its show
/satisfy
helpers.Published by github-actions[bot] 3 months ago
evaluate
and satisfy
type utils in favor of show
and satisfy
from @arktype/util
.resourceToHex
will now throw if provided namespace is >14 characters. Since namespaces are used to determine access control, it's not safe to automatically truncate to fit into bytes14
as that may change the indended namespace for resource access.