Commit Graph

353 Commits

Author SHA1 Message Date
Godfrey Chan 66dd520bcf Add top-level rake task 2017-04-13 11:36:24 -07:00
Godfrey Chan 8a602f11e3 Try to simplify the top Ruby method frame 2017-04-13 11:36:19 -07:00
Peter Wagenet 948b1b1cba Sync STDOUT in Rakefiles 2017-04-11 12:44:54 -07:00
Peter Wagenet bdd685f1ab Add failing test for rb_raise leaks 2017-04-11 12:35:35 -07:00
Godfrey Chan b03ddf82d9 Fix minor error in macro 2017-04-11 12:16:23 -07:00
Godfrey Chan 26aee03fc6 Structure exception handling more carefully to avoid leaks
Using `rb_raise` can jump over Rust's destructors which leaks memory
and apparently causes problems in Win32 when Rust is used with SEH.
We avoid this by making sure all exception related allocations take
place within Ruby, not Rust.
2017-04-11 12:16:18 -07:00
Godfrey Chan 96ca9a1f18 Introduce tools for more safely handling string allocations 2017-04-11 12:16:10 -07:00
Peter Wagenet 74a612ef53 Better ArgumentError handling 2017-04-11 12:15:15 -07:00
Peter Wagenet 48c122a2cd Basic error handling 2017-04-11 12:15:15 -07:00
Godfrey Chan 6ee7950167 Fix rake irb 2017-04-09 13:45:41 -07:00
Godfrey Chan b4f33924b4 Merge pull request #59 from tildeio/void_ptr
Use *const T and *mut T more consistently
2017-04-08 16:02:28 -07:00
Godfrey Chan 894fc06a6c Use *const T and *mut T more consistently
Some context in https://github.com/rust-lang/rfcs/pull/68
2017-04-08 15:40:42 -07:00
Godfrey Chan 8281778249 Fix Rust and C warnings 2017-04-08 15:40:42 -07:00
Godfrey Chan 338f2a84ff Update README.md 2017-04-08 13:10:11 -07:00
Godfrey Chan 2a411b8373 Update README.md 2017-04-08 13:09:28 -07:00
Godfrey Chan 1756d45baa Merge pull request #58 from tildeio/cstr
Switch to using a new cstr!() macro
2017-04-08 12:57:32 -07:00
Godfrey Chan ac3119aa0b Switch to using a new cstr!() macro
Unlike the previous Cstring::new approach, this approach doesn't
allocate. This will become important when we start using rb_raise
(which takes a C string but longjmps and therefore doesn't clean up
the memory).

(we got this implementation from @ubsan -- thanks!)
2017-04-08 12:01:58 -07:00
Peter Wagenet c1cc14e05a Fix AppVeyor Badge 2017-03-28 08:42:02 -07:00
Peter Wagenet 593d51a409 Merge pull request #42 from tildeio/float-conversions
Float Coercions
2017-03-20 10:16:07 -07:00
Peter Wagenet ec6147360f Add calculator example 2017-03-20 09:56:45 -07:00
Peter Wagenet cf06937a40 Add Float coercions 2017-03-20 09:56:45 -07:00
Peter Wagenet 85b6f9ea6f Add float functions to gem 2017-03-20 09:56:39 -07:00
Peter Wagenet d28380ed85 Run CI against both stable and nightly Rust 2017-03-18 07:08:40 -07:00
Peter Wagenet 9f0d8dffa3 Cache Rust install on Travis 2017-03-17 21:31:04 -07:00
Peter Wagenet 406243146c Log Rust backtraces 2017-03-17 21:15:23 -07:00
Peter Wagenet 8162b0cd8f Make Travis notifications quieter 2017-03-17 15:00:43 -07:00
Peter Wagenet b383a8d4f8 Stop caching target dir on Travis
It doesn't make the builds faster and actually takes longer to
pack at the end since it always changes.
2017-03-17 14:57:32 -07:00
Peter Wagenet ce2732b65a Merge pull request #54 from tildeio/examples-build-native
Examples now build native gem
2017-03-17 11:02:05 -07:00
Peter Wagenet 9242cc4c38 Examples now build native gem 2017-03-17 10:52:54 -07:00
Peter Wagenet 8aa7a67bf2 Merge pull request #53 from neb/patch-1
Fix capitalization in a README example.
2017-03-16 16:56:43 -07:00
Ben Shakal 757a66c834 Fix capitalization in a README example.
Make the input and output match capitalization. (Lowercasing "Rust" in the output would also fix this of course.)
2017-03-16 15:51:13 -07:00
Peter Wagenet 8109643d8a Add some comments to macros 2017-03-16 07:55:33 -07:00
Godfrey Chan b35477cb27 Merge pull request #51 from tildeio/new
Rust-side allocation, class methods, make some duration tests pass
2017-03-15 20:31:37 -07:00
Godfrey Chan 6b79cba0d8 Add class methods, get some Duration tests passing
Based on Peter's work in #41
2017-03-15 20:28:40 -07:00
Godfrey Chan 0c2cdeccac Allocate helix objects from Rust
The corresponding Ruby object is allocated lazily as needed when you
call `self.to_ruby()`
2017-03-15 20:28:13 -07:00
Godfrey Chan 04b4f7f564 Merge pull request #49 from tildeio/initialization-improvements
Initialization improvements
2017-03-15 16:53:23 -07:00
Peter Wagenet 68e76aa374 Improve Rust debugging 2017-03-15 16:47:07 -07:00
Godfrey Chan 9fda0e65d7 Fix self coercions for non-struct cases 2017-03-15 16:47:02 -07:00
Godfrey Chan 3fffa267f0 Add debugging flags 2017-03-15 16:25:59 -07:00
Godfrey Chan f897066f5f Allow initialize to take arguments 2017-03-15 16:25:59 -07:00
Godfrey Chan 134efc7a5a Separate allocation and initialization 2017-03-15 16:25:59 -07:00
Peter Wagenet 006178732f Quieter AppVeyor notifications 2017-03-15 14:30:34 -07:00
Peter Wagenet b7cd276874 Revert changes to initialization process.
These were causing some tests to fail.

This reverts commits c524d34335 and
98251104a4.
2017-03-15 14:07:56 -07:00
Peter Wagenet 5aeb925844 Merge pull request #48 from tildeio/ci-notifications
Add notifications to CI
2017-03-14 20:48:46 -07:00
Peter Wagenet cde007acf2 Add notifications to CI 2017-03-14 20:19:16 -07:00
Peter Wagenet 12d5e3745e More AppVeyor cache fixes 2017-03-14 19:41:31 -07:00
Godfrey Chan 98251104a4 Allow initialize to take arguments 2017-03-14 19:26:27 -07:00
Godfrey Chan c524d34335 Separate allocation and initialization 2017-03-14 19:26:27 -07:00
Peter Wagenet c81bae0445 Merge pull request #47 from tildeio/fix-appveyor
Really fix Cargo path on AppVeyor
2017-03-14 16:42:45 -07:00
Peter Wagenet 02f6b66220 Really fix Cargo path on AppVeyor 2017-03-14 16:32:21 -07:00