From 5a6dc485062dce54b56dedc6c7b7ab10913761c3 Mon Sep 17 00:00:00 2001 From: Daniel Kolsoi Date: Thu, 26 Apr 2018 22:10:10 -0400 Subject: [PATCH] Clarified in README that branch usage doesn't require explicit feature use --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 02f98ece697ae..c7136c54c4514 100644 --- a/README.md +++ b/README.md @@ -22,16 +22,16 @@ You'll need to point your Cargo.toml to a branch and use a feature flag correspo ```toml [dependencies] -inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "llvm3-7", features = ["llvm3-7"] } +inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "llvm3-7" } ``` Supported versions: -| GitHub Branch | Feature Flag | -| :-----------: | :----------: | -| llvm3-6 | llvm3-6 | -| llvm3-7 | llvm3-7 | -| llvm3-8 | llvm3-8 | +| LLVM Version | GitHub Branch | +| :----------: | :-----------: | +| 3.6.x | llvm3-6 | +| 3.7.x | llvm3-7 | +| 3.8.x | llvm3-8 | In the root of your source code you will have to add an extern crate to begin using Inkwell: @@ -118,8 +118,8 @@ fn jit_compile_sum( ``` 1 There are two uses of `unsafe` in this example because the actual -act of compiling and executing code on the fly is innately `unsafe`. For one, -there is no way of verifying we are calling `get_function()` with the right function +act of compiling and executing code on the fly is innately `unsafe`. For one, +there is no way of verifying we are calling `get_function()` with the right function signature. It is also `unsafe` to *call* the function we get because there's no guarantee the code itself doesn't do `unsafe` things internally (the same reason you need `unsafe` when calling into C).