started docs!
This commit is contained in:
23
content/docs/macros/MV_VM.md
Normal file
23
content/docs/macros/MV_VM.md
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
weight: 100
|
||||
title: "MV_VM"
|
||||
description: "Virtualize function"
|
||||
icon: "article"
|
||||
date: "2025-05-01T18:47:58-05:00"
|
||||
lastmod: "2025-05-01T18:47:58-05:00"
|
||||
---
|
||||
|
||||
`declare function MV_VM<A..., R...>(vmFunction: (A...) -> R...): (A...) -> R...`
|
||||
|
||||
will mark the passed function to be lifted into the VM.
|
||||
|
||||
## Valid Usage
|
||||
|
||||
```lua
|
||||
local virtualizedFunction = MV_VM(function(a, b, c)
|
||||
print(a .. b .. c .. " im in the vm!")
|
||||
end)
|
||||
|
||||
virtualizedFunction("1", "2", "3")
|
||||
```
|
||||
{{% alert context="info" text="**Note**: if your plan doesn't include virtualization support, `MV_VM` is a no-op where the passed function is mangled normally and not virtualized." /%}}
|
Reference in New Issue
Block a user