VoluntasEngine.VEPL.Native
1.1.0
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package VoluntasEngine.VEPL.Native --version 1.1.0
NuGet\Install-Package VoluntasEngine.VEPL.Native -Version 1.1.0
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="VoluntasEngine.VEPL.Native" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="VoluntasEngine.VEPL.Native" Version="1.1.0" />
<PackageReference Include="VoluntasEngine.VEPL.Native" />
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 VoluntasEngine.VEPL.Native --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: VoluntasEngine.VEPL.Native, 1.1.0"
#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 VoluntasEngine.VEPL.Native@1.1.0
#: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=VoluntasEngine.VEPL.Native&version=1.1.0
#tool nuget:?package=VoluntasEngine.VEPL.Native&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
VoluntasEngine.VEPL.Native
VoluntasEngine.VEPL.Native is a native-AOT compiled interop library providing a high-performance lexer and parser for VEPL. It can be called from any .NET or unmanaged application via P/Invoke.
Features
- Native AOT: Pre-compiled to a single native library for maximum startup speed and minimal dependencies.
- Flex + Bison: Combines a Flex lexer and Bison parser for C#-style syntax (namespaces, classes, methods, expressions).
- Managed Interop: Easy P/Invoke signatures for both string- and file-based lexing.
- Safe & Unsafe I/O: Helpers for chunked (“safe”) and direct (“unsafe”) writing of lexemes to disk.
Installation
NuGet
dotnet add package VoluntasEngine.VEPL.Native --version 1.1.0
This will pull down the native runtime library and C# interop shim.
Usage
C# P/Invoke Interop
using System;
using System.Runtime.InteropServices;
class Program
{
[DllImport("VoluntasEngine.VEPL.Native", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr lex_from_string(string input, out int count);
[DllImport("VoluntasEngine.VEPL.Native", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr lex_from_file(string path, out int count);
[DllImport("VoluntasEngine.VEPL.Native", CallingConvention = CallingConvention.Cdecl)]
private static extern void free_results(IntPtr data, int count);
static void Main()
{
int count;
IntPtr ptr = lex_from_string("int64 a = 5; namespace N { class C { } }", out count);
string[] tokens = new string[count];
for (int i = 0; i < count; i++)
{
IntPtr strPtr = Marshal.ReadIntPtr(ptr, i * IntPtr.Size);
tokens[i] = Marshal.PtrToStringAnsi(strPtr);
}
free_results(ptr, count);
Console.WriteLine("Tokens:");
Console.WriteLine(string.Join(Environment.NewLine, tokens));
}
}
Writing Lexemes to Disk
// Safe write (chunks data to avoid memory spikes)
LexerInterop.WriteLexemesToFileSafe(tokens, "output_safe.txt");
// Unsafe write (writes all at once)
LexerInterop.WriteLexemesToFileUnsafe(tokens, "output_unsafe.txt");
License
This library is licensed under the CC BY-NC-SA 4.0 — non-commercial use only, share-alike, with attribution to F000NK.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|