Pure is a C# scripting tool. It offers very robust support for single-file C# scripting and allows you to run C# programs by simply do: pure script.cs
.
Pure 1 was developed by Charles Zhang and originally released under MIT (Github), and debut on Charles Zhang's itch.io page, Pure 2 is refactored to work within the Divooka ecosystem and currently closed source. .
Note: The source code for Pure 2 will become available when we have more resource to maintain it, so as many other things in Divooka. Because of the same reason, the software is tested extensively only on Windows, though is built with cross-platform in mind.
At the moment, you can download the executable direct from our Itch.io page.
Pure 2 is a lightweight C# scripting platform with modern C# 12 syntax and support for easy Nuget import. Pure is based on Roslyn. In addition to base .Net runtime functionalities, Pure offers some additional libraries for quickly dealing with common tasks, and provides a handy scripting (REPL and Notebook) interface, plus a place where people can share their snippets. Pure 2 is conceptually similar to Pure but will be architecturally very different - it directly builds upon Parcel NExT's Ama runtime. Pure is designed for very short snippets and getting everyday tasks done quicker.
Pure 2 uses C# 12 and is similar to top-level statements in C#, with the following features:
Features:
Import
).PUREPATH
to search for scripts when using Include
and when executing script file directly from command line as the first argument.Latest version requires .Net 8.
You need to install .Net 8 runtime and ASP.Net Core runtime - it's recommended you install both SDK 8.0.x (essential for module installation tool), ASP.NET Core Runtime 8.0.x (essential for general usage) and .NET Desktop Runtime 8.0.x (essential for Notebook on Windows) from this page: https://dotnet.microsoft.com/en-us/download/dotnet/8.0
For issues, please go to issue page: https://github.com/Pure-the-Language/Pure/issues
With C# .Net 10 file based app coming and gradually make native .Net more scripting friendly, as per Andrew Lock's article. It's pretty much what Pure does, except it uses special syntax more extensively and there is no REPL yet. Pure will focus more on easier and full integration with Divooka ecosystem and simplified entry and scripting syntax while maintaining backward compatibility. With that being said, in order to reduce maintenance effort, it's recommended to gradually phase put Pure (as standalone CLI) in favour of official .Net SDK.
Pure will continue to be provided as in-Divooka scripting tool based on Roslyn.
Anecdotes: Not to be confused with PURE (Functional Programming) and PureScript.
Pure 1
Pure 2 (Latest)
Dev Log