Skip to content
Synaptics-LabPublic

About

The official compiler, language specification, VS Code extension, and developer toolchain for SynapticLang (.syn) on SynapticChain Layer-1

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

SynapticLang

  ____   __   __  _   _ 
 / ___|  \ \ / / | \ | |
 \___ \   \ V /  |  \| |
  ___) |   | |   | |\  |
 |____/    |_|   |_| \_|

SynapticLang (.syn) — Statically-Scheduled Smart Contract Language for SynapticChain Layer-1.
S=0 Lock-Free Concurrency · 256 Parallel Lanes · Deterministic Compile-Time Gas · ISO 20022 Native

License: MIT OR Apache-2.0 Version Spec: Canonical v2.0 Architecture: S=0 Concurrency MCP: Enabled


🌟 Executive Overview

SynapticLang (.syn) is a next-generation smart contract programming language built from the ground up for high-throughput, deterministic decentralized finance.

While the Ethereum Virtual Machine (EVM) suffers from single-threaded global state bottlenecks and Solana's Sealevel collapses under account-lock contention ("hotspotting"), SynapticLang adopts a compiler-driven static scheduling paradigm inspired by tensor streaming architectures (Groq TSP):

Feature Ethereum (EVM) Solana (SVM) SynapticLang
Concurrency Single-threaded serial execution Account-level write-locks (hotspots choke on shared state) S=0 Lock-Free Concurrency across 256 parallel lanes
Gas Model Dynamic gas metering (risk of mid-execution out-of-gas) Compute units with priority fee auction spikes Deterministic compile-time gas pre-calculation
Asset Safety Scalar mapping values (reentrancy & infinite approval exploits) Account ownership & manual rent management Pragmatic Hybrid Linearity (ADR-644 move semantics)
Payload Capacity Expensive quadratic calldata gas expansion Strict 1,232-byte IPv6 MTU limit Unconstrained transaction batching with native ISO 20022
Stack Bounds 1024 stack depth 32KB BPF stack frame ceiling Register-allocated static memory execution graph

🚀 Quick Start in 30 Seconds

1. Install the Compiler (synlang)

Run the official one-line installer:

curl -fsSL https://raw.githubusercontent.com/Synaptics-Lab/synlang/main/scripts/install.sh | bash

Or via Node.js:

npm install -g @synapticchain/synlang

2. Write Your First Contract (Counter.syn)

contract Counter {
    state count: u64;
    state owner: Address;

    event Incremented { by: Address, new_count: u64 }

    #[reads(owner)]
    #[writes(count)]
    #[writes(owner)]
    pub fn setup() {
        require!(msg.value > 0, "Storage rent deposit required");
        require!(self.owner == Address::zero(), "Already initialized");
        self.owner = msg.sender;
        self.count = 0;
    }

    #[reads(count)]
    #[writes(count)]
    pub fn increment() -> u64 {
        self.count = self.count + 1;
        emit Incremented { by: msg.sender, new_count: self.count };
        return self.count;
    }

    #[reads(count)]
    pub fn get_count() -> u64 {
        return self.count;
    }
}

3. Compile to Binary Execution Plan (.plan)

synlang compile Counter.syn Counter.plan

4. Deploy to the Public African Testnet

synlang deploy Counter.plan https://testnet.synapticchain.xyz/rpc/ \
  --key <YOUR_ED25519_PRIVATE_KEY_HEX>

🧩 Developer & Agent Tooling Suite

1. Visual Studio Code & Cursor Extension

Official language support with syntax highlighting, bracket matching, and code snippets:

code --install-extension editors/vscode/synapticlang-2.0.0.vsix
# Or in Cursor:
cursor --install-extension editors/vscode/synapticlang-2.0.0.vsix

2. Model Context Protocol (MCP) Server for AI Assistants

Equip Claude Desktop, Cursor, Copilot, or Windsurf with 12 contract-generation and compiler tools:

{
  "mcpServers": {
    "synapticlang": {
      "command": "npx",
      "args": ["-y", "@synapticchain/synapticlang-mcp-server"]
    }
  }
}

📚 Canonical Documentation & Guides


📂 Repository Layout

synlang/
├── bin/                          # Standalone native compiler binaries
├── docs/                         # Canonical specification, tutorial & cookbook
│   ├── CANONICAL_SPECIFICATION.md
│   ├── LEARN_IN_15_MINUTES.md
│   └── COOKBOOK.md
├── editors/
│   └── vscode/                   # VS Code / Cursor extension (.vsix & grammar)
├── examples/                     # Production-verified contract templates
│   ├── 01_counter/
│   ├── 02_src20_token/
│   ├── 03_staking_vault/
│   ├── 04_evidence_escrow/
│   └── 05_multilateral_clearinghouse/
├── mcp-server/                   # Model Context Protocol server for AI coding agents
├── packages/
│   └── npm-cli/                  # @synapticchain/synlang Node.js CLI wrapper
└── scripts/
    └── install.sh                # One-line curl installer

🛡️ License

Dual-licensed under either:

at your option.

About

The official compiler, language specification, VS Code extension, and developer toolchain for SynapticLang (.syn) on SynapticChain Layer-1

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages