ianks Github contribution chart
ianks Github Stats
ianks Most Used Languages

Activity

30 Sep 2022

Ianks

Fix typo

Pushed On 30 Sep 2022 at 11:24:03

Ianks

Simplify CI action

Pushed On 30 Sep 2022 at 11:14:50

Ianks

Simplify CI action

Pushed On 30 Sep 2022 at 11:11:42
Pull Request

Ianks

Bump rb-sys to v0.9.31

Created On 30 Sep 2022 at 11:06:19
Create Branch
Ianks In ianks/magnus Create Branchrb-sys-v0.9.31

Ianks

Ruby bindings for Rust

On 30 Sep 2022 at 11:05:42

Ianks

Move more things to rb-sys-build

Pushed On 30 Sep 2022 at 09:37:04

Ianks

Move more to `rb-sys-build`

Created On 30 Sep 2022 at 03:58:59
Create Branch
Ianks In oxidize-rb/rb-sys Create Branchmore-in-rb-sys-build

Ianks

Easily build Ruby native extensions in Rust

On 30 Sep 2022 at 03:58:45

Ianks

Move more to `rb-sys-build`

Created On 30 Sep 2022 at 03:55:27
Create Branch
Ianks In oxidize-rb/oxi-test Create Branchmore-in-rb-sys-build

Ianks

Description not entered by the user.

On 30 Sep 2022 at 03:54:21
Issue Comment

Ianks

Add support for `x86_64-pc-windows-msvc`

Goal

This will allow Rubygems to run tests against ruby-head on every commit for Windows.

Solution

It may be as easy as adding x86_64-pc-windows-msvc to the CI matrix. Or may require more work.

https://github.com/rubygems/rubygems/pull/5747

Forked On 30 Sep 2022 at 03:50:57

Ianks

Released in v0.9.31 🎊

Commented On 30 Sep 2022 at 03:50:57

Ianks

[CI] Windows - test Windows MSYS2 builds with `stable-x86_64-pc-windows-gnu`, test mswin with `stable-x86_64-pc-windows-msvc`

Created On 30 Sep 2022 at 03:50:13
Issue Comment

Ianks

[CI] Windows - test Windows MSYS2 builds with `stable-x86_64-pc-windows-gnu`, test mswin with `stable-x86_64-pc-windows-msvc`

This is failing on the mswin build. Not sure if there is a there is a missing dependency.

Forked On 30 Sep 2022 at 03:50:13

Ianks

v0.9.31 now has support for mswin 🎊 ❤️

Commented On 30 Sep 2022 at 03:50:13
Create Branch
Ianks In oxidize-rb/rb-sys Create Branchv0.9.31

Ianks

Easily build Ruby native extensions in Rust

On 30 Sep 2022 at 03:47:42

Ianks

Bump to v0.9.31

Pushed On 30 Sep 2022 at 03:47:35

Ianks

Add suport for mswin (#80)

  • CI - Add job for x86_64-pc-windows-msvc with Windows 2022, mswin

  • action.yml - use ruby/setup-ruby-pkgs to load mingw clang

  • Optionally push cflags

  • Do not include atomic.h on msvc

  • Do not include atomic.h on msvc

  • Add system includes for windows

  • Split paths

  • Debug emmintrin.h

  • Debug emmintrin.h

  • Manually push ucrt64 include to test (REMOVE LATER)

  • Attempt ms-compatibility-version

  • Set libclang path manually

  • Set libclang path manually

  • Set libclang path manually

  • Set libclang path manually

  • Update bindings.rs

  • Rust example gem test first in CI

  • Cleanup workflow

  • Attempt nmake support

  • Nmake more

  • Nmake more

  • Fixes

  • Export env

  • Else fix

  • Fixes

  • Debug

  • Fixes

  • Fixes

  • Fixes

  • Flatten

  • Fixes

  • Link

  • Link

  • Link

  • Try using built in cargo linker

  • Try using built in cargo linker

  • Try using built in cargo linker

  • Attempt to fix cargo test

  • Attempt to fix cargo test

  • Attempt to fix cargo test

  • Run cargo test first

  • f

  • Try linking ruby static on mswin

  • Fix gem tests

  • Clean up lints

  • Skip cargo test on mswin

  • Skip toolchain info test for now

  • Lint

  • Drop version on smoke test

Co-authored-by: MSP-Greg Greg.mpls@gmail.com

Pushed On 30 Sep 2022 at 03:45:51

Ianks

Add suport for mswin

Created On 30 Sep 2022 at 03:45:51
Issue Comment

Ianks

Add suport for mswin

#72 gets us closer to windows supports, insofar as not panicking immediately. I would like to get those changes in so I can continue to work on support.

Forked On 30 Sep 2022 at 03:36:24

Ianks

The Smoke test will fail since it's using an older version of rb-sys. Going to merge since everything seems to be working otherwise 🎊

Commented On 30 Sep 2022 at 03:36:24

Ianks

Drop version on smoke test

Pushed On 30 Sep 2022 at 03:35:50

Ianks

Lint

Pushed On 30 Sep 2022 at 02:54:25

Ianks

Skip toolchain info test for now

Pushed On 30 Sep 2022 at 02:52:50
Issue Comment

Ianks

Add a x86_64-linux-musl Dockerfile

Intent

To properly build for distributions like Alpine Linux, we need to be able to build a dynamic library for the x86_64-unknown-linux-musl target. The basic image is based on the rake-compiler-dock x86_64-linux image, but uses a Debian base instead of CentOS and adds the necessary musl dependencies.

I have tried to separate the rake-compiler-dock related setup steps from the actual rbsys image, but we can also merge everything into this Dockerfile. The base image needs some further cleanup, but allow us compiling successfully today.

Dockerfile for image https://github.com/y-crdt/yrb/blob/main/build/x86_64-linux-musl/x86_64-linux-musl.dockerfile

Opening primarily to start a discussion. @ianks looking forward to your thoughts.

How to use

Your Rakefile:

Rake::ExtensionTask.new("yrb", spec) do |ext|
  ext.source_pattern = "*.{rs,toml}"
  ext.cross_compile = true
  ext.cross_platform = %w[x86_64-linux x86_64-linux-musl]
end 

Add the following to the extconf.rb:

create_rust_makefile("yrb") do |r|
  if r.target&.include? "musl"
    r.extra_rustflags = %w[-C target-feature=-crt-static]
  end
end 

Build gem:

rake gem:x86_64-linux-musl 

Smoke test:

# I set the platform to properly emulate a x86_64 environment on a M1
docker run --platform linux/amd64 --name ruby-alpine -it ruby:alpine sh
docker cp pkg/y-rb-0.1.4.beta.1-x86_64-linux-musl.gem ruby-alpine:/y-rb.gem 
docker exec -it ruby-alpine bash sh
gem install rb_sys
gem install --local /y-rb.gem -v 0.1.4.beta.1
irb
require "y"
d1 = Y::Doc.new
t1 = d1.get_text("textfield_a")
t1 << "Hello, World!"
t1.to_s

d2 = Y::Doc.new
t2 = d2.get_tetx("textfield_a")
t2.to_s # should print ""
d2.sync(d1.diff)
t2.to_s # should print "Hello, World!" 

Reference project: https://github.com/y-crdt/yrb Published gems: https://rubygems.org/gems/y-rb/versions (0.1.4.beta.1)

Forked On 30 Sep 2022 at 02:38:41

Ianks

Awesome work! Excited to get this in 💪🏻. Couple of questions / comments:

 r.extra_rustflags = %w[-C target-feature=-crt-static] 

Can this just be the default? If so, adding it the CargoBuilder as a default platform link arg should work.

  • [ ] Can you add an entry to data/toolchains.json then run rake data:derive?
  • [ ] Add an entry to the readme.md
  • [ ] Once this is merged, we should add it to oxi-test

Thanks so much!

Commented On 30 Sep 2022 at 02:38:41
Merge

Ianks

Add a x86_64-linux-musl Dockerfile

Intent

To properly build for distributions like Alpine Linux, we need to be able to build a dynamic library for the x86_64-unknown-linux-musl target. The basic image is based on the rake-compiler-dock x86_64-linux image, but uses a Debian base instead of CentOS and adds the necessary musl dependencies.

I have tried to separate the rake-compiler-dock related setup steps from the actual rbsys image, but we can also merge everything into this Dockerfile. The base image needs some further cleanup, but allow us compiling successfully today.

Dockerfile for image https://github.com/y-crdt/yrb/blob/main/build/x86_64-linux-musl/x86_64-linux-musl.dockerfile

Opening primarily to start a discussion. @ianks looking forward to your thoughts.

How to use

Your Rakefile:

Rake::ExtensionTask.new("yrb", spec) do |ext|
  ext.source_pattern = "*.{rs,toml}"
  ext.cross_compile = true
  ext.cross_platform = %w[x86_64-linux x86_64-linux-musl]
end 

Add the following to the extconf.rb:

create_rust_makefile("yrb") do |r|
  if r.target&.include? "musl"
    r.extra_rustflags = %w[-C target-feature=-crt-static]
  end
end 

Build gem:

rake gem:x86_64-linux-musl 

Smoke test:

# I set the platform to properly emulate a x86_64 environment on a M1
docker run --platform linux/amd64 --name ruby-alpine -it ruby:alpine sh
docker cp pkg/y-rb-0.1.4.beta.1-x86_64-linux-musl.gem ruby-alpine:/y-rb.gem 
docker exec -it ruby-alpine bash sh
gem install rb_sys
gem install --local /y-rb.gem -v 0.1.4.beta.1
irb
require "y"
d1 = Y::Doc.new
t1 = d1.get_text("textfield_a")
t1 << "Hello, World!"
t1.to_s

d2 = Y::Doc.new
t2 = d2.get_tetx("textfield_a")
t2.to_s # should print ""
d2.sync(d1.diff)
t2.to_s # should print "Hello, World!" 

Reference project: https://github.com/y-crdt/yrb Published gems: https://rubygems.org/gems/y-rb/versions (0.1.4.beta.1)

Forked On 30 Sep 2022 at 02:33:59

Ianks

Is the plan to upstream this to `rake-compiler-dock`? In the meantime, can you copy-pasta the dockerfile content here?
On 30 Sep 2022 at 02:33:59

Ianks

Add a x86_64-linux-musl Dockerfile

Intent

To properly build for distributions like Alpine Linux, we need to be able to build a dynamic library for the x86_64-unknown-linux-musl target. The basic image is based on the rake-compiler-dock x86_64-linux image, but uses a Debian base instead of CentOS and adds the necessary musl dependencies.

I have tried to separate the rake-compiler-dock related setup steps from the actual rbsys image, but we can also merge everything into this Dockerfile. The base image needs some further cleanup, but allow us compiling successfully today.

Dockerfile for image https://github.com/y-crdt/yrb/blob/main/build/x86_64-linux-musl/x86_64-linux-musl.dockerfile

Opening primarily to start a discussion. @ianks looking forward to your thoughts.

How to use

Your Rakefile:

Rake::ExtensionTask.new("yrb", spec) do |ext|
  ext.source_pattern = "*.{rs,toml}"
  ext.cross_compile = true
  ext.cross_platform = %w[x86_64-linux x86_64-linux-musl]
end 

Add the following to the extconf.rb:

create_rust_makefile("yrb") do |r|
  if r.target&.include? "musl"
    r.extra_rustflags = %w[-C target-feature=-crt-static]
  end
end 

Build gem:

rake gem:x86_64-linux-musl 

Smoke test:

# I set the platform to properly emulate a x86_64 environment on a M1
docker run --platform linux/amd64 --name ruby-alpine -it ruby:alpine sh
docker cp pkg/y-rb-0.1.4.beta.1-x86_64-linux-musl.gem ruby-alpine:/y-rb.gem 
docker exec -it ruby-alpine bash sh
gem install rb_sys
gem install --local /y-rb.gem -v 0.1.4.beta.1
irb
require "y"
d1 = Y::Doc.new
t1 = d1.get_text("textfield_a")
t1 << "Hello, World!"
t1.to_s

d2 = Y::Doc.new
t2 = d2.get_tetx("textfield_a")
t2.to_s # should print ""
d2.sync(d1.diff)
t2.to_s # should print "Hello, World!" 

Reference project: https://github.com/y-crdt/yrb Published gems: https://rubygems.org/gems/y-rb/versions (0.1.4.beta.1)

Merged On 30 Sep 2022 at 02:33:59

Ianks

Commented On 30 Sep 2022 at 02:33:59

Ianks

Skip cargo test on mswin

Pushed On 30 Sep 2022 at 02:27:56

Ianks

Clean up lints

Pushed On 30 Sep 2022 at 02:26:21

Ianks

Fix gem tests

Pushed On 30 Sep 2022 at 02:25:06