rusty_racer 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Cargo.toml +5 -0
- data/README.md +188 -0
- data/ext/rusty_racer/Cargo.lock +952 -0
- data/ext/rusty_racer/Cargo.toml +23 -0
- data/ext/rusty_racer/extconf.rb +11 -0
- data/ext/rusty_racer/src/lib.rs +4883 -0
- data/lib/rusty_racer/version.rb +5 -0
- data/lib/rusty_racer.rb +122 -0
- metadata +67 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Standalone (detached from the spike workspace) so it builds as a normal gem
|
|
2
|
+
# extension. The cdylib is the Ruby extension; V8 is baked in (a from-source V8
|
|
3
|
+
# build links library-TLS on linux, so the .so loads fine — no separate
|
|
4
|
+
# libv8-rusty needed under the cibuildgem native-per-platform model).
|
|
5
|
+
[package]
|
|
6
|
+
name = "rusty_racer"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
edition = "2021"
|
|
9
|
+
publish = false
|
|
10
|
+
|
|
11
|
+
[lib]
|
|
12
|
+
crate-type = ["cdylib"]
|
|
13
|
+
|
|
14
|
+
[dependencies]
|
|
15
|
+
# rb-sys: exposes magnus::rb_sys (protect — catch a Ruby raise from a host
|
|
16
|
+
# callback so it can't longjmp through V8 — and the raw VALUE conversions used
|
|
17
|
+
# to root the owner thread).
|
|
18
|
+
magnus = { version = "0.8", features = ["rb-sys"] }
|
|
19
|
+
rb-sys = "0.9"
|
|
20
|
+
v8 = "150.0.0"
|
|
21
|
+
# pthread stack-bounds query, to set V8's stack limit per op relative to the
|
|
22
|
+
# current native thread (in-thread V8 runs on the Ruby thread's stack).
|
|
23
|
+
libc = "0.2"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
require "mkmf"
|
|
2
|
+
require "rb_sys/mkmf"
|
|
3
|
+
|
|
4
|
+
# NOTE: V8 must be built from source so the extension links the library-TLS V8
|
|
5
|
+
# a cdylib needs (the prebuilt librusty_v8 is initial-exec TLS -> R_X86_64_TPOFF32
|
|
6
|
+
# under -shared). V8_FROM_SOURCE has to be in the *process environment* of the
|
|
7
|
+
# `cargo` invocation, which make spawns separately from this extconf — so it is
|
|
8
|
+
# set in the CI workflow env (and must be exported in the shell for local
|
|
9
|
+
# `rake compile`), NOT here, where it would not propagate.
|
|
10
|
+
|
|
11
|
+
create_rust_makefile("rusty_racer/rusty_racer")
|