• Stars
    star
    2,691
  • Rank 16,967 (Top 0.4 %)
  • Language
    C#
  • License
    BSD 2-Clause "Sim...
  • Created over 10 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

.NET language playground

This repository contains source code for https://sharplab.io.

SharpLab is a .NET code playground that shows intermediate steps and results of code compilation. Some language features are thin wrappers on top of other features -- e.g. using() becomes try/finally. SharpLab allows you to see the code as compiler sees it, and get a better understanding of .NET languages.

Recent versions include experimental support for running code, with some limitations.

Languages

SharpLab supports three source languages:

  1. C#
  2. Visual Basic
  3. F#

Due to complexity of F#'s compiler library, some features might not be available for F#.

Decompilation/Disassembly

There are currently three targets for decompilation/disassembly:

  1. C#
  2. IL
  3. JIT Asm (Native Asm Code)

Note that VB=>C# disassembly shouldn't be used to convert between languages, as the produced code is intentionally overly verbose.

Execution

You can use "Run" target to execute your code and see the output.
Execution enables a few nice features such as flow arrows β€” see here:
https://twitter.com/ashmind/status/894058159223955456.

Execution is intentionally limited, however the limits are continuously improved and corrected.

Contributing

See CONTRIBUTING.md.

More Repositories

1

mirrorsharp

MirrorSharp is a code editor <textarea> built on Roslyn and CodeMirror
C#
218
star
2

FluentConsole

FluentConsole.Green.Line("Hello World!")
C#
123
star
3

ashmind-extensions

Most of those extensions should have been in BCL.
C#
65
star
4

SourceMock

SourceMock is a C# mocking framework based on source generators
C#
55
star
5

ExceptionBreaker

Visual Studio extension that provides a way to quickly toggle breaking on all exceptions.
C#
48
star
6

net-feature-tests

Feature tests for .NET libraries
HTML
45
star
7

Unbreakable

Alive, dammit!
C#
37
star
8

expressive

Expressive is a library that converts compiled methods into expression trees.
C#
32
star
9

Argument

Argument validation methods, for example: this.user = Argument.NotNull("user", user).
C#
26
star
10

SolutionIcon

Visual Studio extension that adds solution-related icon to VS taskbar button.
C#
23
star
11

SourcePath

A prototype of XPath-like queries for C# syntax trees
C#
15
star
12

librawnet

Wrapper for the libraw API. You can *try* to use it, but it is very raw indeed.
C#
14
star
13

StringInterpolationBridge

FormattableString for pre 4.6 .NET
XML
11
star
14

language-syntax-explanations

πŸ“š Language syntax explanations used by SharpLab
JavaScript
9
star
15

html2text

Small utility to extract text from HTML
C#
7
star
16

AttachToAnything

Provides a Visual Studio toolbar to quickly attach to any predefined process
C#
7
star
17

neostructure

Opinionated project template for .NET
JavaScript
5
star
18

pedanticsvg

A code-focused SVG editor
JavaScript
5
star
19

codemirror-addon-infotip

Infotip is a CodeMirror addon that provides context-based tooltips
JavaScript
5
star
20

gallery

Peer-to-browser gallery implementation in ASP.NET MVC.
C#
4
star
21

StackFilter

Alt. homepage for StackOverflow with 200% more filters
JavaScript
4
star
22

Gate.Adapters.AspNet

Unofficial ASP.NET (MVC) adapter for https://github.com/owin/gate
JavaScript
4
star
23

Cilin

Here be dragons
C#
4
star
24

codemirror-addon-lint-fix

Lint Fix is a CodeMirror addon that provides UI for quick-fixing lint issues.
TypeScript
4
star
25

light

C#
3
star
26

infoof

Info.PropertyOf<You>(u => u.Bases)
C#
3
star
27

AgentHeisenbug

[ThreadSafe] and [ReadOnly] for ReSharper
C#
3
star
28

lezer-csharp-simple

Minimal C# parser for lezer parser system
TypeScript
3
star
29

sharplab-infrastructure

PowerShell
3
star
30

WebConfig.MimeMaps

Shell
3
star
31

xsltui

Single page XSLT-transformer.
JavaScript
3
star
32

lightwiki

JavaScript
3
star
33

Autofac.Extras.FileSystemRegistration

File system assembly discovery for Autofac (e.g. builder.RegisterAssemblyModulesInDirectories).
C#
3
star
34

ashmind-code

Managed program structural analysis attempts from 2008
C#
3
star
35

lightget

A simple .NET thing that tries to be wget
C#
2
star
36

ftpush

C#
2
star
37

LightMigrator

Yet another migrations framework (readme will appear eventually)
C#
2
star
38

oldowan

The primitive build system
TypeScript
2
star
39

pedantic-io-embeddedresource

Embedded resource helper that mirrors File APIs: e.g. EmbeddedResource.ReadAllText().
C#
2
star
40

api-extractor-bug-import-type

Repro for api-extractor import type bug
TypeScript
2
star
41

Impostor

Configuration-based mock HTTP service
C#
2
star
42

licenses.json

A single JSON data file with information on common software licenses.
JavaScript
2
star
43

making.sharplab.io

Ruby
2
star
44

rxjs-asynctestscheduler-prototype

PROTOTYPE, do not use yet
TypeScript
2
star
45

textmetrics

JavaScript library for text measurement (similar to fontmetrics)
JavaScript
2
star
46

spinach

A set of tools to sign unsigned assemblies
C#
2
star
47

OpenSans.nupkg

NuGet package for Open Sans by Steve Matteson.
2
star
48

CopyAndReplace

Visual Studio extension to quckly rename/change file that was just pasted
C#
2
star
49

redrocket

JavaScript
2
star
50

AutoSwap

Very incomplete DI service implementation hotswapper
C#
1
star
51

csharplang-reader

Simple reader for dotnet/csharplang meeting notes.
TypeScript
1
star
52

zirconium-fish

A very rough proof of concept for in-browser automation (Chrome only for now).
JavaScript
1
star
53

ashmind.github.io

1
star
54

RoslynList

List of all roslyn-related online tools
1
star
55

Chew

Tool that combines/minifies <script> and <link> tags in html. Warning: very limited/bad code inside.
C#
1
star
56

AshMind.IO.Abstractions

Similar to System.IO.Abstractions, but with .NET 4.5 methods and slightly different API
C#
1
star
57

bootstrap-less-singlefile

A single file version of bootstrap .less files
CSS
1
star