Skip to content

Commit

Permalink
Merge pull request #631 from dictu-lang/develop
Browse files Browse the repository at this point in the history
Release 0.28.0
  • Loading branch information
Jason2605 authored Aug 20, 2023
2 parents b1d9c25 + ac7327a commit 5ff841d
Show file tree
Hide file tree
Showing 82 changed files with 3,823 additions and 482 deletions.
22 changes: 22 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ubuntu:latest

RUN adduser vscode && \
mkdir -p /etc/sudoers.d && \
echo vscode ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/vscode && \
chmod 0440 /etc/sudoers.d/vscode

WORKDIR Dictu
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt upgrade -y && \
apt install -y --no-install-recommends \
build-essential \
git \
cmake \
libcurl4-gnutls-dev \
uuid-dev \
ca-certificates && \
rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/dictu-lang/Dictu.git

USER root
29 changes: 29 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "Dictu",
"dockerFile": "Dockerfile",
"build": {
"dockerfile": "Dockerfile",
"context": "..",
"args": {}
},
"hostRequirements": {
"cpus": 1,
"memory": "512mb",
"storage": "1gb"
},
"customizations": {
"vscode": {
"settings": {
"files.exclude": {
"**/LICENSE": true,
"**/CODE_OF_CONDUCT.md": true
}
},
"extensions": [
"vscode-icons-team.vscode-icons",
"visualstudioexptteam.vscodeintellicode"
]
}
},
"remoteUser": "vscode"
}
35 changes: 6 additions & 29 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,26 @@
<!---- This is the PR Template !-->

<!-- Make sure to follow each step so that your PR is explained and easy to read !-->

<!-- This will allow maintainers and other potential contributors to understand the changes being carried out !-->

<!--- Thanks for considering that !-->

### Well detailed description of the change :

<!-- Explain what you have done !-->



<!-- Link the issue below if you are resolving an issue !-->
# <Title>

Resolves: #

#

### Type of change:

<!-- Please select relevant options -->
### What's Changed:

<!-- Add an x in [ ] if true !-->

<!-- Delete options that aren't relevant!-->
#

### Type of Change:

- [ ] Bug fix

- [ ] New feature

- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

#

### Housekeeping
### Housekeeping:

<!-- If adding a new test file, remember to include it in the relevant import file -->
- [ ] Tests have been updated to reflect the changes done within this PR (if applicable).

- [ ] Documentation has been updated to reflect the changes done within this PR (if applicable).

#

### Preview (Screenshots) :

<!-- If applicable attempt to explain the screenshots !-->
### Screenshots (If Applicable):
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install nfpm
run: |
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list
sudo apt update
sudo apt install nfpm
- name: Build
run: |
sudo apt-get update
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ dictu.pdb
test1.du
\.vscode/
/.env
/vcpkg_installed
/Release
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ set(CMAKE_C_EXTENSIONS ON)

set(DISABLE_HTTP OFF CACHE BOOL "Determines if HTTPS based features are compiled. HTTPS based features require cURL.")

set(ENABLE_VCPKG OFF CACHE BOOL "Determines if dependencies are being procured by the VCPKG package manager")

if (ENABLE_VCPKG)
# curl is provided by VCPKG
set(DISABLE_HTTP ON CACHE BOOL "Determines if dependencies are being procured by the VCPKG package manager")
endif(ENABLE_VCPKG)

option(BUILD_CLI "Build the CLI" ON)

add_subdirectory(src)
Expand Down
68 changes: 68 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21,
"patch": 0
},
"configurePresets": [
{
"name": "debug",
"displayName": "Debug configuration",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
},
"binaryDir": "${sourceDir}/build"
},
{
"name": "release",
"displayName": "Release configuration",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
},
"binaryDir": "${sourceDir}/build"
},
{
"name": "release-nohttp",
"displayName": "Release configuration",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"DISABLE_HTTP": true
},
"binaryDir": "${sourceDir}/build"
},
{
"name": "release-vcpkg",
"displayName": "Release configuration",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"ENABLE_VCPKG": true
},
"binaryDir": "${sourceDir}/build",
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
}
],
"buildPresets": [
{
"name": "release",
"jobs": 4,
"cleanFirst": true,
"configurePreset": "release",
"configuration": "release"
},
{
"name": "debug",
"jobs": 4,
"cleanFirst": true,
"configurePreset": "debug",
"configuration": "debug"
},
{
"name": "release-vcpkg",
"jobs": 4,
"cleanFirst": true,
"configurePreset": "release-vcpkg",
"configuration": "release"
}
]
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2022 Jason Hall
Copyright (c) 2019-2023 Jason Hall

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
64 changes: 58 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,80 @@ print(fibonacci(10));
More [here.](https://github.com/Jason2605/Dictu/tree/develop/examples)

## Running Dictu

Dictu requires that you have CMake installed and it is at least version 3.16.3.

### CMake
### Using CMake (at least version 3.16.3 or greater)

```bash
$ git clone -b master https://github.com/dictu-lang/Dictu.git
$ cd Dictu
$ cmake -DCMAKE_BUILD_TYPE=Release -B ./build
$ cmake --build ./build
$ ./dictu
$ cmake -DCMAKE_BUILD_TYPE=Release -B ./build
$ cmake --build ./build # on Windows add "--config Release" here to get a Release build
$ ./dictu # on Windows the executable is ".\Release\dictu.exe"
```

### Using CMake presets (version 3.21.0 or greater)

```bash
$ git clone -b master https://github.com/dictu-lang/Dictu.git
$ cd Dictu
$ cmake --preset release
$ cmake --build --preset release
$ ./dictu # on Windows the executable is ".\Release\dictu.exe"
```

#### Compiling without HTTP

The HTTP class within Dictu requires [cURL](https://curl.haxx.se/) to be installed when building the interpreter. If you wish to
build Dictu without cURL, and in turn the HTTP class, build with the `DISABLE_HTTP` flag.

##### Without CMake presets (at least version 3.16.3 or greater)

```bash
$ git clone -b master https://github.com/dictu-lang/Dictu.git
$ cd Dictu
$ cmake -DCMAKE_BUILD_TYPE=Release -DDISABLE_HTTP=1 -B ./build
$ cmake --build ./build
$ ./dictu
$ cmake --build ./build # on Windows add "--config Release" here to get a Release build
$ ./dictu # on Windows the executable is ".\Release\dictu.exe"
```

##### CMake presets (version 3.21.0 or greater)

```bash
$ git clone -b master https://github.com/dictu-lang/Dictu.git
$ cd Dictu
$ cmake --preset release-nohttp
$ cmake --build --preset release
$ ./dictu # on Windows add "--config Release" here to get a Release build
```

#### Compiling with VCPKG

This project includes support for the VCPKG C/C++ package manager in [manifest mode](https://learn.microsoft.com/en-us/vcpkg/users/manifests).
To enable VCPKG support, the `VCPKG_ROOT` environmental variable must be set to the path of a check-out and bootstrapped
[vcpkg repository](https://github.com/microsoft/vcpkg) on the compiling machine, and the `ENABLE_VCPKG` cmake flag must be set.

Compiling with VCPKG will enable certain features of Dictu that requires external library features to be automatically pulled and compiled.

##### Without CMake presets (at least version 3.16.3 or greater)

```bash
$ git clone -b master https://github.com/dictu-lang/Dictu.git
$ cd Dictu
$ cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_VCPKG=1 -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake -B ./build
$ cmake --build ./build # on Windows add "--config Release" here to get a Release build
$ ./dictu # on Windows the executable is ".\Release\dictu.exe"
```

##### CMake presets (version 3.21.0 or greater)

```bash
$ git clone -b master https://github.com/dictu-lang/Dictu.git
$ cd Dictu
$ cmake --preset release-vcpkg
$ cmake --build --preset release-vcpkg
$ ./dictu # on Windows add "--config Release" here to get a Release build
```

### Docker Installation
Expand Down
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: >-
color_scheme: "dictu" # Custom theme
logo: "/assets/images/dictu-logo/dictu-wordmark.svg"

version: "0.27.0"
version: "0.28.0"
github_username: dictu-lang
search_enabled: true

Expand Down
Loading

0 comments on commit 5ff841d

Please sign in to comment.