Skip to content

Commit

Permalink
Update README.md (#99)
Browse files Browse the repository at this point in the history
Update README.md to highlight CPP code snippet.
  • Loading branch information
MathematicalDessert committed Nov 3, 2021
1 parent dc83543 commit 5a18006
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI --config RelWithDebInfo

To integrate Luau into your CMake application projects, at the minimum you'll need to depend on `Luau.Compiler` and `Luau.VM` projects. From there you need to create a new Luau state (using Lua 5.x API such as `lua_newstate`), compile source to bytecode and load it into the VM like this:

```
```cpp
std::string bytecode = Luau::compile(source); // needs Luau/Compiler.h include
if (luau_load(L, chunkname, bytecode.data(), bytecode.size()) == 0)
return 1; /* return chunk main function */
Expand Down

0 comments on commit 5a18006

Please sign in to comment.