Rust module for writing plugin
- Download binaries from releases or compile by yourself.
- Put binaries into
{your SRCDS folder}/garrysmod/lua/bin
(If there is no bin folder, create one) - Now you can install writing plugin
- Install rust from https://www.rust-lang.org
- Clone this repository
git clone https://github.com/kithf/writing-rs
- Navigate into repository
cd writing-rs
- Compile binary for your SRCDS with cargo
cargo build -r --target *your-target*
(See targets, first you may need to install target) - Go to
target/*your-target*/release/
- Rename your to
gmsv_writingrs_*your-target*.dll
(See wiki) - Put binaries into
{your SRCDS folder}/garrysmod/lua/bin
(If there is no bin folder, create one) - Now you can install writing plugin
lz4_flex wrapper for lua.
Compress data with lz4.
local bin = lz4.compress "string"
Decompress data with lz4.
local str = lz4.decompress(lz4.compress"string")
assert(str=="string")
CommonMark parser for lua.
Parse markdown to html.
local html = markdown.to_html "## Hello"
assert(html == "<h2>Hello</h2>\n")
Sanitize html.
local html = html.sanitize "<script>alert('xss')</script>"
assert(html == "")