"Honesty in English: Explicitness without making your brain flip"
Conduit is a modern systems programming language that combines Rust's memory safety with C#'s ergonomic syntax and C's low-level control. It transpiles to Rust, providing safety guarantees while maintaining readability and developer productivity.
File Extension: .cndt
int main() {
#println("Hello, Conduit!");
return 0;
}
int main() {
(u128, u128) mut x = (0, 1);
Vector<u128> mut list = Vector<u128>.new();
list.push(x.0);
list.push(x.1);
while (true) {
var (t, overflow) = x.1.overflowing_add(x.0);
if (overflow) {
#println("Sequence complete: {} numbers", list.len());
break;
}
list.push(t);
x.0 = x.1;
x.1 = t;
}
#println("{:?}", list);
return 0;
}
- Borrow checker - Rust's proven ownership system
- No null by default - Use
string?for nullable types - Lifetime tracking - Compile-time memory management
- C-family style - Return types first, familiar operators
- Clear mutability -
mut/unmutinstead of confusing shadowing - Explicit borrowing -
&T(immutable),&!T(mutable) - Intuitive lifetimes -
^[a]postfix notation
- Type inference -
var x = 5when types are obvious - Pattern matching - Powerful
matchexpressions - Error handling -
SafetyNet<T, E>withCaughtkeyword - C# visibility -
public,internal,private
- Transpiles to Rust - Inherits Rust's performance
- No runtime overhead - All safety checks at compile-time
- Direct hardware access -
unsafe_rust!escape hatch
// Immutable by default
int x = 5;
var y = 10; // Type inferred
// Explicit mutability
int mut counter = 0;
counter = counter + 1;
// Transform mutability
mut counter; // Make mutable (no assignment)
unmut counter; // Make immutable
// Ownership (default)
Vector<int> data = Vector<int>{1, 2, 3};
// Immutable borrow
void read_data(&Vector<int> data) {
#println("Length: {}", data.len());
}
// Mutable borrow
void modify_data(&!Vector<int> data) {
data.push(4);
}
// Lifetime declaration (postfix)
struct Parser^[input] {
string content
}
// Lifetime in functions
string^[a] longest^[a](string^[a] x, string^[a] y) {
if (x.len() > y.len()) { x } else { y }
}
// Borrow existing lifetime
string get_data^['input](&Parser^[input] parser) {
parser.content
}
enum error FileError {
NotFound,
PermissionDenied,
InvalidPath(string)
}
SafetyNet<string, FileError> read_file(string path) {
if (!exists(path)) {
Caught FileError.NotFound;
}
return load_contents(path);
}
// Pattern matching
match (result) {
content => { #println("Success: {}", content); }
FileError.NotFound => { #println("File missing"); }
_ => { #println("Other error"); }
}
// Method chaining
result
.OnSuccess((content) => process(content))
.OnCaught((err) => log_error(err));
struct Point {
int x
int y
}
trait Drawable {
void draw()
}
define Circle : Drawable {
struct {
Point center
int radius
}
Circle(Point center, int radius) {
self.center = center
self.radius = radius
}
methods Drawable {
void draw() {
#println("Circle at ({}, {})", self.center.x, self.center.y);
}
}
methods {
int area() {
return 3.14 * self.radius * self.radius;
}
}
}
// Standard enum (mixed variants)
enum Message {
Quit,
Move bundles { int x, int y },
Write bundles string
}
// All-data enum
enum bundles Event {
KeyPress(char, int),
MouseClick(int x, int y)
}
// Pattern matching
match (msg) {
Message.Quit => { exit(0); }
Message.Move { x, y } => { move_to(x, y); }
Message.Write(text) => { print(text); }
}
// Expression-bodied
var double(int x) => x * 2;
// Block-bodied
var process(int x) => {
var temp = x * 2;
return temp + 1;
};
// Capturing environment (primitives auto-copy)
int factor = 10;
var scale(int x) => x * factor;
// Non-Copy types require 'move'
Vector<int> data = #vec[1, 2, 3];
var process(int x) => move x + data[0];
// Standard macros (# prefix)
#println("Hello, {}!", name);
#dbg(variable);
#vec[1, 2, 3];
#panic("Critical error!");
public struct User {
public string username
internal int user_id
private string password_hash
}
public void api_function() { }
internal void helper() { }
private void secret() { }
Available soon.
Available soon.
conduit/
├── CSBackend # Suite written in C# for quick prototype
├── RSBackend # Suite written in Rust for more advanced UNICODE_VERSION
│
├── Spec_test/ # Test suite
│ ├── cndt_in/ # Test inputs
│ ├── rs_out/ # Expected outputs
│ └── rs_gen/ # Generated outputs
│
├── ConduitLang_Specification.md # Specification file
└── README.md # Obvious.
helloworld.cndt- Basic printingminimal.cndt- Variables, arithmeticfunctions.cndt- Function callsconditional.cndt- if/else branchingloops.cndt- Loops, mutabilitystructs.cndt- Data structuresfibonacci.cndt- Complex exampleultimate.cndt- Turing-complete test suite
Code should read like human language. Avoid symbolic soup and cryptic syntax like an FP purist.
Example - Rust vs Conduit:
// Rust
fn longest<'a>(x: &'a str, y: &'a str) -> &'a str
// Conduit
string^[a] longest^[a](string^[a] x, string^[a] y)Make intent clear, but don't require mental gymnastics.
Example - Mutability:
// Rust (confusing shadowing)
let x = 5;
let x = x + 1; // New binding or mutation?
let mut x = x; // Now mutable
// Conduit (clear intent)
int x = 5;
unmut x = x + 1; // Transform immutable while assigning values
mut x; // Transform to mutableLeverage Rust's battle-tested borrow checker without its syntax complexity.
For the complete language specification, see the specification.
Key sections:
- Variables & Mutability
- Ownership & Borrowing
- Lifetimes
- Type System
- Functions & Lambdas
- Structs & Traits
- Enums & Pattern Matching
- Error Handling (SafetyNet)
- Macros
- Visibility & Access Control
- Core syntax design
- Language specification
- Lexer implementation
- Parser (AST generation)
- Basic transpiler (minimal features)
- More stuff idk
- Critics to spefification - Any proposes to cover more of Rust's feature set, or report a flaw within the existing specification syntax
- Parser development - Implementing language features
- Standard library - Wrapping Rust stdlib with Conduit-friendly APIs
- Documentation - Tutorials, examples, guides
- Testing - More test cases, edge cases
- Tooling - IDE extensions, syntax highlighting, formatters
Rust's borrow checker is brilliant, but its syntax is a barrier. Conduit provides the same safety guarantees with familiar C-family syntax, making systems programming accessible to more developers.
No. Conduit transpiles to idiomatic Rust, which compiles to native machine code with zero runtime overhead.
The only overhead is compile time. Users won't notice, but you will
TBD, as new syntaxes may conflict with Crates API provided, that expects native Rust syntax
Not yet. Conduit is in early development (Haven't even written a working suite yet).
Feel free to email me (from profile) or make an issue!
Apache 2.0 License - See LICENSE for details.
Copyright 2026 BashhScriptKid
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
The specification document is under a different license (CC-BY-SA) and are not covered by the repository's Apache 2.0 license.
- Repository: https://github.com/BashhScriptKid/Conduit
- Issues: https://github.com/BashhScriptKid/Conduit/issues
- Discussions: https://github.com/BashhScriptKid/Conduit/discussions
Conduit's design is derived from:
- Rust - For the borrow checker and safety guarantees
- C# - For syntax inspiration and developer ergonomics
- C - For direct hardware control philosophy
- Zen-C - For transpiler architecture inspiration