diff --git a/Cargo.lock b/Cargo.lock index f58c0b7a7d39..108db71f811f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2774,6 +2774,13 @@ dependencies = [ "opendal", ] +[[package]] +name = "opendal-dotnet" +version = "0.37.0" +dependencies = [ + "opendal", +] + [[package]] name = "opendal-hs" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 3f0b7707357d..82b1569f3ba6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,6 +32,7 @@ members = [ "bindings/java", "bindings/haskell", "bindings/lua", + "bindings/dotnet", "bin/oli", "bin/oay", diff --git a/bindings/dotnet/.gitignore b/bindings/dotnet/.gitignore new file mode 100644 index 000000000000..adb23ad6bc09 --- /dev/null +++ b/bindings/dotnet/.gitignore @@ -0,0 +1,397 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml + +# Rust targets +target diff --git a/bindings/dotnet/Cargo.toml b/bindings/dotnet/Cargo.toml new file mode 100644 index 000000000000..c76fd5f4c64b --- /dev/null +++ b/bindings/dotnet/Cargo.toml @@ -0,0 +1,35 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +[package] +name = "opendal-dotnet" +publish = false + +authors.workspace = true +edition.workspace = true +homepage.workspace = true +license.workspace = true +repository.workspace = true +rust-version.workspace = true +version = "0.1.0" + +[lib] +crate-type = ["cdylib"] +doc = false + +[dependencies] +opendal.workspace = true diff --git a/bindings/dotnet/DotOpenDAL.Tests/BlockingOperatorTest.cs b/bindings/dotnet/DotOpenDAL.Tests/BlockingOperatorTest.cs new file mode 100644 index 000000000000..aa8f2f2d6bab --- /dev/null +++ b/bindings/dotnet/DotOpenDAL.Tests/BlockingOperatorTest.cs @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +namespace DotOpenDAL.Tests; + +public class BlockingOperatorTest +{ + [Fact] + public void TestReadWrite() + { + var op = new BlockingOperator(); + var content = "123456"; + Assert.NotEqual(op.Op, IntPtr.Zero); + op.Write("test", content); + var result = op.Read("test"); + Assert.Equal(content, result); + } +} diff --git a/bindings/dotnet/DotOpenDAL.Tests/DotOpenDAL.Tests.csproj b/bindings/dotnet/DotOpenDAL.Tests/DotOpenDAL.Tests.csproj new file mode 100644 index 000000000000..7209d89b2551 --- /dev/null +++ b/bindings/dotnet/DotOpenDAL.Tests/DotOpenDAL.Tests.csproj @@ -0,0 +1,28 @@ + + + + net7.0 + enable + enable + + false + true + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + diff --git a/bindings/dotnet/DotOpenDAL.Tests/Usings.cs b/bindings/dotnet/DotOpenDAL.Tests/Usings.cs new file mode 100644 index 000000000000..8e6a8024ab43 --- /dev/null +++ b/bindings/dotnet/DotOpenDAL.Tests/Usings.cs @@ -0,0 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +global using Xunit; diff --git a/bindings/dotnet/DotOpenDAL/BlockingOperator.cs b/bindings/dotnet/DotOpenDAL/BlockingOperator.cs new file mode 100644 index 000000000000..9404e581db1f --- /dev/null +++ b/bindings/dotnet/DotOpenDAL/BlockingOperator.cs @@ -0,0 +1,64 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +using System; +using System.Runtime.InteropServices; + +namespace DotOpenDAL; + +public class BlockingOperator +{ + public IntPtr Op { get; } + + public BlockingOperator() + { + Op = blocking_operator_construct("memory"); + } + + public void Write(string path, string content) + { + blocking_operator_write(Op, path, content); + } + + public string Read(string path) + { + return blocking_operator_read(Op, path); + } + + [DllImport( + "opendal_dotnet", + EntryPoint = "blocking_operator_construct", + CallingConvention = CallingConvention.Cdecl, + CharSet = CharSet.Auto)] + private static extern IntPtr blocking_operator_construct(string scheme); + + [DllImport( + "opendal_dotnet", + EntryPoint = "blocking_operator_write", + CallingConvention = CallingConvention.Cdecl, + CharSet = CharSet.Auto)] + private static extern void blocking_operator_write(IntPtr op, string path, string content); + + [DllImport( + "opendal_dotnet", + EntryPoint = "blocking_operator_read", + CallingConvention = CallingConvention.Cdecl, + CharSet = CharSet.Auto)] + private static extern string blocking_operator_read(IntPtr op, string path); +} diff --git a/bindings/dotnet/DotOpenDAL/DotOpenDAL.csproj b/bindings/dotnet/DotOpenDAL/DotOpenDAL.csproj new file mode 100644 index 000000000000..2d4e1e8026aa --- /dev/null +++ b/bindings/dotnet/DotOpenDAL/DotOpenDAL.csproj @@ -0,0 +1,26 @@ + + + + DotOpenDAL + The official .NET binding for Apache OpenDAL (incubating) + 0.1.0 + $(Version) + $(Version) + Apache OpenDAL (incubating) + Apache Software Foundation + $(Company) + Apache;OpenDAL + Apache-2.0 + + net7.0 + enable + enable + + + + + Always + + + + diff --git a/bindings/dotnet/build.py b/bindings/dotnet/build.py new file mode 100755 index 000000000000..7996706ffe5a --- /dev/null +++ b/bindings/dotnet/build.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python3 + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + + +from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser +from pathlib import Path +import shutil +import subprocess + + +def classifier_to_target(classifier: str) -> str: + if classifier == 'osx-aarch_64': + return 'aarch64-apple-darwin' + if classifier == 'osx-x86_64': + return 'x86_64-apple-darwin' + if classifier == 'linux-x86_64': + return 'x86_64-unknown-linux-gnu' + if classifier == 'windows-x86_64': + return 'x86_64-pc-windows-msvc' + raise Exception(f'Unsupported classifier: {classifier}') + + +def get_cargo_artifact_name(classifier: str) -> str: + if classifier == 'osx-aarch_64': + return 'libopendal_dotnet.dylib' + if classifier == 'osx-x86_64': + return 'libopendal_dotnet.dylib' + if classifier == 'linux-x86_64': + return 'libopendal_dotnet.so' + if classifier == 'windows-x86_64': + return 'opendal_dotnet.dll' + raise Exception(f'Unsupported classifier: {classifier}') + + +if __name__ == '__main__': + basedir = Path(__file__).parent + + parser = ArgumentParser(formatter_class=ArgumentDefaultsHelpFormatter) + parser.add_argument('--classifier', type=str, required=True) + args = parser.parse_args() + + cmd = ['cargo', 'build', '--color=always', '--release'] + + target = classifier_to_target(args.classifier) + if target: + command = ['rustup', 'target', 'add', target] + print('$ ' + subprocess.list2cmdline(command)) + subprocess.run(command, cwd=basedir, check=True) + cmd += ['--target', target] + + output = basedir / 'target' / 'bindings' + Path(output).mkdir(exist_ok=True, parents=True) + cmd += ['--target-dir', output] + + print('$ ' + subprocess.list2cmdline(cmd)) + subprocess.run(cmd, cwd=basedir, check=True) + + artifact = get_cargo_artifact_name(args.classifier) + src = output / target / 'release' / artifact + dst = basedir / 'target' / 'native' / args.classifier / artifact + dst.parent.mkdir(exist_ok=True, parents=True) + shutil.copy2(src, dst) diff --git a/bindings/dotnet/dotnet.sln b/bindings/dotnet/dotnet.sln new file mode 100644 index 000000000000..4325aa65a141 --- /dev/null +++ b/bindings/dotnet/dotnet.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotOpenDAL", "DotOpenDAL\DotOpenDAL.csproj", "{9DE3EBDB-D64A-4432-89A6-AB6BC1183935}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotOpenDAL.Tests", "DotOpenDAL.Tests\DotOpenDAL.Tests.csproj", "{060008AD-FEAD-49B8-97D0-3EFDC2505315}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9DE3EBDB-D64A-4432-89A6-AB6BC1183935}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9DE3EBDB-D64A-4432-89A6-AB6BC1183935}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9DE3EBDB-D64A-4432-89A6-AB6BC1183935}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9DE3EBDB-D64A-4432-89A6-AB6BC1183935}.Release|Any CPU.Build.0 = Release|Any CPU + {060008AD-FEAD-49B8-97D0-3EFDC2505315}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {060008AD-FEAD-49B8-97D0-3EFDC2505315}.Debug|Any CPU.Build.0 = Debug|Any CPU + {060008AD-FEAD-49B8-97D0-3EFDC2505315}.Release|Any CPU.ActiveCfg = Release|Any CPU + {060008AD-FEAD-49B8-97D0-3EFDC2505315}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/bindings/dotnet/src/lib.rs b/bindings/dotnet/src/lib.rs new file mode 100644 index 000000000000..ba2415b9dd4b --- /dev/null +++ b/bindings/dotnet/src/lib.rs @@ -0,0 +1,82 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use std::collections::HashMap; +use std::os::raw::c_char; +use std::str::FromStr; + +/// # Safety +/// +/// Not yet. +#[no_mangle] +pub unsafe extern "C" fn blocking_operator_construct( + scheme: *const c_char, +) -> *const opendal::BlockingOperator { + if scheme.is_null() { + return std::ptr::null(); + } + + let scheme = match opendal::Scheme::from_str(std::ffi::CStr::from_ptr(scheme).to_str().unwrap()) + { + Ok(scheme) => scheme, + Err(_) => return std::ptr::null(), + }; + + let mut map = HashMap::default(); + map.insert("root".to_string(), "/tmp".to_string()); + let op = match opendal::Operator::via_map(scheme, map) { + Ok(op) => op.blocking(), + Err(err) => { + println!("err={err:?}"); + return std::ptr::null(); + } + }; + + Box::leak(Box::new(op)) +} + +/// # Safety +/// +/// Not yet. +#[no_mangle] +pub unsafe extern "C" fn blocking_operator_write( + op: *const opendal::BlockingOperator, + path: *const c_char, + content: *const c_char, +) { + let op = &*(op); + let path = std::ffi::CStr::from_ptr(path).to_str().unwrap(); + let content = std::ffi::CStr::from_ptr(content).to_str().unwrap(); + op.write(path, content.to_owned()).unwrap() +} + +/// # Safety +/// +/// Not yet. +#[no_mangle] +pub unsafe extern "C" fn blocking_operator_read( + op: *const opendal::BlockingOperator, + path: *const c_char, +) -> *const c_char { + let op = &*(op); + let path = std::ffi::CStr::from_ptr(path).to_str().unwrap(); + let mut res = op.read(path).unwrap(); + res.push(0); + std::ffi::CString::from_vec_with_nul(res) + .unwrap() + .into_raw() +} diff --git a/licenserc.toml b/licenserc.toml index e3a939cba43e..60fbdfff0d47 100644 --- a/licenserc.toml +++ b/licenserc.toml @@ -31,11 +31,15 @@ excludes = [ # Website generated files "website/build", "website/.docusaurus", + + # Documents + "**/*.md", + "**/*.mdx", ] [properties] inceptionYear = 2023 [mapping.SLASHSTAR_STYLE] -# use SLASH_STAR_STYLE licence header for C/C++ code -extensions = ["c", "cc", "cpp", "h", "hpp"] +# use SLASH_STAR_STYLE licence header for C/C++ and C# code +extensions = ["c", "cc", "cpp", "h", "hpp", "cs"]