README.md

June 24, 2026 · View on GitHub

 ███████╗████████╗██████╗ ██╗   ██╗██╗  ██╗███████╗
 ██╔════╝╚══██╔══╝██╔══██╗╚██╗ ██╔╝██║ ██╔╝██╔════╝
 ███████╗   ██║   ██████╔╝ ╚████╔╝ █████╔╝ █████╗
 ╚════██║   ██║   ██╔══██╗  ╚██╔╝  ██╔═██╗ ██╔══╝
 ███████║   ██║   ██║  ██║   ██║   ██║  ██╗███████╗
 ╚══════╝   ╚═╝   ╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═╝╚══════╝
                  [ s c y l l a ]

CI License: MIT stryke

[SCYLLADB / CASSANDRA CLIENT FOR STRYKE // CQL QUERY + DDL + SCHEMA]

"Wide-column at scale, one stryke pipe at a time."

ScyllaDB / Apache Cassandra client for stryke. Run CQL queries, manage keyspaces and tables, and introspect the schema against any ScyllaDB or Cassandra cluster over the native CQL binary protocol. Opt-in package tier.

strykelang · MenkeTechnologiesMeta · stryke-clickhouse · stryke-mongo · stryke-redis

Read the Docs · Engineering Report


Table of Contents


[0x00] Install

s add github.com/MenkeTechnologies/stryke-scylla

On first use Scylla, stryke dlopens the cdylib in-process and registers every scylla__* export.


[0x01] Quick start

use Scylla

var %conn
$conn{node}     = "127.0.0.1:9042"
$conn{keyspace} = "app"

Scylla::create_keyspace("app", %conn)
Scylla::create_table(
    "app.users",
    columns     => "id uuid, name text, age int",
    primary_key => "id",
    %conn,
)

Scylla::execute("INSERT INTO app.users (id, name, age) VALUES (uuid(), 'ada', 36)", %conn)

p Scylla::count("app.users", %conn)
val @rows = Scylla::query("SELECT name, age FROM app.users", %conn)

[0x02] Connecting

Connection params come from the %conn opts hash on every call (or $SCYLLA_NODES, comma-separated, when no node is given):

KeyDefaultNotes
node127.0.0.1:9042One contact point (host or host:port)
hostAlias for node; combine with port
port9042Default CQL port
nodesArray of contact points (overrides node/host)
usernameCQL auth user (PasswordAuthenticator)
passwordCQL auth password
keyspaceUSEd on the session after connect

A Session is cached per (nodes, auth, keyspace) for the life of the stryke process; the driver maintains its own per-node connection pool.


[0x03] Architecture

  • Transport — the CQL binary protocol via ScyllaDB's official pure-Rust driver (the scylla crate), which also speaks Apache Cassandra.
  • Sync over async — the driver is async; the cdylib owns ONE embedded tokio runtime and block_ons each call, so the stryke-facing API stays synchronous.
  • Rows as JSON — each CqlValue maps to its natural JSON type (ints, text, bool, lists/sets/maps), with a debug-string fallback for exotic types; rows come back keyed by column name.
  • Unparameterized CQL — interpolate untrusted values through Scylla::escape (CQL doubles the single quote). The pure helpers are unit-tested in-crate, so they validate in CI without a cluster.

[0x04] API reference

GroupFunctions
Livenessversion, ping, server_version, cluster_name, peers
Queryquery, query_row, query_value, execute, batch, raw
Introspectionkeyspaces, tables, columns, count, indexes, views, types, partition_keys, clustering_keys
DDLcreate_keyspace, drop_keyspace, create_table, drop_table, create_index, drop_index, truncate
Pure helpersescape, quote_literal, quote_ident, valid_identifier, format_value, format_in_list, contact_points
# escape untrusted input before interpolating
val $name = Scylla::escape($user_input)
val @hits = Scylla::query("SELECT * FROM app.users WHERE name = '$name' ALLOW FILTERING", %conn)

[0x05] Build & test

make debug       # cargo build
make test        # cargo test, then `s test t/` (needs $SCYLLA_NODES or 127.0.0.1:9042)
make install     # s pkg install -g .

cargo test runs the in-crate unit tests (CQL escaping, identifier quoting, contact-point normalization, CqlValue→JSON) with no cluster required. The t/test_stryke_scylla_surface.stk pins the wrapper surface; t/test_scylla.stk runs end-to-end keyspace/table/insert/query against a live cluster and short-circuits when none answers.


[0x06] License

MIT · MenkeTechnologies