WebSharper - Full-stack, functional, reactive web apps and microservices in F# and C#
APACHE-2.0 License
Bot releases are hidden (Show)
This is a minor release of WebSharper 6. NuGet version 6.1.5.317
.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.1.5.317
FSharp.Compiler.Service 43.7.300
, adding compatibility for new F# features like the --test:GraphBasedChecking
compiler flag for faster compilation.Published by Jand42 over 1 year ago
This is a minor release of WebSharper 6. NuGet version 6.1.4.277
.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.1.4.277
.html
files generated (fixing a break introduced in WebSharper 6.0).net7.0
.Published by Jand42 over 1 year ago
This is a minor release of WebSharper 6. NuGet version 6.1.3.269
.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.1.3.269
FSharp.Core.Operators
module. Same as in F#, define your operator or trigonometric function as a static method on your custom numeric type.Published by Jooseppi12 almost 2 years ago
This is a minor release of WebSharper 6. NuGet version 6.1.2.265
.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.1.2.265
let rec x =
or let x =
inside module rec
that uses a function/type defined below it)Published by Jand42 almost 2 years ago
This is a minor release of WebSharper 6. NuGet version 6.1.1.252
.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.1.1.252
InternalProxy
attribute. Works exactly like Proxy
(enables a stand-in JS type for a .NET type), but is applied only inside current project. This can be used to proxy helper .NET classes that are used only internally in a project, without conflicts if any other WebSharper libraries also want to use it similarly. If a proper proxy exists in any dependencies, then the InternalProxy
is ignored, with a compilation-time warning.Published by Jand42 almost 2 years ago
This is a major release of WebSharper 6. NuGet version 6.1.0.249
.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.1.0.249
This release adds support for FSharp.Core 7.0
, while being compatible with referencing any FSharp.Core 6.0+
.
Templates are still using .NET 6 (LTS) by default.
The compiler needs a .NET 6 runtime, but supports targeting .NET 7. If you update an F# WebSharper project to net7.0
, you will also need to set <ProduceReferenceAssembly>false</ProduceReferenceAssembly>
on your project.
Result
and Map
modules."UseJavaScriptSymbol": true
is the default, so you can use #if JAVASCRIPT
in original code to separate WebSharper proxy related code.WithWarning
on constructors and properties.MutationRecord.Type
binding.get_Zero
member if defined for a custom numeric type.Seq.sum
/sumBy
/average
/averageBy
functions (and List
/Array
equivalents) are working as in .NET for custom numeric types, using their get_Zero
, op_Addition
and for averaging, DivideByInt
members, same as in .NET F#.TextDirection
, LineJoin
, TextAlign
, TextBaseLine
has been renamed to CanvasTextDirection
, CanvasLineJoin
, CanvasTextAlign
, CanvasTextBaseLine
.sum
/sumBy
/average
/averageBy
must use it with resolved generics or be marked with [<Inline>]
so that WebSharper compiler can resolve these functions specific to the type used.Published by Jand42 about 2 years ago
This is a minor enhancement release of WebSharper 6. NuGet version 6.0.4.240
.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.0.4.240
Published by Jand42 about 2 years ago
This is a minor enhancement release of WebSharper 6. NuGet version 6.0.3.237
.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.0.3.237
JavaScript
attribute now can be used on constructor parameters with type FSharp.Quotations.Expr<_>
to auto-transpile expression passed in. Previously this feature was available only on methods. (For example this is used internally by Doc.ClientSide
helper of WebSharper.UI`)ClientSide
function defined in WebSharper.Web.dll
is now marked obsolete. Use new WebSharper.Web.InlineControl(expr)
directly if needed, or when using WebSharper.UI, the Doc.ClientSide
function. (It is recommended to use Doc.ClientSide
instead of client
, the former supports auto-quoting its expression argument, so you don't need to wrap it in <@ ... @>
.Published by Jand42 about 2 years ago
This is a minor bugfix release of WebSharper 6. NuGet version 6.0.2.235
.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.0.2.235
Published by Jand42 about 2 years ago
This is a minor enhancement release of WebSharper 6. NuGet version 6.0.1.233
.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.0.1.233
Doc.Hydrate
, a warning is given if you use explicit <@ @>
F# quotation instead of an auto-quoted parameter. This ensures the intended use of Doc.Hydrate
to generate a server-side DOM too for SEO but it's still non-breaking if value cannot be found.Published by Jand42 over 2 years ago
This is first stable release of WebSharper 6. NuGet version 6.0.0.228
.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.0.0.228
The .vsix
installer has been retired, install dotnet templates as above to have them available within Visual Studio 2022 New Project wizard.
41.0.3
for F# 6.0 language features. Added support for:
task
computation expression builderList/Array/Seq
module functions: insertAt/removeAt/updateAt/insertManyAt/removeManyAt
Map
properties: Keys/Values
%B
binary printing supportexpr[idx]
indexing, as
patterns, implicit conversionsProp1.Prop2: value
global using
directivesnamespace
declarations"UseMinifiedScripts"
runtime setting. Added appsettings.json
and appsettings.Development.json
to all web templates so that existing behavior is kept, Debug builds use non-minified scripts.ICollection, ICollection<T>, IList, IList<T>, IDictionary<K,V>, ISet<T>
and calling methods on these interface types work as expected. As types are erased in WebSharper translation, there is no performance loss on this. (For example calling .Count
would not enumerate whole collection, if the underlying collection object would not.)StdlibUseCdn
, StdlibCdnFormat
and CdnFormat.*
for controlling WebSharper CDN link generation. Now cdn.websharper.com is live for WebSharper 5+ public releases.UseDownloadedResources
- remote scripts are dowloaded at compile time (also needs similar wsconfig.json
setting) and linking them from local server.UseMinifiedScripts
- if true, serves .min.js
scripts. Default is true.WebSharper.Runtime.*
instead of IntelliFactory.Runtime.*
. This should require no changes, unless you called any of these functions directly which is not their intended use.System.Configuration.ConfigurationManager
or Microsoft.AspNetCore.Mvc.Abstractions
any more. The single MVC-related functionality of WebSharper.Sitelets.Content
type implementing IActionResult
has been used to WebSharper.AspNetCore package via a .ToIActionResult()
extension method instead of direct implementation.Information
writes the sitelet runtime initialization time and Debug
writes routing+handling+writing subtimes for requests handled by WebSharper Sitelets.WebSharper.Sitelets.Content
and their async forms (Async<Content>
in F# and Task<Content>
in C#) to help integrating WebSharper content into ASP.NET Core applications. Use .ToIActionResult()
to return WebSharper Content from inside an MVC handler, or .HandleRequest
as a handler in minimal ANC APIs. For the other direction, also added Content.MvcResult
to convert any object allowed as a return type in MVC to a WebSharper Content value.SiteletBuilder.WithCors
methods.Context.Request.BodyText
property now has type Task<string>
. This means that it cannot be used synchronously without explicitly waiting on result, resolving all hidden synchronous waits within WebSharper routing too that had some performance drawbacks.IApplicationBuilder
extensions removed. You do need to use .AddWebSharper()
in services builder too when you have .UseWebSharper()
, a runtime error pointing this out is given if missing. This fixed scenarios where WebSharper has ran its metadata loading step twice, improving startup performance.Actions
property of WebSharper.Sitelets.IWebSite
interface (used for describing pages to generate for offline sitelets) is now of type IEnumerable<'Action>
instead of F# list: list<'Action>
. As the type is widened, it would only break existing code in rare cases."outputDir": "wwwroot"
setting is now the default for website projects. Use new project type microservice
if you need no .js output, only server-side WebSharper functionality like JSON endpoints or RPC.this
can get scoped incorrectly, resulting in client side null error. Also includes optimizations for JS output for printf
family and string interpolation, outputting cleaner and shorter code.wsconfig.json
or console args by the WebSharper F# compiler (wsfsc.exe)Published by Jand42 almost 3 years ago
This is the first stable release of WebSharper 5.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::5.0.0.119
Templates for Visual Studio 2019/2022: WebSharper.5.0.0.119.vsix
WebSharper.AspNetCore.Sitelets.HttpHandler
and WebSharper.AspNetCore.Remoting.HttpHandler
helpers to allow hosting WebSharper Sitelets in giraffe/Saturn pipelines. Add .AddWebSharper()
in your ConfigureServices method to enable.Published by Jand42 about 3 years ago
This is a small fix and enhancement release of WebSharper 5 Preview.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::5.0.0.104-preview1
module X
) work as intended.dotnet ws
command line tool, see https://github.com/dotnet-websharper/dotnet-ws
Published by mrtank about 3 years ago
This is a preview release of WebSharper 5.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::5.0.0.102-preview1
40.0
for F# 5.0 language features. Added support for:
nameof
--standalone+
flag at compile.WebSharperBuildService
environment variable with "False" value.<WebSharperStandalone>True</WebSharperStandalone>
project property.Sitelets.Content
objects now can be returned from ASP MVC routed endpoints too.Property
and Member
to depend on resources as well as Assembly
, Resource
, Class
, Interface
in WebSharper Interface Generator.WebSharper.JQuery
into its own nuget package (https://github.com/dotnet-websharper/jquery).JQuery
's AjaxWith
with a similar XMLHttpRequest
solution in Routing.Application.Text
overload for C#EventSource
.Net4x
. netstandard2.0
, .NET Core 3.1 are still supported.XMLHttpRequest.send()
binding.wsfsc
fails to build projects). Fixing #1184 together with #1183, because the new build service interactions coupled when build fails on linux.Published by btamas2000 about 3 years ago
This is a minor release for WebSharper 4.7.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.7.3.424
Templates for Visual Studio 2017/2019: http://websharper.com/installers/WebSharper.4.7.3.424.vsix
Floor
/Ceiling
methods and comparison operators to the decimal
proxy.System.Numerics.BigInteger
(F# alias bigint
) proxy now uses default EcmaScript 2020 BigInt
. F# bigint
literals like 99I
are also supported.Published by Jand42 over 3 years ago
This is a bugfix release for WebSharper 4.7.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.7.2.423
Templates for Visual Studio 2017/2019: http://websharper.com/installers/WebSharper.4.7.2.423.vsix
Context.WithSettings
/Sitelets.WithSettings
helpers that add new environment vars for a Http Context or Sitelet.WithSettings
helper within WebsiteEntryPoint definition like so:
override this.Sitelet =
MySitelet
|> Sitelet.WithSettings [
"WebSharper.JQuery.Resources.JQuery", "https://code.jquery.com/jquery-3.6.0.min.js"
]
Thanks to @btamas2000.#1141 Context.Request.BodyText
now throws an error when accessed in an ASP.NET Core web application. Synchronous access to request body will be deprecated. Use asynchronous request read from Context.Request.Body
instead:
async {
use stream = new StreamReader(ctx.Request.Body)
let! data = stream.ReadToEndAsync() |> Async.AwaitTask
// ... process data
}
Published by Jand42 over 3 years ago
This is a bugfix release for WebSharper 4.7.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.7.1.409
Templates for Visual Studio 2017/2019: http://websharper.com/installers/WebSharper.4.7.1.409.vsix
#1123 Fix build error on new .NET5 SDK (Error: "You must provide assembly output path.")
#1125 Updated .NET Framework 4.x extension projects to use FSharp.Core 4.7.0 by default (FSharp.Core 5.0 is not yet supported for WIG)
Published by Jand42 almost 4 years ago
This is a minor release for WebSharper 4.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.7.0.395
Templates for Visual Studio 2017/2019: http://websharper.com/installers/WebSharper.4.7.0.395.vsix
This release updates to a new version of FSharp.Compiler.Service. For optimal compilation speed of F# projects, run the packages\WebSharper.FSharp.4.7.0.423\tools\runngen.ps1
script in administrator mode once.
#1114 Added JS.Import
, JS.ImportDefault
, JS.ImportAll
, JS.ImportDynamic
functions. Sample usage:
[<Inline>]
let importTestJsAll : obj = JS.ImportAll "/modules/test.js"
// translates to: import * as test from "/modules/test.js"
[<Inline>]
let importTestJs : obj = JS.Import("testExport", "/modules/test.js")
// translates to: import { testExport } from "/modules/test.js"
[<Inline>]
let importTestJsDefault : obj = JS.ImportDefault "/modules/test.js"
// translates to: import def$test from "/modules/test.js"
// this does not add an import statement on top of the file as the others, but uses JavaScript import function
[<JavaScript>]
let testImportDynamic : Promise = JS.ImportDynamic("/modules/test.js").Then(fun testModule => testModule?testExport())
// translates to: import("/modules/test.js").then(function (testModule) { testModule.testExport(); })
#1070 The javascript import
function can now be used within inlines, translates to JS correctly.
[<Inline "import('/modules/my-module.js').then(function (module) { module.run(); })">]
let runMyModule() = X<Promise>
#1120 Updated to FSharp.Compiler.Service
37.0. Building for net5.0
target framework and using FSharp.Core
5.0 is possible but no F# 5 language features are available yet.
Pattern.OptionalFields
uses the original target JS name, does not appends Opt
incorrectly.uint8
and uint16
array literals are now translated without compiler error.Published by Jand42 over 4 years ago
This is an enhancement release for WebSharper 4.6.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.6.7.382
Templates for Visual Studio 2017/2019: http://websharper.com/installers/WebSharper.4.6.7.382.vsix
WebSharperSharedMetadata=None
setting option to disable metadata loading for Sitelet runtime when not needed (only server-side features of WebSharper are used). Warning: this breaks any site with client-side functionality or RPCs.langversion:7.3
for C#, which currently has full WebSharper support (projects with newer versions may compile but some newer language fetaures are not supported yet). Thanks to @3dGrabber.Published by Jand42 over 4 years ago
This is a bugfix release for WebSharper 4.6.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.6.6.380
Templates for Visual Studio 2017/2019: http://websharper.com/installers/WebSharper.4.6.6.380.vsix