{"id":13438358,"url":"https://github.com/dimkr/szl","last_synced_at":"2025-06-12T20:33:52.741Z","repository":{"id":53194394,"uuid":"56884295","full_name":"dimkr/szl","owner":"dimkr","description":"A lightweight, embeddable scripting language","archived":false,"fork":false,"pushed_at":"2017-03-12T19:15:52.000Z","size":870,"stargazers_count":150,"open_issues_count":2,"forks_count":12,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-10T02:08:44.951Z","etag":null,"topics":["c","c99","dynamic-typing","embeddable","embedded","embedded-scripting-language","embedded-systems","engine","interactive","interpreted-programming-language","interpreter","iot","library","lightweight","linux","mit","programming-language","script","scripting","shell"],"latest_commit_sha":null,"homepage":"http://dimakrasner.com/szl","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dimkr.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-22T20:47:28.000Z","updated_at":"2024-12-16T05:13:57.000Z","dependencies_parsed_at":"2022-09-10T03:53:15.766Z","dependency_job_id":null,"html_url":"https://github.com/dimkr/szl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dimkr/szl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimkr%2Fszl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimkr%2Fszl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimkr%2Fszl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimkr%2Fszl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimkr","download_url":"https://codeload.github.com/dimkr/szl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimkr%2Fszl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259522452,"owners_count":22870469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","c99","dynamic-typing","embeddable","embedded","embedded-scripting-language","embedded-systems","engine","interactive","interpreted-programming-language","interpreter","iot","library","lightweight","linux","mit","programming-language","script","scripting","shell"],"created_at":"2024-07-31T03:01:04.836Z","updated_at":"2025-06-12T20:33:52.710Z","avatar_url":"https://github.com/dimkr.png","language":"C","readme":"         _\n ___ ___| |\n/ __|_  / |\n\\__ \\/ /| |\n|___/___|_|\n\nOverview\n========\n\nszl is a tiny, embeddable scripting engine inspired by Tcl and shell. It's a\nbalanced mix of their key features: szl combines the simplicity of shell\nscripting with the power of a dynamic, Tcl-like type system, minimalistic\nsyntax and programming language features missing in the shell, like exceptions\nand OOP.\n\nszl comes with a rich standard library that includes bindings for\npermissively-licensed libraries. Therefore, it can run processes, parse text\nwith transparent Unicode support, manipulate data structures like dictionaries,\noperate on binary data, interface with C code through scripts, multiplex\nnon-blocking I/O at scale, call REST APIs and much more, at a fraction of the\nmemory and size footprint of other scripting languages, while achieving\nreasonable efficiency.\n\nszl can be used both as a standalone (either interactive or non-interactive)\ninterpreter or as an integral part of other projects, via the libszl library. In\naddition, the feature set and behavior of szl can be easily fine-tuned to meet\nthe size and memory consumption limitations under various usage scenarios and\nhardware platforms.\n   ___________________________________\n  /                                   \\\n  | \u003e\u003e\u003e $global msg {Hello, world!}   |\n  | Hello, world!                     |\n  | \u003e\u003e\u003e $load zlib                    |\n  | \u003e\u003e\u003e $zlib.crc32 $msg              |\n  | 3957769958                        |\n  | \u003e\u003e\u003e [$exec {uname -s}] read       |\n  | Linux                             |\n  | \u003e\u003e\u003e [$open /bin/gunzip rb] read 9 |\n  | #!/bin/sh                         |\n  | \u003e\u003e\u003e $map i [$range 1 4] {$+ $i 3} |\n  | 4 5 6                             |\n  \\___________________________________/\n\nFor more information, see the user manual at http://dimakrasner.com/szl.\n\nBuilding\n========\n\nOn Debian (http://www.debian.org) based distributions:\n\n  $ apt-get install git gcc meson zlib1g-dev libcurl4-gnutls-dev libarchive-dev\n                    libssl-dev libffi-dev\n\nThen:\n\n  $ git clone --recursive https://github.com/dimkr/szl\n  $ cd szl\n  $ meson build\n  $ cd build\n  $ ninja\n  $ ninja install\n\nBy default, szl is built with core functionality built-in to the interpreter,\nwhile a big part of the standard library resides in dynamically-loaded shared\nobjects. This way, the memory consumption of szl scripts that don't use the\nentire standard library is lower.\n\nHowever, in some use cases (for example, when szl is embedded into another\nproject), this is undesirable.\n\nTo build szl as a single executable file, with all extensions linked statically\ninto the interpreter:\n\n  $ mesonconf -Dbuiltin_all=true\n\nIn addition, built-in extensions can be chosen individually, e.g.:\n\n  $ mesonconf -Dwith_curl=builtin -Dwith_ffi=no\n\nEmbedding\n=========\n\nTo embed szl into other projects, use the API defined in szl.h and link with\nlibszl.\n\nThe size and performance of szl can be tuned using advanced build options:\n\n  $ mesonconf -Duse_int=true\n\nThis build option replaces the large integer type used by szl to represent\nintegers, to the standard C int. This may improve performance under platforms\nwithout native support for 64 bit integers, at the cost of a limited range of\nvalid integer values.\n\n  $ mesonconf -Duse_float=false\n\nThis build option changes the precision of floating-point numbers in szl from\ndouble to single precision. This may improve performance under platforms without\nnative support for double-precision floating point numbers, at the cost of\nprecision.\n\n  $ mesonconf -Dwith_float=false\n\nThis build options disables support for floating-point arithmetic. This reduces\nszl's size.\n\n  $ mesonconf -Dwith_unicode=false\n\nThis build options disables support for Unicode strings and cancels szl's\ninternal distinction between encoded byte strings and arrays of Unicode code\npoints. This reduces szl's size and may improve performance with zero side\neffects, if szl is guaranteed not to perform any sort of Unicode string slicing.\n\nSecurity\n========\n\nSupport for dynamic loading of szl extensions can be disabled:\n\n  $ mesonconf -Dwith_dl=false\n\nWhen dynamic loading is disabled, szl will refuse to load extensions, unless\nthey are linked statically into the interpreter.\n\nThis way, a szl interpreter embedded into another program does not make it\nvulnerable to dynamic loader hijacking (e.g. LD_LIBRARY_PATH) during extension\nloading.\n\nRunning\n=======\n\nTo run an interactive interpreter:\n\n  $ szlsh\n\nOr, to run a script:\n\n  $ szl $path\n\nOr, to run a one-liner:\n\n  $ szl -c $snippet\n\nCredits and Legal Information\n=============================\n\nszl is free and unencumbered software released under the terms of the MIT\nlicense; see COPYING for the license text. For a list of its authors and\ncontributors, see AUTHORS.\n\nThe ASCII art logo at the top was made using FIGlet (http://www.figlet.org/).\n","funding_links":[],"categories":["C","Language"],"sub_categories":["Android Things"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimkr%2Fszl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimkr%2Fszl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimkr%2Fszl/lists"}