{"id":19344586,"url":"https://github.com/anxiousmodernman/sled-jimtcl","last_synced_at":"2026-06-17T20:02:16.775Z","repository":{"id":147708901,"uuid":"139497144","full_name":"anxiousmodernman/sled-jimtcl","owner":"anxiousmodernman","description":"WIP: Bindings from Jim Tcl to the sled embedded database","archived":false,"fork":false,"pushed_at":"2019-02-18T23:07:29.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-09T15:09:06.668Z","etag":null,"topics":["jim-tcl","sled","tcl-extension"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anxiousmodernman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-02T21:30:37.000Z","updated_at":"2019-02-18T23:07:30.000Z","dependencies_parsed_at":"2023-05-27T05:15:11.343Z","dependency_job_id":null,"html_url":"https://github.com/anxiousmodernman/sled-jimtcl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anxiousmodernman/sled-jimtcl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anxiousmodernman%2Fsled-jimtcl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anxiousmodernman%2Fsled-jimtcl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anxiousmodernman%2Fsled-jimtcl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anxiousmodernman%2Fsled-jimtcl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anxiousmodernman","download_url":"https://codeload.github.com/anxiousmodernman/sled-jimtcl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anxiousmodernman%2Fsled-jimtcl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34463558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["jim-tcl","sled","tcl-extension"],"created_at":"2024-11-10T03:43:53.539Z","updated_at":"2026-06-17T20:02:16.737Z","avatar_url":"https://github.com/anxiousmodernman.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sled-jimtcl\n\nWIP: Jim Tcl bindings to the [sled](https://github.com/spacejam/sled) embedded key-value database.\n\n## Setup\n\nInstall Jim Tcl libraries and the `jimsh` interpreter by cloning and running\n\n```\ngit clone https://github.com/msteveb/jimtcl\ncd jimtcl\n# configure some useful extensions\n./configure --with-ext=\"oo tree binary sqlite3\" --enable-utf8 --ipv6 --disable-docs\nmake\nsudo make install\njimsh  # the jim tcl interpreter\n```\n\nBuild the rust extension (this project) as a shared library, and copy to /usr/local/lib/jim/sled.so\n\n```\ngit clone https://gitlab.com/keyvalue/sled-jimtcl.git\ncd sled-jimtcl\ncargo build\nsudo cp $(pwd)/target/debug/libsled_jimtcl.so /usr/local/lib/jim/sled.so\n```\n\nNote that the shared library's path under **target** will be different if you \nuse `cargo build --release`.\n\nA **naming scheme is required** to allow the `jimsh` to find your extension. For\nexample, to create a package named `foo`, the name should be the same across \nseveral locations in Tcl, Rust (or C) code, and on disk.\n\n* Users of your package call `package require foo` in Tcl\n* Build artifact is named foo.so (or .tcl), located at /usr/local/lib/jim/foo.so\n* Init function (in Rust or C) is named `Jim_\u003cname\u003eInit` and has signature \n  `pub fn Jim_fooInit(interp: *mut Jim_Interp) -\u003e c_int`\n* In Rust, Init and command functions are marked `#[no_mangle]` so C can find them.\n\n## Basic Usage\n\nSled is a file-based database, like rocksdb or leveldb. This extension behaves\nlike the sqlite extension: a single command `sled` is created on import, and\nwe use this command to create a db command, which we conventionally call `db`.\n\n```tcl\npackage require sled\n\nsled db /some/path/to/db\n```\n\nSled supports basic key-value operations: put, get, scan, delete. Pass these\nto db, along with appropriate arguments.\n\n```tcl\ndb put foo baz\ndb put foo:foo2:foo3 baz\ndb scan foo { k v } {\n    # we expect 2 iterations here over the \"foo\" keyspace\n    puts \"got key: $k\"\n    puts \"got val: $v\"\n}\nset x [db get foo]\nputs \"a single get: $x\"\n```\n\n## Hacking\n\nUse a symlink so you can avoid copying the .so file after every `cargo build`,\ne.g. debug builds. Note that we rename the shared object to comply with the \nJim Tcl extension naming scheme.\n\n```\nsudo ln -s $(pwd)/target/debug/libsled_jimtcl.so /usr/local/lib/jim/sled.so\n```\n\nYou will need to restart the Jim Tcl interpreter if you rebuild this extension.\n\nThe main repo is [on GitLab](https://gitlab.com/keyvalue/sled-jimtcl.git)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanxiousmodernman%2Fsled-jimtcl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanxiousmodernman%2Fsled-jimtcl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanxiousmodernman%2Fsled-jimtcl/lists"}