Skip to content

Commit

Permalink
Merge pull request #395 from philss/ps-remove-unsupported-nifs
Browse files Browse the repository at this point in the history
Remove remaning code from unsupported NIF versions
  • Loading branch information
evnu authored Oct 27, 2021
2 parents 8f191dc + 60a9762 commit 63ff407
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ Rustler aims to support the newest three OTP versions as well as Elixir versions
Rustler uses `erlang:system_info(nif_version)` to detect the supported NIF version of the Erlang/OTP
system for which the NIF is to be compiled. It is possible to restrict the NIF version to an older
version if the NIF is to be compiled for an older version of Erlang. For example, if the target NIF
version should be `2.7` (Erlang/OTP 17.3), this can be defined using an environment variable:
version should be `2.14` (Erlang/OTP 21), this can be defined using an environment variable:

```
RUSTLER_NIF_VERSION=2.7 mix compile
RUSTLER_NIF_VERSION=2.14 mix compile
```

#### Community
Expand Down
4 changes: 1 addition & 3 deletions rustler/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ use std::env;
use std::process::Command;

// keep this sorted by version number
const NIF_VERSION: &[&str] = &[
"2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "2.13", "2.14", "2.15", "2.16",
];
const NIF_VERSION: &[&str] = &["2.14", "2.15", "2.16"];

fn main() {
let latest_version = NIF_VERSION.last().unwrap().to_string();
Expand Down
7 changes: 0 additions & 7 deletions rustler_mix/lib/rustler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,6 @@ defmodule Rustler do
"""
def nif_versions,
do: [
'2.7',
'2.8',
'2.9',
'2.10',
'2.11',
'2.12',
'2.13',
'2.14',
'2.15',
'2.16'
Expand Down
1 change: 0 additions & 1 deletion rustler_sys/gen_api.erl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
getenv | % enif_getenv() functions
time | % new timer API
{ulongsize, integer()} | % number of bytes in a C ulong
dirty_schedulers | % enif_is_on_dirty_scheduler(). Only for 2.7-2.10
dirty_scheduler_opt | % dirty scheduler nifentry option flag. For >=2.7
nif_2_11 . % general 2.11 API additions

Expand Down

0 comments on commit 63ff407

Please sign in to comment.