neuron-explorer
Qwen3.5‑4B 전용 조향형 뉴런 탐색기, 모든 MLP 뉴런을 밀어 결과를 보관·탐색
compiler for the ghūl programming language
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
This is the compiler for the ghūl programming language. It is a self-hosting compiler): the compiler itself is written entirely in ghūl. The compiler requires the .NET 10 SDK. It provides both the .NET 10 runtime the compiler tool itself runs on and the reference assemblies your projects build against. The compiler produces standard .NET assemblies and packages targeting .NET 10. There are a few different ways to get the compilerREADME 전문 보기 ↗
This is the compiler for the ghūl programming language. It is a self-hosting compiler: the compiler itself is written entirely in ghūl.
The compiler builds for three targets: .NET 10, WebAssembly and native executables through LLVM.
.ghulproj project file, and needs the .NET 10 SDK, which provides both the runtime the compiler tool runs on and the reference assemblies your projects build against. A ghūl program can use any .NET library. This is the best target for a real project today.ghul command-line tool from the ghul-cli repository, from a ghul-project.json manifest, and needs no .NET SDK to build or run on Linux x64 and arm64.ghul-llvm. It is built with ghul and needs no .NET SDK or C compiler.The WebAssembly and native targets use ghūl's own library, ghul-runtime, in place of the .NET libraries. It is enough to build the compiler itself and to run most of the Rosetta Code solutions, and it doesn't have everything: there are no regular expressions, no HTTP or sockets, no culture-aware formatting, and no decimal, and a program can't call a library that already exists. Native programs can call C with @extern. See WebAssembly and native executables for what each supports.
For the .NET target, the .NET 10 SDK. For the other two, only the ghul command, which installs as a native executable on Linux x64 and arm64 and as a .NET tool anywhere else, and Node.js to run WebAssembly programs (ghul install node fetches one).
There are a few different ways to get the compiler
If you initialize your project using one of the ghūl .NET project templates, the template will add the compiler to your project folder as a local .NET tool - just run dotnet tool restore to restore it.
If you create a new GitHub repo from the ghūl repository template, then the compiler will be pre-configured as a local .NET tool in your project folder - run dotnet tool restore to restore it.
You can manually install the compiler from the ghūl compiler .NET tool package
ghul commandThe ghul command from ghul-cli builds ghūl projects for WebAssembly and native executables, and installs and updates its own compiler. On Linux x64 and arm64 it installs without .NET:
curl -fsSL https://raw.githubusercontent.com/ghul-lang/ghul-cli/main/install.sh | sh
ghul new hello
cd hello
ghul run
Elsewhere, install it as a .NET tool with dotnet tool install -g ghul.cli.
The compiler expects to be driven by MSBuild using a .ghulproj project file.
See the ghūl test project for
a real-world example, or use one of the project templates to get started.
You'll need some ghūl source files. By convention ghūl source files have the extension .ghul, and the standard MSBuild targets will include **/*.ghul when building.
Once you have a project file and some ghūl source files, you can use the normal .NET SDK commands to build, pack, and run your project:
dotnet build
dotnet pack
dotnet run
A .NET application written in ghūl requires the .NET 10 runtime. A WebAssembly application requires Node.js or a WasmGC browser, and a native application requires nothing.
Visual Studio Code will give you rich language support via the ghūl VSCode language extension.
Any container image with the .NET 10 SDK will do. The one configured here is mcr.microsoft.com/devcontainers/dotnet:10.0, Microsoft's dev container build of the SDK, and it runs as that image's non-root vscode user. Pin ghul.compiler in your project's local .NET tool manifest and the compiler will be restored automatically when the container starts. A minimal worked example is in this gist.
For a short ghūl programming language tutorial and reference, see GHUL.md in this repository. For more ghūl language details, see the the ghūl programming language website
The ghūl language is sufficiently expressive and the compiler is stable enough for the compiler itself to be written in ghūl. Like any compiler it has bugs - issue reports are welcome.
Bug reports, language questions, documentation fixes and code are all welcome. See CONTRIBUTING.md for how to build and test the compiler and how to raise a pull request, and SECURITY.md for how to report a suspected vulnerability.