Skip to content

Commit

Permalink
fix highlighting, misc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton-4 committed Mar 22, 2024
1 parent bfc3bfc commit cbb52bc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion examples/BasicDict/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The type of the key must implement the `Hash` and `Eq` abilities.
Nearly all Roc builtin types (`Str`, `Bool`, `List`, `Int *`,...) implement these.

If you are defining an [opaque type](https://www.roc-lang.org/tutorial#opaque-types), adding `implements [Hash, Eq]` is all you need to be able to use it as a key:
```
```roc
Username := Str implements [Hash, Eq]
```

Expand Down
18 changes: 9 additions & 9 deletions examples/DotNetPlatform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ file:main.roc
```

platform/main.roc:
```
```roc
file:platform/main.roc
```

platform/DotNetRocPlatform.csproj:
```
```xml
file:platform/DotNetRocPlatform.csproj
```

platform/Program.cs:
```
```csharp
file:platform/Program.cs
```

Expand All @@ -29,17 +29,17 @@ file:platform/Program.cs
1. Build the roc app that is using the dotnet platform:

```cli
cd examples/DotNetPlatform/
roc build main.roc --lib --output ./platform/interop
$ cd examples/DotNetPlatform/
$ roc build main.roc --lib --output ./platform/interop
```
> _use `arch -arm64` if you are running in a Apple Silicon mac._
This will produce a shared library file that we'll be able to import from a .NET context.

To run:
```cli
cd platform
dotnet run
$ cd platform
$ dotnet run
```
This should print "Hello from .NET".

Expand All @@ -50,11 +50,11 @@ If you want to build a binary for the app using native AOT:

1. Publish the dotnet app
```cli
dotnet publish -c Release
$ dotnet publish -c Release
```
> _use `arch -arm64` if you are running in a Apple Silicon mac._
2. `cd` into the into the `publish` folder and run the binary:
```cli
./DotNetRocPlatform
$ ./DotNetRocPlatform
```
10 changes: 5 additions & 5 deletions examples/GoPlatform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ file:main.roc
```

platform/main.roc:
```
```roc
file:platform/main.roc
```

Expand All @@ -25,7 +25,7 @@ file:platform/main.go
```

platform/host.h:
```
```c
file:platform/host.h
```

Expand All @@ -38,9 +38,9 @@ For now, the compiled Roc binary and the go binary have to be manualy [linked](h
Build steps:

```bash
cd examples/GoPlatform
roc build --no-link main.roc
go build platform/main.go
$ cd examples/GoPlatform
$ roc build --no-link main.roc
$ go build platform/main.go
```

Run the produced executable with `./main`.
2 changes: 1 addition & 1 deletion examples/IngestFiles/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ingest Files

Statically importing files as a `Str` or a `List U8`.
Statically importing files as a `Str` or a `List U8`:

```roc
imports [
Expand Down

0 comments on commit cbb52bc

Please sign in to comment.