{"id":26355,"library":"samalang-compiler","title":"Samala Compiler","description":"The Samala Compiler compiles the Samawa programming language into Lua. Version 1.3.0 is the latest stable release. It transpiles Samawa code to Lua, enabling execution in Lua environments. Active development is uncertain due to limited community engagement and documentation. Key differentiators include targeting the niche Samawa language, which is designed for simplicity and embedding in Lua projects.","status":"active","version":"1.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/rzfann/samalang","tags":["javascript","samalang","compiler","lua"],"install":[{"cmd":"npm install samalang-compiler","lang":"bash","label":"npm"},{"cmd":"yarn add samalang-compiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add samalang-compiler","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only; use import syntax.","wrong":"const { compile } = require('samalang-compiler')","symbol":"compile","correct":"import { compile } from 'samalang-compiler'"},{"note":"Use named import, not default import from subpath.","wrong":"import compileFile from 'samalang-compiler/compileFile'","symbol":"compileFile","correct":"import { compileFile } from 'samalang-compiler'"},{"note":"Default export wraps all compiler utilities.","wrong":"const Samalang = require('samalang-compiler').default","symbol":"default","correct":"import Samalang from 'samalang-compiler'"}],"quickstart":{"code":"import { compile } from 'samalang-compiler';\nconst luaCode = compile('print \"Hello, Samala!\"');\nconsole.log(luaCode);","lang":"typescript","description":"Compiles a simple Samawa print statement to Lua and logs the result."},"warnings":[{"fix":"Read file manually and pass contents to compile().","message":"compileFile() is deprecated; use compile with file contents instead.","severity":"deprecated","affected_versions":">=1.2.0"},{"fix":"Ensure your Lua runtime supports Lua 5.3 features.","message":"Version 1.0.0 changed output syntax from Lua 5.1 to 5.3.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Always use double quotes for string literals.","message":"Strings in Samawa must be double-quoted; single quotes cause parse errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Remove semicolons; they are optional and cause parse errors.","cause":"Using semicolons in Samawa code, which are not supported.","error":"SyntaxError: Unexpected token ';' at line 1"},{"fix":"Use import { compile } from 'samalang-compiler'.","cause":"Importing incorrectly as default instead of named export.","error":"TypeError: compile is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}