CodeBrix.Platform.TclTk.BsdLicenseForever 1.0.240.97

There is a newer version of this package available.
See the version list below for details.
dotnet add package CodeBrix.Platform.TclTk.BsdLicenseForever --version 1.0.240.97
                    
NuGet\Install-Package CodeBrix.Platform.TclTk.BsdLicenseForever -Version 1.0.240.97
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CodeBrix.Platform.TclTk.BsdLicenseForever" Version="1.0.240.97" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodeBrix.Platform.TclTk.BsdLicenseForever" Version="1.0.240.97" />
                    
Directory.Packages.props
<PackageReference Include="CodeBrix.Platform.TclTk.BsdLicenseForever" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CodeBrix.Platform.TclTk.BsdLicenseForever --version 1.0.240.97
                    
#r "nuget: CodeBrix.Platform.TclTk.BsdLicenseForever, 1.0.240.97"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CodeBrix.Platform.TclTk.BsdLicenseForever@1.0.240.97
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CodeBrix.Platform.TclTk.BsdLicenseForever&version=1.0.240.97
                    
Install as a Cake Addin
#tool nuget:?package=CodeBrix.Platform.TclTk.BsdLicenseForever&version=1.0.240.97
                    
Install as a Cake Tool

CodeBrix.Platform.TclTk

A fully managed, cross-platform implementation of the Tcl scripting language for .NET. CodeBrix.Platform.TclTk embeds a complete Tcl interpreter — variables, expressions, commands, procedures, namespaces, and a rich two-way .NET object-interop bridge — directly into your application, with no native dependencies. CodeBrix.Platform.TclTk has a single NuGet dependency (System.Security.Cryptography.Pkcs, a Microsoft first-party package used for signature verification — the same dependency the upstream Eagle package declares), and is provided as a .NET 10 library and associated CodeBrix.Platform.TclTk.BsdLicenseForever NuGet package.

CodeBrix.Platform.TclTk supports applications and assemblies that target Microsoft .NET version 10.0 and later. Microsoft .NET version 10.0 is a Long-Term Supported (LTS) version of .NET, and was released on Nov 11, 2025; and will be actively supported by Microsoft until Nov 14, 2028. Please update your C#/.NET code and projects to the latest LTS version of Microsoft .NET.

CodeBrix.Platform.TclTk supports:

  • Creating one or more independent, embeddable Tcl interpreters in-process
  • Evaluating Tcl scripts and expressions from C#, and reading their results
  • Getting and setting Tcl variables (scalars and arrays) from managed code
  • The full core Tcl command set, procedures (proc), and namespaces
  • A built-in script library, embedded in the assembly (no files to deploy)
  • A two-way object-interop bridge for calling .NET from Tcl and vice-versa
  • Cross-platform operation on Windows, Linux, and macOS with zero native dependencies

Sample Code

Evaluating a Tcl script and reading the result

using CodeBrix.Platform.TclTk._Components.Public;

Result result = null;

using (Interpreter interpreter = Interpreter.Create(ref result))
{
    ReturnCode code = interpreter.EvaluateScript("expr {6 * 7}", ref result);

    if (code == ReturnCode.Ok)
        System.Console.WriteLine(result); // 42
    else
        System.Console.WriteLine("error: {0}", result);
}

Getting and setting variables

using CodeBrix.Platform.TclTk._Components.Public;

Result result = null;
Result value = null;

using (Interpreter interpreter = Interpreter.Create(ref result))
{
    interpreter.SetVariableValue("name", "world", ref result);
    interpreter.EvaluateScript("set greeting \"hello, $name\"", ref result);

    interpreter.GetVariableValue("greeting", ref value, ref result);
    System.Console.WriteLine(value); // hello, world
}

CodeBrix.Platform.TclTk.Extras

This repository also builds the companion CodeBrix.Platform.TclTk.Extras.BsdLicenseForever NuGet package: interpreter-side Tcl command extensions that let existing Tcl programs which expect the classic sqlite3 and pdf4tcl packages run unmodified on the managed interpreter.

  • sqlite3 NAME PATH — a tclsqlite-compatible database command (handle verbs eval, onecolumn, changes, close; caller-scope :name parameter binding; unset-variable → SQL NULL; NULL → empty-string read-back), backed by CodeBrix.Sqlite on a PRAGMA-neutral plaintext path, so SQLite files it writes are interchangeable with files written by stock Tcl applications
  • pdf4tcl::new / pdf4tcl::loadBaseTrueTypeFont / pdf4tcl::createFont and the pdf4tcl 0.7 drawing surface (startPage, setFont, setFillColor, setStrokeColor, setLineStyle, getStringWidth, text, line, rectangle, polygon, write, destroy), backed by CodeBrix.PdfDocuments
using CodeBrix.Platform.TclTk._Components.Public;
using CodeBrix.Platform.TclTk.Extras;

Result result = null;

using (Interpreter interpreter = Interpreter.Create(ref result))
{
    Result error = null;
    TclTkExtras.RegisterAll(interpreter, ref error);

    interpreter.EvaluateScript(
        "sqlite3 db :memory:\n" +
        "db eval {create table t (a integer, b text)}\n" +
        "set b hello\n" +
        "db eval {insert into t values (1, :b)}\n" +
        "db onecolumn {select b from t}", ref result);

    System.Console.WriteLine(result); // hello
}

Provenance

CodeBrix.Platform.TclTk is a port of the Eagle project by Joe Mistachkin and the Eagle Development Team. See THIRD-PARTY-NOTICES.txt for full attribution and the upstream license terms.

License

The project is licensed under the Tcl/Tk License (for the ported upstream code) and the BSD 2-Clause License (for modifications). See LICENSE, LICENSE-MODIFICATIONS.txt, and: https://en.wikipedia.org/wiki/BSD_licenses

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on CodeBrix.Platform.TclTk.BsdLicenseForever:

Package Downloads
CodeBrix.Platform.TclTk.Extras.BsdLicenseForever

Interpreter-side Tcl command extensions for CodeBrix.Platform.TclTk: a tclsqlite-compatible "sqlite3" database command and a pdf4tcl-compatible PDF drawing command set. Lets existing Tcl programs that expect the sqlite3 and pdf4tcl packages run unmodified on the managed interpreter, with no native Tcl dependencies.

CodeBrix.Platform.TkCanvas.BsdLicenseForever

A retained-mode reimplementation of the classic Tk widget toolkit, drawn entirely onto a SkiaSharp surface and scripted through CodeBrix.Platform.TclTk. Provides the Tk geometry managers (pack, grid), the classic widget set, the canvas widget with its scene-graph item model, and the Tk event/bind/focus system.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.256.1056 97 9/13/2026
1.0.255.1024 102 9/12/2026
1.0.240.97 124 8/28/2026